Okay, thank you for attending this talk. My name is Juan Suarez, I'm a sobering
generator working at the area. It's typically in the graphic steam where we are working
mainly on driver developments. In my case, I've involved with MSA for since 2016, I was
10 years, well, 10 years out of 3. First, involved with the interdrivers, with all I-965
drive, which is now totally degraded, and later moved to work with the Raspberry Pi drivers
with Chema in the Raspberry Pi 1 to 5, and I've been working a ringman a year for several
misoblices. So, what's the motivation of all this talk? Well, maybe during the years, there was
several talks, this kind of topics related with Mr. For instance, the words like talks about
status updates on the drivers like Chema did now, and there was some talks about the
pretty components of Mr. Like the one that faced this morning, but actually there was never
you know, you talk about exactly what is Mr. And I mean, I know that probably a lot of people
are already know how what is Mr. But in the graphics, there are probably people working with
and there that doesn't know exactly how Mr. What's behind colors. So, equally interesting to
explain them, not so to the brother Owens in the internet, that is watching this talk. So,
that's the reason why we are giving this talk, and hopefully at the end, you get a better
year how Mr. Works, and if you are not contributing to Mr. Maybe you are getting motivated
for you to contribute. So, this is more or less the outline of the talk, we are going to start with
a spend difference between users, paying some current space drivers, which is part of the
repair and for Mr. Then Abit of History. So, we have this, Mr. What is the, why Mr. Is,
has the key to have nowadays? Then Abit of technical discussion on what is the architecture,
the main components, showing us more than a sample of what happens, we had curtains like when
you draw something, what is happening until the pixels end up, so in the display.
And then at the end Abit of, like, how we are in Mr. Testament, all of these things,
and how you can contribute and for conclusions. So,
different between current space and the user space driver. Well, when we used to think
out of the driver, we think about this very small piece of code that is running on the
corner, and that basically helps to interact with a hardware like this, or if you be a driver or
whatever. And in the case of GPUs is not different, I mean, in the case of GPUs also you need a
driver to handle the, to interact with the hardware itself. The big difference is that the
GPUs are really, really big monsters. These are very complex devices to, to work with.
Just in a sample, you check the programming manual of the internal skylic, which is a GPU
from 3 years ago, and there is not much, much powerful one in the market. Yeah, basically,
the, this, the, the, the performance is like six, how some page long. So, and there is a lot of
multi-taste like, uh, if you do this, you don't do that, a lot of, uh, iterations, a lot of
virtual multi-taste that makes very, very complicated, uh, for, probably, however. So,
now what they want to do, that, I mean, if you want to write a very, very specific application for
a very, very specific device that does very, very big things, you never are going to use the,
do it, however, directly. Right, what you want to do is, what you're application, using a
one-long API like up in jail, full-con, whoever, and then let something, some part of the,
so, well, you don't want to implement to deal with a hover. And basically, this is where Missa
enters. Missa is a framework that helps to write drivers that resize an user space,
and the main objective is to translate this, OpenGL, API Vulkan API to something that
then can be switched to a counter, something that is very specific for each of the GPUs.
Usually, uh, there is like, uh, as a middle, we depend on the pattern, it's a GPU.
Usually, uh, we have different drivers inside Missa, but covers different GPUs.
Uh, usually, I mean, it could be that you have like different drivers for the same, uh, family,
for instance, the work case that we're going to apply, um, uh, devices, which is missing growth
common GPUs, or, uh, for Braco, for the GPUs that runs in the garage, we apply 1 to 4 to 3.
There is a, uh, driver, and then for four or five, it's a different drive, why? Because,
basically, because a, what is the same growth common GPU, even in the same family, they can be,
big difference. Sometimes, uh, we need to deal with, with, uh, with different drivers.
Um, uh, what, also, because, uh,
highly, helpingGL, uh, API is quite different from, uh, family, Vulkan API, so you have two different drivers.
We have basic, are assigned the same code, because, uh, the end is, at the same power,
is a workbed by four for instance, the power, but they are separated.
So, uh, message, as I say, it's a, it's a, it's a framework, because you write the drivers,
and you want to know because they provide a lot of tools and utilities and everything you need,
uh, to implement, uh, the driver makes the life easier. For instance, uh, you need to compile shaders.
So, uh, compile is, uh, it requires a lot of steps and things like that, and well,
this provides like a, shape, compilation, compiler, um, and see that.
So, uh, do we talk about how miss, uh, uh, uh, uh, is, okay, like is, let's do a bit of history.
Uh, so miss is started in, in, start to work in,
was worked in, sorry, by Brian Paul, which is still contributing to miss, uh, in 1993.
Uh, the first release was in 1995, and it was, the real was, okay.
Let's take an up in jail, one point single application, and translate all the, the P.I.
to something like I can see in the exam, right? Uh, so basically it was translating all the P,
up in jail to cause text sleep. So basically, we can show the index server. So in this sense,
the first version of the miss was like a sober rendering, and the reason was because
I mean, uh, in the 90s, there was no GPUs available for consumers. I mean, the GPUs were
quite expensive, uh, devices, uh, it was like a silicon graphics, uh, devices were quite expensive.
So not for, probably, but allow people to deal and try up in jail in jail, uh, normal, uh, PCs.
But it's still not, uh, it's not, uh, sorry, it's not, uh, how about the latest? Then, in 1997, 1996,
I don't know, it's at the end of the year, the first, uh, GPU car in 10th floor in market, was the,
the 3 px blue. And, uh, well, it didn't, what, did you, what's the, you see up in jail,
but, uh, private library was called Blight. So it was, uh, quite, uh, interesting to,
basically, like with translate the opinion to a sleep was using the right opinion to use the
life. So in the sense, uh, this was in miss, uh, 2.2, and it was like the first popular
oping yell, uh, drive it, it was a serrated. So people can use oping yell applications,
I was real serrated. Still, uh, it was a wrap, I mean, the visa didn't access the hard work
directly, it was like a user, uh, a private library. And, uh, so yeah. Then, in 1999, another milestone
was the inclusion of the, which is the, the interface, which is basically allowed now, it allows
to, uh, access the network to the, to the hardware, it's only the, uh, uh, wrapper, um,
perpetrator, perpetrator, wrapper. And the first, uh, device was the, again, the 3d, f blue,
but, uh, I mean, with, I started to appear a lot of, of, of, of, uh, driver for different brands,
was the matters. Intel was for, for him, D for the, all 80 rage devices, uh, 3d labs. I mean,
work, what do you guys, I mean, so, uh, feel them. So, what was the situation now? Well, first
we were, uh, in 2008, sorry, 2008, this is the, it was like, we have oping yell, which have multiple
versions. We have multiple drivers, uh, oping yell, uh, is, uh, white, heavy, uh, API,
what you're, why do you, because you have a lot of, states, a lot of things. And,
I mean, you're a lot of, I mean, it's very, we need to work on the song. And,
probably a lot of, they are, all of the same problems in, it's rubbish. So, and I, in this moment,
it was, Gallium was introduced, which basically tries to abstract, uh, all the common parts
are requested in, uh, in oping yell. And just let it's drivers to a specific job, uh, that all,
that it pays, actually, to, uh, to the, to the GPU, but on the GPU. Um, now there's, I mean, all the
drivers are using Gallium, all of them. I mean, uh, no drivers, no issues in the, uh,
impending the oping yell, that's using Gallium. So, this, this is a very important, uh, moment,
of, of the history of Mesa. Then, well, uh, the next was, like, in 2016,
I, I purified, uh, the, uh, bull can driver, which was Ambil, which was,
implemented as a wife bed. Uh, it was in, uh, in Mesa 12. And, but sooner, I mean, after that,
it was, uh, it was, uh, it was, uh, it was, uh, it was basically the driver for the, you can drive for
Ambil details. Uh, uh, so, so, so yeah, so now, what happens nowadays? Well, the, the current
missile, basically supports multiple APIs. I mean, the, well, no are oping yell,
oping yell is in all their versions. But also it's bulka, but it's also oping yell,
and there are also older APIs, like op, uh, V8 API, which is a video series and a yell.
We have multiple drivers for multiple devices, like, uh, for instance, I use a
corpus, which is for Intel, uh, however, or the own C, which is for NV and wall, which is for all, um,
NVIDIA hardware, then, uh, for Males, uh, qualcomm devices, uh, there is for, uh,
uh, bracco, bbante, as I think, which is for the, basically, for I, uh, appeal M1 GPUs.
Then we have, also book, a lot of different book and drivers, again, for, uh, Intel, for, uh,
MD, NVK, which is, uh, in writing in rust, is for, uh, on the newer, newer, uh, for NVIDIA
hardware, uh, PNBK, which is, uh, for bali, uh, bracco, again, qualcomm, chronically, which is, uh,
the murka implementation for the appeal, uh, PN1 GPUs, uh, popular, and so on.
We have also, so we're editing, uh, which basically remains, uh, OpenGL, uh,
and Vulkan, uh, in case you don't want to use there, the, the, the hardware, uh,
hardware, basically, because maybe we don't have, uh, GPU, but you need to run
Vulkan application, in this case, and then pipe and lava pipe,
was, are the most efficient ones. So, uh, because there, because it's like a, uh,
reference driver, what you want to, and it's like, uh, first of all, and then
something very interesting is, are the ledger drivers, which are, like, drivers that
works on top of other drivers, for instance, the, well, the most common, well, no,
is sync, which basically, uh, influence OpenGL on top of Vulkan. I think,
interesting, because, for instance, in the new NVIDIA, GPUs, we only have NVIDIA driver,
which is Vulkan, but then you use sync on top of NVIDIA, so you get for free,
OpenGL drivers working on the GPU, uh, on NVIDIA GPUs.
Same thing that we have, uh, OpenGL on top of, uh, during, during 3D, for Windows,
we have Cosmic Reef, which basically, uh, supports Vulkan on top of metal, so you have, uh, uh,
you can run a Vulkan in, uh, any, uh, Apple device. And then what,
we see here, OpenGL, um, um, um, um, um, sort of, um, Vulkan on, uh, virtual machines, like,
for instance, venues is like, you can't run, Vulkan is a virtual machine, uh, it's oscillated
because the, uses the host GPU. There is also said, uh, OpenGL, which is, nowadays,
Rustysiel, uh, the area is, uh, that you have, uh, your driver, OpenGL driver is, uh,
implemented, which is using Galium, uh, you support the required, uh, uh,
implemented requirements, let you get how, hopefully, our PC driver. And then,
something, when you, is to flow, which is basically a tens of flow, late, delegate,
that, uh, lots to use, there's a flow to run, they have a little, uh, AI, uh,
application, uh, in this game, we have this, uh, MP, like the Roxia, P-Vanti,
and they're, they are, they're also based on Galium, so basically it means that you need to implement,
they think, uh, function to a Galium requires, and then you can use these devices to, uh,
to accelerate the, the, your, the, your AI work.
Now, uh, so let's see the components of this. Uh, this is, uh, simplified diagram, um, uh,
I just want to talk to the tells, uh, that's it, a lot of, uh, parts that are not,
interesting for this, I mean, for this stuff, because I mean, we have no, much time, um, so,
first of all, we have the OpenGL, and we can application, right? And the first thing is that,
these applications are not going to be linked against your driver, right? Basically, they use
all of them, and the post of the loader is to find the proper driver, and then, uh, hook the, uh,
directly, they make the, the operations, the OpenGL functions, to the specific driver.
They have the advantage that you run the pick, you create the applications, and you can,
will choose different, uh, GPUs to run your application, I mean, the, the, the, the,
rather, we choose the, there's one for you, but you can change it, or you have multiple GPUs,
you can choose, okay, I want to, with this, this application, like, this other, this application.
So, um, then, on the left, we have the, uh, the OpenGL driver, right? And as you can see,
is, uh, much more complex than they look on the right. And the reason is, because OpenGL is
for the 90s, it's a very, very old, um, API, and when it was created, it was like, um, GPUs were thought,
like, uh, machine states, right? And, uh, OpenGL was designed without in mind, and that design,
kept until this days, uh, and what I mean with, it's a machine world, just, basically,
means that for instance, you want to draw, uh, you want just to take a, uh, texture, sample,
I'll draw it in the frame buffer. There is no, I mean, that operation is not explicit in the
sense of that, you don't have a function to say, but you pass the texture, you pass the frame buffer
and the wrong, rather, the, the procedure is, you buy a texture in, in the OpenGL. So,
you need to think that, OpenGL is a steam machine, transitory, you just taste the word, now I have a
texture bound, right? Then you bind with another operation or another call to OpenGL,
you bind the frame buffer. Now again, I have another state where I have, uh, a, uh,
frame buffer and I have, uh, texture. Now, any present, uh, you're going to go into the, from
the moment on, we'll be, use this two bound, these two bound resources. So, now you say draw,
or whatever, or sample. And we, this, this, this, this, this, this resources,
you want to change the frame buffer, you need to undo another operation and they,
away, or another transition and other, OpenGL. So, there are a lot of states, uh, that need to be
carried. And the other problem is that, did you really openGL spec? I mean, like, this is,
happy to say, OpenGL will come in. In order to execute operation, you have to, uh,
much sound preconditions, right? For example, you want to sample a texture, you need to have a
texture bound because otherwise you can sample it. And the openGL spec is very,
specific about if you don't have something, the error you need to do. I mean, you can,
I mean, it's not like, okay, if, if something doesn't fulfill, whatever can happen, no, no,
it's say, okay, if you don't have this collision, that you need to write this specific error. So,
it's, it's, it's, it's, it's, it's, it's, it's, it's, it's, it's, it's, it's, it's, it's, it's,
because a lot of pages are just saying, the, all the errors you need to submit when there's something
that's in, uh, it's not fulfilled. So, this means that a lot of time, a lot of,
such as are spent validating that you can execute the operation and the portable errors.
So, a lot, again, all of these stuff is, it doesn't matter if you are running, you'll be,
I, MD, or the only, I'm 30 P.U. So, I mean, you need to do that. And all of this part is quite common.
So, that the reason, uh, why the half is, uh, quite complex, uh, part.
Yes, assuming it, I read, uh, there are like, uh, uh, a first layer, which is, this,
come from, I mean, from the older versions, this is like a very thin layer, which is,
basically like, it's the end, end to the point for the open-year, uh, API.
This layer is quite thin, uh, basically what it does is kind of, uh, validate that you can't
run the operation. I mean, all the conditions are, uh, fulfilled. And then, if it, it happens,
then, move to value, which is the, this, uh, has all the complexity of this state,
state machines, and things like that. So, the way it's work is like, when you run your driver,
like, it's driving, basically you, uh, I'm going to, uh, create a structure for, for
volume. I mean, this is, there's, uh, API to that, actually like that. And then, basically,
this volume provides like hooks that you need to just implement them. And these hooks are,
specific parts for your driver, uh, to, um, they're going to call, sorry, uh,
Gary is going to use, just when something, it really depends on your driver,
I also, sorry, sorry, JP, I mean, for instance, you are going to draw at the end,
Julie, to use the GPU. So, there will be a hook for driving when all the state machines and all the
things are managed. Uh, also the drivers provides like capabilities. So, they form, like,
what kind of features they support. So, Gary can decide what to do depends on their, uh, for instance,
is the way of, Gary, you say, okay, I'm supporting OPNGL, C.1, because my, uh,
back end, my user space driver is telling the, I support this kind of features. But at the end,
the mean work is done in, in the, in the volume part. Then in the right part, we'll have the
hook and drivers. I mean, this is, is much more simple, because hook and listen, what an API is,
is explicit. And, uh, there is no validation in the sense that, I mean, API also helps
on requirements, like, you need to help this, um, this, uh, fulfill this requirements in order to
execute the operation, but they will partner and they say, if you don't do, whatever can happen.
I mean, if that not date to validate, it's, the, the user need to validate, ensure that everything
goes, uh, is, uh, is correct. So, it's hard to, you have to, you don't support that, you can,
um, uh, happen that you can attach or if you reset or if you have, or whatever. I mean,
fortunately, I mean, uh, it's, what difficult to implement, uh, implementation and no half errors.
So, in the case of, uh, Vulcan, the recent intermediate layer, which is called, um, the validation layer,
which, uh, sits between the Vulcan role and the Vulcan drivers, basically, what it is like,
when you call a Vulcan, uh, function, this validation just intercept the, the call and basic
tracks all the states and it's ensuring that you fulfill all the requirements and it's not,
it will tell you, okay, you are in, uh, fulfill this requirement and if you, even, uh, tips
about, okay, you are doing this, but it's not very performant, say that. But the, the point is that,
all these validation things is not done by the Vulcan driver. So, it's just implement,
faster when you're running in production, uh, the applications.
Still, I mean, uh, uh, there is some parts that are like common for instance,
still, you need to create like a dispatch table, which basically is like, uh, uh, the, when the
Vulcan function should, which function should call from the driver itself. Uh, I hope all the
Vulcan will be changed, uh, but, uh, change, or the calls, uh, for instance, uh, uh, there are
like, uh, common for recycling, but we can't raise the Vulcan buffer. So, uh, the Vulcan run
times utilities, basically is like a common service, uh, it's in quotes, uh, it's not a service,
uh, what service. But, uh, it's something that it really can use to, uh, make it through life,
is sure for instance, I don't know. Uh, I'm thinking now, uh, for instance, time nine
semaphores, which can be provided through the Vulcan. So, the duty, but that, if you don't support
that, it can be prevented using this normal semaphores. And, uh, so, yeah, so you can do that.
Um, nowadays, I mean, all the drivers are using this, uh, this Vulcan run time, because make,
really makes the life easier because, uh, quite a lot of little things are handled by this
one time. Um, then we have the shaded compilation, because again, all the modeling applications
need to compile shaders. Uh, so this is the part that does receive a GLSL server, or
SPRV, you already see Vulcan. And, uh, the transferring to the final assembly code suitable for your
GPU. Uh, again, there are some parts, common to all the drivers, but the partners,
specific to the Vulcan, because the assembly really depends on each GPU, which GPU has its own assembly,
and even for the CPU, depends on the formula, there are some changes on, and things. So, basically,
this is, uh, what we said that, we will see that later in a more detail. And then, once we have everything,
we have the, the kind of part. So, um, in this case, basically, uh, there is like, uh,
a library, which, uh, used to, um, talk with the kernel drivers, which is called,
let the run, the run, why the render memory, I'm a large manager. And, uh, so, yeah, basically,
when your driver, the Vulcan, or, or, or, or OPINGL driver, has everything really to be a
circuit. It's like, uh, everything, you know, memory, uh, basically, some sense that to the,
the, the RAM, uh, which is in the kernel, and then each of these, uh, speak drivers,
basically what they do is, uh, is, I mean, do, it's, I mean, do it, it's calorie in the
domain. They just need to be secured by the, what did you build? So, basically, it doesn't seem like,
okay, let's, uh, scale the job, prioritize, touch them, write, uh, register or whatever. So,
they'll job as a starter, what did you, uh, monitor, when they don't, if finished, to tell the user
space driver, okay, I'm finished, you know, it's waiting for a signal. Uh, if something wrong happens,
which a lot of time happens, we need to reset the GPU, do that. I mean, a lot of things that are,
required to do to find a circuit this, this, uh, the job. So, uh, I think it, I mean,
why we see the components, we can go a bit of more detail on the, what happened behind the
components, when you call a function, an open-gel function or a broken function, what happens inside
this, okay. So, first of all, or for, I'm deleting a lot of details as a military, so I just like,
simplify a lot of the code. I would simplify a lot of the two chain, all the chain, all the calls,
because a lot of, I mean, a lot of calls. So, yes, get, give you an idea of what is happening here. So,
this is the, the, for the way we call, you know, draw a rice and the lower, uh, find the proper
driver, basically, this is the first, um, function, the, at the point for this operation, which is called
B-set draw a rice. And as I explained before in the literature, this is the analysis of the
state's, right? And validate that, uh, since, uh, our correct, if something is not correct,
the letters are not correct. That's a level, and I'm in return. And if anything goes fine,
then it's not the, the draw itself. Uh, this draw itself is still the, in the, in the, uh,
measure layer, but again, it does several, uh, set some, several, uh, reach to something like that,
uh, structure, sorry, and then it calls the state tracker to prepare the right, and
call the draw value, which is basically, uh, is, uh, is the, in the California, it's in charge of,
uh, a student, the draw. Again, the draw value, draw a tough thing is, I call CS, CSO draw, uh,
video, CSO CSO is an object that keeps, uh, the, uh, a constant state of it that keeps the states
on the full machine, and, uh, yeah, and basically calls that. This, in now, is everything in, in
Galin. No, I want to go ahead, because it just check the, uh, the stack is like, uh, 20 calls,
and I want to show 20 funcels. Okay. So, we'll be with that. But at the end, it ends up running the,
the, the function of the reflection of the specific GPU, right, and in, in this case, I will show
in the case for the, with the leak, which is the graph, um, the OpenGL, uh, drive for the
Raspberry Pi 415, uh, uh, from the moment on, it's driver, handless operation, uh, really
depending on the GPU. So, it driver has different, that influencing different ways, um, and I
want to show the, uh, how the, the OpenGL, sorry, how the visually drive it does. But more or
as the, the idea is that all of those drivers will, like, at the end, like, um, they'll tell me,
what's similar, all of them is like, great, a bunch of common streams or jobs, which are basically,
like, a lot of structures, where you configure the, you put the values in the structures,
that contains addresses, um, you contains a simply called, a lot of things, that are the things
that GPU configures the GPU, and then put that in a buffer memory, and this is going to be
dispatched to the kernel, because that's, what GPU is going to read, and I see, do this here,
so, so you can, or things there. More is, I mean, I mean, of course, each driver has, it's all
structures, but at the end, it's not more or less the idea of all the, all the drivers.
For the case of Vulcan, the indication is, uh, decay, CMT draw, but that's it, much more simpler,
and almost the call is deleted, I mean, the entry point is deleted, uh,
provided by the, provided by the hardware, in this case is the V3V, so,
unless you have, uh, the disvalidation, uh, calling the V3V to be 3D, the CMT draw, sorry, is, uh,
very fast, there's no high operation of that, so in this case, it's very simple, and then you see,
we start to draw, I mean, there's no validation at all, yeah, uh, again, I'm not going to show how
we, this keeps continuing, but again, it depends on the hardware, but at the end, as this is the
same hardware, like the, sorry, this is the more, for the same hardware at the previous one,
more as the, the outcome will be similar, I mean, we like a bunch of structures that put in
a mail in the buffer, uh, I simply call for a sayers, and then we'd have to, for the review,
to be this, to be executed. Now, before we draw, uh, we need sayers, I mean, as I said before,
the, the start-up contains a share, I simply call it, and uh, you use OpenGL, the shares are
basically writing in GLSL, and you use Bucca, is it working in Spielbeak, which is how much
load level, uh, binary, uh, language, which is basically created from GLSL, or other high, high
level, language, uh, by the end, but again, it, well, another, you need to, uh, compiler, that, to
generate a final, uh, assembly code. In the case of GLSL, this like, uh, and this time where
there is a parser, you solve MISA, the parsed code, generates an intermediate level, uh, language,
and then that is compared to, to, to, to near, uh, in the case of PIRB, it's basically just
compared to, like, a match, one, one, two, one, that convert GLS, it's already split it to near.
Near is, uh, language is by MISA, which means, uh, new intermediate, uh, representation, um,
which is, uh, I think was introduced in 2015, and this, the, the language, this, uh, used, uh,
uh, all the drivers, mostly, and this, the, we, was designed for the GPU, so much is very
well to GPU, and, uh, so it is that, you transform, that, that, uh, GLSL or SPB to,
Thisよう is, a sample of Gls, a piece, and these near is they're performing in, in S, S, S, S, S, I,
form, where a single is a, uh, Sigma began, significant static, uh, well, normal, the, the, the chronicle,
But, um, the thing is that this, uh, this, in the form, that you can apply a lot of
optimization, that are, very well-known, from the compiler wall, um, you can apply a lot of the
socializations, and samples like, like you know, Algiere, like, uh,
of the mission.
And if you have to appreciate the say A plus A, you can simplify that as twice A, it depends
on how much the faster or not, come as a dispersion elimination, let's call the elimination
like if you have a code that is not going to be executed, it will lose that.
I mean, all those kinds of optimizations are applied in this near step.
These are applied logonins, basically logonins is replacing an operation by which is more
accomplished by a different, more simpler operations, and as somebody's for instance,
if you have a, you need to compute the sign of a number, and you're however, let's
support the sign by itself, you can replace the sign by a Taylor expansion, you see more
simple instructions.
So, the logonins is, do that, and there are quite a lot of logonins, they can be applied
on the near, and a lot of them depends on your hardware, I mean, that's the reason why we
have this capability for instance, that is, that you can have a support this, okay, then
like I, as you could just, this near operation, otherwise I need to lower and transform
that.
So, as I said, these common for all the drivers, although there is a benefit for this
kind of optimizations.
So, you have any automation, all there will be, get this automation for free, and then
when you have near, we still need a sample code for GPU, and basically what we do is,
we have an optimal near, was a past world basis, and say to the specific driver, because
now for now, for that moment, only the drivers know how to transform that in the specific
GPU.
I said, be called for that GPU, again, I'm sure we, in a sample with the, with the GPU for
the run by free, I'm sorry, for I'm 5, in this case, the near is converted to another
intermediate language, it's called beer, this beer is more sweet, more, more, more, it's
more for the GPU, I mean, this is instructions that are more than, the ones that have
a support, okay, and here we do more de-visations, very specific to the beer, we do
a scaling, we're already in the strategy, let's say that, and they'll get optimised beer,
and then this beer is converted to QPU, which is basically, this is the, was simply of
the, for the run by free, run by free, which basically it has two, like two lines of
issues, like two, one for multiplication and other for automatic operations, I can
run in parallel. So this is very, very specific to the Raspberry Pi 4 and 5. Again,
you go to another device. It's quite different. For instance, in the case of AMD,
it uses echo, which is the back end compiler. There are other cases that are using
given lvm, this, well, no, they use that as the intermediate language and the
operator of programming. This is completely depends on the, on the, on the, on each other
appeal. Okay, now we have all these jobs and common lines of the 74. We have now the assembly
and I need to sum it to the, to the GPU. As I said, this, uh, don't, we, uh, slip the RAM.
Basically, what it does is HTTP, we take the results, it sum it to the GPU, which, basically,
sometimes means, uh, for instance, in case of all the Raspberry Pi, it means that, okay,
I'm going to writing a register where the others of this buffer and write another register that
says, okay, start to get, uh, the security job and there's another register that says, when the job is,
it's finished or not. And there are signals to say, okay, the job, there was like a interrupt soon,
because it was a crash or whatever. This everything is managed. The newer GPUs, for instance,
are able to scale in, by, through Howard, like, have the components to scale the jobs,
through Howard's, but at the end, uh, everything is executed until you get these, uh,
beautiful, triangle and screen. Okay. So more races, this is a simplification of,
what have we behind the cortex, you know, when you run the open gear, or we can, um,
now, from a point on view of, uh, of the priority self, how to test and continue, how we test
the critical things, okay. So basically, we use the GitHub, uh, the red letter, we love where we,
basically report fixes, and report pieces, fixes, or sorry, patches, or we would,
basically, my requests, assuming, the rap, it would be review with my people, uh, by, by,
very smart people, and they can't, I said it, I said, okay, this is fine, I said it, or maybe
is, which is multiple times, it's okay. You need to fix this, and if it's not, or maybe,
you need to, for instance, I may be a little, I may request to fix something in my driver, but then
that change is broken, not the driver, so it will say, okay, be careful, there's really that,
because you are breaking other drivers, so you need to review. So this is an iteration process,
and when everything is, is a set, uh, the my request is not directly, uh, merge, but it's
submit to a main sign to the March board, and basically what March board is like,
you have the key, a key of my request to be merged, and what it does is, it's the first
memory quest, we'll erase this against master, sorry, upstream, the main, um, to the top, then
wrong, uh, several tests, and several was fine, merge it, okay, it's nothing, it doesn't go,
reeds, until, okay, something is wrong. Next, let's more request, and so on and so, why does that,
because if you try to do the more request, all together, maybe this work, this work, but
together, we fail, so there's a very wide, is, is executing one by one, okay, and how, this is,
how much is testing thing, well, the first thing is that if we rebuild all the tests, all the drivers,
that are affected by the memory quest, sometimes there is a memory quest that touches for
instead of the Raccoon code, so that is not going to affect the worst of the drivers, because the
Raccoon is going to come, but for it, you touch something about near itself, this need to be
issued by all the drivers, so all the drivers need to be compiled, and then, uh, basically, it
should use a lot of different tests with, basically, it should use a pilot, which is a set of, uh,
community, test feed, uh, for OpenGL, and, but we also run OpenGL CTS, a multi-CTS,
which are the conformance test feeds for, for the level, running multi-CTS can take out of
hours, okay, and we don't want to have a, a lot of hours to, until something is merged, so,
well, we don't, it's out of different, uh, actions to make the things work faster, for instance,
instead of running one test, like, we can see the wrong one test, uh, it's time, in, in, okay,
we run like, for the, we already have four CPUs, four cores, we run four tests in pile, which make
many things faster, then we distribute the institution, multiple GPUs for instance, for the
Raspberry Pi, for instance, we have eight or nine or ten Raspberry Pi 3s, so we run, uh, test,
the subject, affects the, the Raspberry Pi 3, we distribute all the stuff in all these, uh,
devices, so they are only in parallel, and then we also run a subset of tests, so, more
everyday is that to have everything, a security in 15 minutes, more or less, right, and it's
happening, I mean, it's a sex, it will match, then, of course, every night, we have one, like, uh,
nightly pipeline, which basically is, okay, now I have time, we are not blocking all the
memory quests, that's also why we run these, uh, uh, uh, in 15 minutes, but so, let's, let's
run all the tests, so in this case, we run a more comprehensive test, for instance, we run,
maybe the full CTS, uh, you can't take maybe one to hours, but we will have time, what do we
do with this only night, on the night, and, uh, and if everything happens, well, uh, people
we see the next day, okay, maybe my change passed there, but it was a very specific corner
case of the test that I did it past, well, we need to work on all the fix, and well, that's all,
so, uh, as conclusion was, Messiah is, like, basically a translation between, uh, different
RFCPIs, and the hardware, uh, for the case of OpenGL, it provides all the, uh, full steam machine
trucker and multiple utilities that are implemented, uh, to implement the, the, the drivers that
helps to implement the drivers, uh, it's also provides a very comprehensive set of tools, uh, for, uh,
compile shaders, provides a lot of, uh, optimizations, uh, and, uh, helps, helpers just to get the final
assembly code, near, is the, the common language used for all the, all, most of all the drivers
nowadays, and then, all the work is submitted to the GPU, is a lip your RAM, okay, so, I hope,
you have enough better idea, not deep, but as the, at least some real, what happened,
mechanical, with, with, with Messiah, and the hope that you can start to continue to miss
a video on, not like that, and that's all.
Who is this?
Why are they, they are, uh, it's only for the sake, right, okay. Yeah, so, I'm not walking on the sake,
so let's take this with a grain of salt, but I think one of the problems is that, um,
as I've implemented the full OpenGL, uh, API, and the OpenGL API, not the, yes, but the,
the API is thought for desktop devices, but mostly the Apple M1 GPU is like a big mobile GPU,
so, there are a lot of features that are not, um,
support by the hardware, so I didn't do a lot of things to that, and then on top of that,
is that most of the things were quite robust in engineering, because there is no documentation
of how to put on the GPU, so you need to do a lot of, uh, like tests to just, uh, to just to,
uh, fill out how these works, which is, I mean, I mean, fortunately, in my case, I don't do that,
but it can be very, very challenging, a lot of experience, uh, do that. Fortunately,
the person that is working on the, uh, suffix, which is Alyssa, uh, she has a lot of experience,
because she was, uh, doing Rochigi for all the drivers, so she has a lot of knowledge,
how to address this, but yeah, they, they, they, they, they, they, they more complicated parts.
Do you have any particular advice for someone who's been working for a while, but would want to,
wants to actually start concentrating on something?
Yeah, well, I think, I'm sorry, uh, yeah, if there's a bias for someone that, uh,
would like to start to continue to miss, all right, this is the, yeah, well, yeah,
the thing is, they are a miss that are quite of several issues, um, that basically they are,
like, after going to, like, easier, you can start to do that, so that, I would start to do that,
do that. Then, uh, another bison is that is easier, usually, uh, to start with how
that you have the documentation, like, if you need to do things, and then you don't have the,
documentation for the however, it's quite complicated. So for instance, in this case,
Intel, however, has its public documentation, it's, it's a complete device, but it has
more communication. And now, of course, asking, because, I mean, the people, the community,
would like to get more continue to some, people, the community are very nice and polite. So,
I think, uh, if you have doubts, you can ask, there is, like, a IRC channel, you can ask questions,
so you can, uh, submit them. So, yeah, basically, it's just a matter of,
starting with something simpler, you have the code, you can check the code,
you can do experiments with that, you have this, this, you'll see what happened to the
ID so on that, you have GDB or whatever to do test. So, yeah, basically, that's, uh, my advice,
just to start, basically.
Yes.
So, lift the RF contains, uh,
I'm a specific staff, and there's also a lot of things stuff in the space,
you just make both. Yeah. How, how, if you have something that's specific to your team here,
how do you decide to do it? Yeah, the thing is, uh, in the,
Libby or M, you have, like, common functions that are common for, for all the, all, okay.
In, the question is that, um, Libby or M have a specific, uh,
function for the power. So, basically, how we basically manage because there are, like,
multiple drivers and multiple different structures, right? Okay. So, yeah, basically,
Libby or M is, like, like, a common part, this function that are common for all the drivers,
basically, like, for instance, creating a memory, as I remember, it's like,
it's more or less the same, right? But then it have backends, like, different backends.
And these backends are embedded with IOCTLs, where you pass, like, uh, operation, okay. And then,
the structural whatever. And this is very specific for the, for each driver. So, it's the
driver. Uh, when the lost Libby or M actually loaded the DRM, for its own backends, for
its own driver. So, for instance, when we use, uh, the Raccoon, Libby or M is like, a Libby or M is
large, uh, the room within it. You, be through the, I think of something like that. And I
contains the IOCTLs with the code specific for the, for the UPSO. Now, I know, as
it's basically the driver, the user space driver knows, okay, or I want to submit this job.
This is basically the API need to be IOCTL with this, but the structures are everything I need to
know is one document. This is like, is, like, uh, in the, in the, it's been for this, for this, uh,
your M. So, it's like, that, like, two parts on the Libby or M. Come and check that, I understand,
but, sort of, the API between the user space, but, and, look, DRM is potentially, it's got
overlapping bits for different hardware, but they can, they can have, like, a different API.
Yeah. Okay. Yes.
I mean, for some operations are the same. Sure. It's like, is, you have, like, DRM.H, which
is a common function, and then you have DRM, it's last NBK, point H, or DRM, it's last, uh,
as I say, point H, whatever. And that's the specific parts of the, I mean, the first is,
quite similar, because they are, or they are IOCTLs, which is basically the common way of, of,
communication with IOC, but yeah, the, why, the, what service offers really depends on each
hours. So, a lot of time, we need to add new, uh, IOCTLs in DRM, when you need to, uh, use, speak, a
new, a newer thing that, you need to support for the current part. So, you add new IOCTL, and that's
what. No, there's no. Okay. No.
much, but the question is, how moved forward?
Yeah, so in regards to, like, statistics
about the failures of magic wastes, but it, oh.
Yeah, I like, I'm not sure, but it's like,
Jesus, like, put it to, would it be common to fail those tests?
After this, like, can I run it with opening,
I've been expecting this with invisible parameters,
basically because I think that's how it comes to.
I'm actually getting the question correctly,
but I understand that if something fails,
when you're only going to request this pre-testing thing,
something fails that, if you can do something,
the local, you mean, the local computer tool.
I think she's going to move between words of Google first, first, first, first, first.
OK, so I mean, yeah, I mean, sometimes you are working, everything works fine, you are
competitive, you submit to the American, to the, to the, to the, to the, to the
miracles and there's something else. OK, so I mean, really depends of, I mean,
sometimes it's obvious what is, what is happening, really depends, but sometimes
it's really depends, I mean, maybe the failure always fails in a speak of driver
that you don't have this driver. And I mean, I mean, you can't check the code and I guess
what is happening, but sometimes when we end up doing this, I ping person, the person
might turn around this, OK, I do this, and this is failing, but I'm not sure why, maybe
you can take a look at that, because you don't have, you don't have all the GPUs in your
account, so other time it's like, you guess, OK, maybe this, this, this, this is the
problem, and then just, basically, you can basically sum it up lunch, and then force the GPU
to execute this, this code, it's happening a lot of times, so you execute, using the CI,
the OMSCI, you execute the test and say, OK, yeah, now it's fixed, now I can, I'm, I'm
request, and I see that that, I really depends on the kind of errors on things that
I'll see that.
How difficult things like, how can make your life, because it obligates a lot of things ahead
of time, I'd say, it's less likely to question the driver because something like
wrong, how does that affect, like, how much you have to be super careful when doing the
driver course, when you're talking about things that nothing can be validate.
OK, so basically, it's like, the question is, how much life is more complicated in
vulca, because if you're a result of things, and you do that in vulca, right?
OK, actually, it makes things more easier for multiple reasons, OK, first, yeah, you don't
need to validate anything, I mean, you assume that thing is correct, if something is wrong,
the point is not your size, in the, the burrow per side, unless the requirements are
fully, and it still, something is wrong, OK, so in that case, it's more simpler.
And then the vulca API, which basically, what do you think, what do I do, what going to,
to implement, I mean, is big, it's very, very robust, but at the same time, it's more
near to what, what actually the GPU is doing, in the case of OpenGL, if you want to
look, since really fast, due to a lot of solutions and tricks, I feel like that, and part
of it, and are done, by going, that's why it is very complex, and the part needs to be done
in the driver, so in this, in the sense, I mean, the thing is that the OpenGL driver is not
the same like, the or how or what the driver, due to a lot of, of, of, option, a lot of
implementation, so in this sense, when you're ready to call in the vulcan, I mean, I understand
that writing vulcan application is more complex, because you need to write the whole
bit Bible, but when you see the functions, it's OK, it is more simpler to what the GPU
is doing, so I don't need to, and the kind of assumptions are, or how I going to
up study is comes in, with input pain, to implement this in the media, so in this, this
is in more simpler, OK, I think that's all, OK, thank you very much.