-
I am trying to test some code on a GPU. I was assuming that depending on the availability the CUDA device, all functions/methods would use the GPU. It seems like the CPU is used by default. This means I have to go through all the code and add a Do we have anything like a context manager or any other mechanism? After some searching, I also don't think this is not possible via the C++ API and consequently via the Java API. TIA |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Right, we currently don't have s.th. like that, but it would make sense to add it. I'm tinkering with a solution using a context parameter for device, but I'd like to keep the API to override device explicitly as a regular parameter if possible. |
Beta Was this translation helpful? Give feedback.
Right, we currently don't have s.th. like that, but it would make sense to add it. I'm tinkering with a solution using a context parameter for device, but I'd like to keep the API to override device explicitly as a regular parameter if possible.