Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

Expose at::cuda::getDeviceProperties(int64_t device) in LibTorchSharp #462

Open
nietras opened this issue Nov 26, 2021 · 1 comment
Open

Comments

@nietras
Copy link
Contributor

nietras commented Nov 26, 2021

pytorch exposes this as https://pytorch.org/docs/stable/generated/torch.cuda.get_device_properties.html the idea is to do the same for TorchSharp with the goal of being able to query available memory on CUDA devices etc.

I don't know exactly what needs to be changed to allow this, but it should be fairly straightforward.

@NiklasGustafsson
Copy link
Contributor

NiklasGustafsson commented Mar 21, 2022

@nietras, I looked into this a little bit.

It looks like the C++ code in LibTorch is directly messing with Python objects to add the necessary reference to from the CUDA backend.

As far as I can tell, we'd have to link with CUDA libraries directly in order to find these APIs, it doesn't seem like libtorch exports anything that we can use from TorchSharp's native interop layer.

haytham2597 added a commit to haytham2597/TorchSharp that referenced this issue Oct 21, 2024
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