-
Notifications
You must be signed in to change notification settings - Fork 65
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
[Feature] Memory resource predictor for primitives #156
Comments
Thanks for the clear description of the feature request. :) I will discuss it with the team. |
|
Ah, I had not seen
As long as it is guaranteed that the tensors were not modified if What is the current behaviour for |
Thanks! Is there an expected date for a release including the bugfix and adding the extra info in the MemoryError message? |
Our next release is planned out around end of Oct or early Nov. Please stay tuned! |
Hi, I'd like to request a feature.
Context: In the project I develop (pytket-cutensornet), we make extensive use of cuTensorNet's primitive operations on tensors:
tensor.decompose
(both QRMethod and SVDMethod) andcontract
(applied often on only two/three tensors). We have encountered multiple cases where we reachOutOfMemory
errors, and we would like to improve the user experience around these. To do so, we need to be able to detect if an OOM error would happen if we were to apply one of these primitives. With this, we sometimes may be able to prevent the OOM error, for instance, truncating tensors more aggresively before applying the primitive. Conceptually, this must be possible, since if I setCUTENSORNET_LOG_LEVEL=6
, I can see how much workspace memory each primitive requests from the GPU, and I can keep track of how much memory I am using to store my tensor network on the GPU.Feature request: A method for the user to obtain an upper bound of the GPU memory used by primitives
contract
,tensor.decompose
(both QRMethod and SVDMethod) andexperimental.contract_decompose
on the inputs given by the user. Such method should not run the primitive itself, only inform of the memory resources it would require. Alternatively, I'd be happy with an optionalmemory_budget: int
parameter passed to these primitives so that, if it requires more than the memory_budget, it does not apply the operation, and let's the user know it was skipped (but does not error out, or if it does, it throws an exception that can be handled at the Python level to recover from it).If this sounds interesting, I'd be happy to provide more details of my use case and refine the feature request.
The text was updated successfully, but these errors were encountered: