Skip to content
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

Mark plugins as gpu capable #161

Open
theChaosCoder opened this issue Sep 26, 2021 · 6 comments
Open

Mark plugins as gpu capable #161

theChaosCoder opened this issue Sep 26, 2021 · 6 comments

Comments

@theChaosCoder
Copy link
Collaborator

Since many plugins also use the GPU for processing, it would be nice to mark packages accordingly.

I was thinking something like this:

{
	"name": "MyPlugin",
	"type": "VSPlugin",
	"gpu": "CUDA",
....

Maybe CUDA, VULKAN & OPENCL as options.
Or simply uses_gpu: yes
I don't think it makes much sense to mark it per release.

This would be then listed in vsrepo available / installed

What do you think?

@myrsloik
Copy link
Member

You should definitely mark the gpu apis supported in a list (are there multi api plugins? if not maybe skip that) since not all cards do CUDA.
There should probably be a "cpu": true/false (assume true if not set) option to mark gpu only properly. Is there some way we can detect nvidia gpus easily from python? Check for the existence of a cuda dll in system maybe? That way we can skip CUDA only on non-nvidia systems.

@myrsloik
Copy link
Member

Or a more general option like device: ["cpu", "opencl"] where once again cpu only is assumed when not present.

@theChaosCoder
Copy link
Collaborator Author

theChaosCoder commented Sep 26, 2021

device sounds good, since there are plugins with both cpu and gpu support.
Hmm not sure how to check for cuda. Maybe with some clever "list gpu devices" and then look for a cuda string? Via WMI on Windows maybe?

There's also torch.cuda.is_available() but it's a "heavy" dependency.

@theChaosCoder
Copy link
Collaborator Author

theChaosCoder commented Sep 26, 2021

Found this https://gist.github.com/f0k/63a664160d016a491b2cbea15913d549#file-cuda_check-py-L60. Maybe looking for a cuda dll is enough?

nvcuda.dll should be our dll

@myrsloik
Copy link
Member

Yes, nvcuda.dll existing sounds like enough.

@theChaosCoder
Copy link
Collaborator Author

Step 1 is commited (just the tagging part)
bbf8233

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants