install AMD opencl drivers from ubuntu repo#387
Conversation
|
Thanks @blamechris. This is currently still a draft, and just pointing to that fork for testing. See #385 (comment) |
running sibernetic before this code change (doesn't detect gpu) ``` Configuration has been loaded CL_PLATFORM_VERSION [0]: OpenCL 3.0 PoCL 5.0+debian Linux, None+Asserts, RELOC, SPIR, LLVM 16.0.6, SLEEF, DISTRO, POCL_DEBUG CL_PLATFORM_VERSION [1]: OpenCL 3.0 CL_CONTEXT_PLATFORM [0]: CL_DEVICE_NAME [0]: cpu-haswell-Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz ``` running sibernetic after this code change(detects the gpu) ``` pci id for fd 4: 10de:1f99, driver (null) pci id for fd 4: 10de:1f99, driver (null) CL_PLATFORM_VERSION [0]: OpenCL 3.0 CUDA 13.0.98 CL_PLATFORM_VERSION [1]: OpenCL 3.0 PoCL 5.0+debian Linux, None+Asserts, RELOC, SPIR, LLVM 16.0.6, SLEEF, DISTRO, POCL_DEBUG CL_PLATFORM_VERSION [2]: OpenCL 3.0 CL_CONTEXT_PLATFORM [0]: CL_DEVICE_NAME [0]: NVIDIA GeForce GTX 1650 ```
|
@pgleeson While this patch successfully equips the container to utilize both NVIDIA and AMD GPUs, it introduces a challenge regarding how we pass GPU device arguments to Docker. To grant the container GPU access, we need to pass hardware-specific flags, which behave very differently on mismatched hardware:
Because of this strict failure condition for AMD, we cannot hardcode a "one-size-fits-all" Docker command. The arguments must be dynamically generated based on the host's hardware at runtime. Considering the number of scripts we currently maintain that directly invoke docker run, injecting hardware-detection logic into every single one of them would be messy and non-ideal. Would love to get your thoughts on the best way to handle this. We may need to look into consolidating the docker run logic into a single wrapper script to avoid duplicating device setup logic across the repository |
use amd opencl drivers(mesa based) from ubuntu repo instead of installing from sourceforge
Closes: #385
tested by running sibernetic and simulation is rendering correctly.
ow@2b6d2f0ccfe5:~/sibernetic$ ./Release/Sibernetic -f demo2