Skip to content

Cannot figure out how to switch backend to OpenCL #793

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

Closed
tsorman opened this issue Jun 14, 2024 · 3 comments
Closed

Cannot figure out how to switch backend to OpenCL #793

tsorman opened this issue Jun 14, 2024 · 3 comments
Labels
question Further information is requested wontfix This will not be worked on

Comments

@tsorman
Copy link

tsorman commented Jun 14, 2024

Description

I am writing an application and I want to have it run on both NVidia and AMD GPUs depending on the machine with the option to run on the CPU is the user wishes so..

I have loaded the Nuget packages for all the backends:
CPU,
CUDA11,
CUDA12,
OPENCL

So far I have managed to switch between CUDA and CPU using the
NativeLibraryConfig.All.WithCuda(false); and NativeLibraryConfig.All.WithCuda(true); on an NVIDIA machine.
When I am trying to run the same build on a machine that has and AMD GPU I only get the CPU to work

I have tried the following if there is an AMD card detected.
Set NativeLibraryConfig.All.WithCuda(false); uses the CPU
NativeLibraryConfig.All.WithCuda(true); uses the CPU
Did not used any of the calls above and still uses the CPU

I went through the available calls but I could not see anything referring to OpenCL or clblast so I used the following call with the same result
NativeLibraryConfig.All.WithLibrary(, path to cblast llava dll);

When I am making a build with the OpenCL nuget package only then I can see that the AMD GPU is being used and I can see that OpenCL is mentioned in the console output.

I am not sure if I am missing anything so any help would be appreciated.
Thanks in advance.

@martindevans
Copy link
Member

Support for the OpenCL backend will be dropped in the next update, see here: #782

@tsorman
Copy link
Author

tsorman commented Jun 17, 2024

@martindevans
Thanks a lot for the reply.
I am looking forward for the next update.

@martindevans martindevans added question Further information is requested wontfix This will not be worked on labels Jun 26, 2024
@martindevans
Copy link
Member

I'll close this one now, since I think the question has been answered :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants