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

check memory location of things tagged STATIC_MEMORY_LOCATION by default #1686

Open
t-vi opened this issue Jan 24, 2025 · 1 comment
Open
Labels
cudagraphs enhancement New feature or request

Comments

@t-vi
Copy link
Collaborator

t-vi commented Jan 24, 2025

...in the prologue.
This could be tricky because it needs the real tensors, in particular if we try to move materializaton to later.

Implementation strategy could be

  • add the data_ptr as an optional field to the TensorProxy
  • include this in the check metadata

Note that pruning the checks would give the option to remove it, which is a good thing IMO.

@t-vi t-vi added cudagraphs enhancement New feature or request labels Jan 24, 2025
@IvanYashchuk
Copy link
Collaborator

What's the intended usage of the STATIC_MEMORY_LOCATION tag? Is having data_ptr enough to check that something has static memory? Are strides and memory offset important here?

That's an interesting idea of adding data_ptr as an optional field to the TensorProxy. What should happen if any of the primitives creating TensorProxies sets this value?

Should Thunder have a different kind of TensorProxy for collecting information from the outside world (here converting torch.Tensor -> TensorProxy) and internal to Thunder functions intermediates that use TensorProxy?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cudagraphs enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants