-
Notifications
You must be signed in to change notification settings - Fork 797
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No OpenCL platforms reported #6951
Comments
One day <3 |
Any update here? |
Check for any update |
Yes, OpenCL is a crucial feature. We're putting together a native Linux box for testing next week due to this. |
This would be wonderful for my team. We have considered rewriting everything in cuda, but that has major downsides. Until OpenCL support is released, we are stuck dual-booting. |
YEP |
hope for any update |
1 similar comment
hope for any update |
In theory OpenCL/WSL2 may now work for Intel Integrated Graphics GPUs: https://devblogs.microsoft.com/commandline/oneapi-l0-openvino-and-opencl-coming-to-the-windows-subsystem-for-linux-for-intel-gpus/ Trying a few days ago, I didn't see any CPU platforms get registered (I am on AMD for CPU) nor any GPU (I am on Nvidia for GPU) |
any info about whether NVIDIA GPU computing is planned to be supported for OpenCL? |
Any new info a year later? |
Better late than never, right? |
Still waiting |
same issue when trying to run a boost example program
|
I should have checked this before wasting a whole day trying to get it to work ... still waiting |
same |
I found the solution, as it is going to be usual from now on, by asking ChatGPT. To set up OpenCL on WSL, you can follow these general steps:
After completing these steps, you should be able to use OpenCL on WSL. Note that the specific steps and packages required may vary depending on the Linux distribution, GPU hardware, and OpenCL implementation you are using. |
@jorgevazquezperez is that proven working or a hallucination? |
Proven working. It is needed to note that I have only achieved it with the CPU, but I am in process to be able to do it with the GPU. I attach you a picture with the results and I will keep you updated with the GPU version (as I imagine that it is the one you all are looking forward to). If you need more info just tell me! PD: I am using python with the pyopencl library. |
Yes, afaict CPU and integrated Intel GPU should work, but unclear if/how Nvidia |
Just like any operating system, including Windows, you need to configure and install OpenCL in order for it to work. It doesn't come preinstalled. My last two posts clearly illustrate the following points:
OpenCL is available in WSL2. I don't understand the problem you're facing since there are solutions available. |
The very reason this issue thread exists is that CUDA and AMD runtimes for OpenCL do not work on WSL2 neither natively nor via POCL. We already know intel platform has been supported for one and a half years, and it has been discussed multiple times already in this thread, but this does not work for either Nvidia or AMD GPUs. |
And being more clear in that - when the Nvidia/amd hw works on native Linux partition, so wsl2 is the missing part |
Official Intel Instruction for OpenCL in WSL2Quote: "With Microsoft* Windows Subsystem for Linux 2 (WSL 2), you can use native Linux distribution of Intel® oneAPI tools and libraries on Windows*." Official Instruction for Nvidia CUDA:Quote:"The latest NVIDIA Windows GPU Driver will fully support WSL 2. With CUDA support in the driver, existing applications (compiled elsewhere on a Linux system for the same target GPU) can run unmodified within the WSL environment." AMD is a little tricky but will also support OpenCL in WSL2 with ROCM/HIP stack. And other people experience with OpenCL in WSL2: So, you now have CUDA, Intel, and POCL option for OpenCL in WSL2. I hope this would help. |
@gyferlim Have you even read the things you're linking? CUDA has been supported on wsl2 for a long time, but that is not what this issue is about, the Nvidia OpenCL platform does not work and neither does POCL with CUDA devices. And there is nothing suggesting otherwise in any of your links. In the link for instructions for ROCM and AMD the first reply is someone literally posted a list of the errors that the guide spits out because:
And the link about someone using OpenCL on WSL2 is using the integrated intel GPU, which we already know works. So no, I am afraid it does not help. |
It's about getting Nvidia OpenCL to work in WSL2, not CUDA Runtime or AMD HIP/ROCM, is that correct? Please accept my apology if I misunderstood earlier. I remember having CUDA and AMD running as OpenCL in WSL2 in the past. However, due to driver changes, I had to reinstall Nvidia, which resulted in it breaking. Below is my clinfo with the AMD platform running. Unfortunately, both my RX470 and RX580 died, and I don't have another AMD card to try and show the result.
|
Yes, that is still not showing Nvidia <> opencl <> wsl2 |
Since NVIDIA OpenCL ICD is built on top of CUDA, it's a bit hard to understand why OpenCL/NVidia is not supported under WSL2 when CUDA is functional. Clearly it's not a technical issue but a commercial issue. Please correct me if i'm wrong. |
I manage to get Intel OpenCL working in WSL2, I think.
|
This issue is about Nvidia cards not being shown, not intel/amd |
The title of the issue is simply "No OpenCL platforms reported" - not "No NVidia OpenCL platforms reported" |
The issue is about Nvidia cards not being shown. |
edmondium@LAPTOP-1Q9H40K6:~$ clinfo |
Looks like an Intel cpu/GPU again ^^^^, so same status |
Has anyone gotten OpenCL working with Edit: If you use a recent enough version of Ubuntu (i used 24.04, which is bleeding edge), you can just (base) root@cfbb31c89f97:/# clinfo
Number of platforms 1
Platform Name Portable Computing Language
Platform Vendor The pocl project
Platform Version OpenCL 3.0 PoCL 4.0+debian Linux, None+Asserts, RELOC, SPIR, LLVM 15.0.7, SLEEF, DISTRO, POCL_DEBUG
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd cl_pocl_content_size
Platform Extensions with Version cl_khr_icd 0x400000 (1.0.0)
cl_pocl_content_size 0x400000 (1.0.0)
Platform Numeric Version 0xc00000 (3.0.0)
Platform Extensions function suffix POCL
Platform Host timer resolution 0ns
Platform Name Portable Computing Language
Number of devices 1
Device Name cpu-haswell-AMD Ryzen 5 5600X 6-Core Processor Note that this is still not a solution for |
@alex-ong I have it working in WSL2 Ubuntu 22.04 without pocl on a laptop with a 5800HS, but for the intel platforms to be detected I have to source the setvars.sh script from the Oneapi installation. I installed it a long time ago so I don't recall the details of how I installed it. But I don't remember having much trouble with it. |
I was able to run OpenCL on NVIDIA on WSL2 via PoCL I took the following steps:
1.1. Now you can run
Then run On successful build you can try if it works without installing Also My
And some benchmark (i dont know what these numbers means, good or bad)
|
@Bossach Now this looks promising! PoCL too seems to have come a long way since I last checked. I might give it a try at some point. |
This worked for me. I installed it but the arguments aren't passed by default if I do clinfo it works with the |
@joaomamede Alternatively, yo can put |
Thanks for your share! I follow your step and it almost successful. However, the clinfo told me that "unknown target CPU 'sm_89'". Here is my full output and full benchmark. clinfo:
benchmark:
|
@Tongzhao9417
You need newer version of LLVM/clang. (Just checked llvm-16 from debian repo have "sm_89" one) |
Sorry for late reply. I follow your step and it's worked for me. Cheers! |
I compiled POCL as decribed above and now
Does POCL not support OpenCL 2.0 ? |
Windows Build Number
21382.1
WSL Version
Kernel Version
5.10.16.3
Distro Version
Ubuntu 20.04
Other Software
Inside WSL:
clinfo (for checking OpenCL platforms)
CUDA 11.3 (docker container runs with NVIDIA_DISABLE_REQUIRE=1, as it otherwise thinks it's running 11.0)
Docker 20.10.6, build 370c289 (with custom container)
nvidia-docker2 2.5.0-1
On Windows:
NVIDIA Graphics Driver for CUDA on WSL 470.14
Repro Steps
I installed the Nvidia drivers and docker as according to Nvidia's user guide
I am however running an older version of nvidia-docker2 (and dependencies) as according to a forum post here
Additionally, I have also installed the CUDA on WSL driver here
Steps:
Run clinfo (both in and outside of the Docker container)
Expected Behavior
clinfo should return the graphics card (in my case, GTX 970) as an OpenCL platform
Actual Behavior
clinfo reports 0 platforms available, both inside the container and just on WSL
Diagnostic Logs
cuda
nvidia-container-cli
glxinfo (from inside of container)
glxinfo (from WSL, outside of container)
wsl.etl
The text was updated successfully, but these errors were encountered: