[GSoC] GPU acceleration support

Hello,

I am Kethu , CS undergrad student. I have read the GSoC project ideas have found “GPU acceleration support” intersting.

I have experience in c++ (built a 2D game engine), computer graphics and OpenGL (learning from past few weeks) and possible closely relevant courses that I took would be OS and CUDA programming.

Though I don’t have any experience in OS level driver development, I am interested in graphics and GPUs. So what I wanted to ask was would it be a really complex task to handle, if not where can I get started on this project

Thank you

5 Likes

The work-in-progress Nvidia driver seems to be the model for how GPU drivers should be written: Haiku ❤ Nvidia (porting Nvidia driver for Turing+ GPUs)

You can test it right now if you have a compatible Nvidia card. From there, you will probably find bugs and missing features, you might consider supporting AMD cards, etc.

1 Like

Not really. It works that way because nVidia moved most of it’s driver to GPU firmware (GSP). Other cards don’t do this (yet?).

No, most important reason is that NVIDIA released their open-source kernel driver to be portable and OS-independent. You do not need to care about its inner workings, does it use GSP or not. Nothing will be changed if NVIDIA released their non-GSP kernel driver as open-source from Haiku developer perspective (except earlier GPUs support). Unfortunately almost all other open source kernel GPU drivers are hard-coded to Linux and do not care about portability to another OSes.

They do. GPU management offloading to dedicated microcontroller on GPU itself is a new trend that is used for ARM GPUs for example.

3 Likes

Take a look GitHub - GatoAmarilloBicolor/AMDstracted-GPU: This is a work with some different AIs reworking and abstracting the AMDGPU driver from Freebsd

Does it really work on Haiku? Any screenshots?

2 Likes

It looks like AI trash code (not works for me, including dependencies mentioned there)

2 Likes

Which means porting the driver is way more work for other vendors. That was my point.

Anyway, back to the topic at hand.

I believe this is not enough to successfully complete this project. OpenGL and CUDA abstract a lot of things about how GPUs work, and you will use very little of that knowledge when writing the driver.

Not to discourage you though, an indicator that you can handle the project would be a contribution to an existing driver. Either enabling new cards or adding support for hardware cursor would give you a glimpse of required understanding and let you decide for yourself.

What GPUs do you have available to test?

2 Likes

I have rtx4060

Then this should work: GitHub - X547/nvidia-haiku: Haiku drivers for Nvidia Turing+ GPUs based on official Nvidia kernel driver sources, Mesa NVK Vulkan Driver and Mesa Zink OpenGL driver

1 Like

No r600 or the mesa driver yet, but it compile and works in part.

I tried making a GPU acceleration idk don’t know if it work and don’t really have nobody that want to test it out

@X512 do your development on Visionfive 2 include GPU support?

What do you mean by “works in part”? What is working and what is not? Can you describe it by your own words without using AI tools? Many statements from readme are definitely false and misleading.

2 Likes

No, GPU is not supported in my Haiku VisionFive 2 port.

Yes i will try to update the readme later with no IA, the driver compile, there are some test made for it on the code, i try it on my very old radeon gpu r600, the amd driver compile but the r600 for mesa cant compile yet, there are some scripts to try it … and yes it is a disaster with the ia documentation.

In theory, the driver unify all amd and radeon driver in an abstraction, i use the agents antigravity, amp, opencode, and gemini cli, and some references here to COPY or recycle methods or reinterpretation on all the references from the freebsd drivers mostly, copying the nvdia abstraction structure with the ai.

There in the scripts folder you can find the builder for haiku.

There is an open-source front-end called Zluda for accessing Cuda cores on AMD’s open-source ROCm environment and drivers. Zluda is written in Rust and the Haiku port of Rust is incomplete, so your milage may vary. Also, ROCm is undergoing a migration to a mono-repo and uses a custom build system called TheRock.

Intell°s drivers progress are on frozen point. DRM is non-existent but it would help.


:white_check_mark: Works well (fully supported)

Generation    Chips                   CPUs
─────────────────────────────────────────────────────
Gen 2-3       GMA 900/950             Pentium 4, Core era
              GMA 3000/3100/3150
              GMA X3000/X3500/X4500

Gen 4-5       HD Graphics 2000/3000   Sandy Bridge (2nd gen)
              HD Graphics 2500/4000   Ivy Bridge (3rd gen)

Gen 6         HD 4200/4400/4600       Haswell (4th gen)
              Iris Pro 5200           Broadwell (5th gen) (wierd, boot still requires safe-graphics mode)

Gen 7         HD 510/520/530          Skylake (6th gen)
              HD 620/630              Kaby Lake (7th gen)

:yellow_circle: Semi-working / recent additions

Gemini Lake   ← added Oct 2024
Ice Lake      ← added Oct 2024
Tiger Lake    ← partial, in progress (10th/11th gen)

:cross_mark: Not supported yet

Alder Lake    12th gen   ← no driver
Raptor Lake   13th gen   ← no driver
Meteor Lake   14th gen   ← no driver
Iris Xe / Arc            ← no driver


Important note:

1 Like

I think not for you :slight_smile:

1 Like

I don’t know where that info is from, but my laptop with Intel Xe seems to be working as good as you can expect from the intel_extreme driver: modesetting and brightness control.