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

Add "shortcut" function for getting the default device #698

Open
eyalroz opened this issue Nov 18, 2024 · 0 comments
Open

Add "shortcut" function for getting the default device #698

eyalroz opened this issue Nov 18, 2024 · 0 comments

Comments

@eyalroz
Copy link
Owner

eyalroz commented Nov 18, 2024

This:

cuda::device::get(cuda::device::default_device_id);

is too verbose of a command for getting the default device. Instead, let's make it:

cuda::device::default_();

(I was mulling over the choice of function name, between this and get_default(), and went with the shorter one; comment if you disagree.)

@eyalroz eyalroz self-assigned this Nov 18, 2024
eyalroz added a commit that referenced this issue Nov 18, 2024
eyalroz added a commit that referenced this issue Nov 18, 2024
* Added a `device::default_()` function for obtaining the default CUDA device
* Added a bit of code using `device::default_()` to the `device_management` example program
eyalroz added a commit that referenced this issue Nov 18, 2024
* Added a `device::default_()` function for obtaining the default CUDA device
* Added a bit of code using `device::default_()` to the `device_management` example program
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