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

Support obtaining a pointer's device in CUDA 9.1 and earlier #462

Closed
eyalroz opened this issue Feb 6, 2023 · 0 comments
Closed

Support obtaining a pointer's device in CUDA 9.1 and earlier #462

eyalroz opened this issue Feb 6, 2023 · 0 comments

Comments

@eyalroz
Copy link
Owner

eyalroz commented Feb 6, 2023

When obtaining the device for a pointer, we currently rely on an attribute which only became available with CUDA 9.2 ; but we could, in fact, obtain the context handle, then obtain its device ID using a second API call. Let's do that to support CUDA 9.1 and earlier.

@eyalroz eyalroz added the task label Feb 6, 2023
@eyalroz eyalroz self-assigned this Feb 6, 2023
eyalroz added a commit that referenced this issue Feb 6, 2023
* Can now get the device for a pointer in CUDA before 9.2 - by getting the context, then getting the device for the context
* Added `memory::device_of()` and `memory::context_of()`
* Added `memory::detail_` functions for returning the context handle or device id of a pointer, without having to remember the pointer attributes mechanism
eyalroz added a commit that referenced this issue Feb 10, 2023
* Can now get the device for a pointer in CUDA before 9.2 - by getting the context, then getting the device for the context
* Added `memory::device_of()` and `memory::context_of()`
* Added `memory::detail_` functions for returning the context handle or device id of a pointer, without having to remember the pointer attributes mechanism
eyalroz added a commit that referenced this issue Mar 9, 2023
* Can now get the device for a pointer in CUDA before 9.2 - by getting the context, then getting the device for the context
* Added `memory::device_of()` and `memory::context_of()`
* Added `memory::detail_` functions for returning the context handle or device id of a pointer, without having to remember the pointer attributes mechanism
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant