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

[Documentation] Lifetime of device tensors and allocating device tensors with the env allocator #24007

Open
gedoensmax opened this issue Mar 12, 2025 · 0 comments
Labels
documentation improvements or additions to documentation; typically submitted using template

Comments

@gedoensmax
Copy link
Contributor

Describe the documentation issue

When calling CreateAndRegisterAllocatorV2 is there any way to use the created allocator without an OrtSession ?

A flow that should work is to register the env allocator, create a Session and then acquire the arena allocator (should be the env allocator at this point) through the API shown here. https://onnxruntime.ai/docs/performance/device-tensor.html#cuda

I am thinking about the lifetime of device tensors when using the session allocator, ideally I would syntactically be able to acquire the environment allocator somehow from the environment. That would make it clear that the allocators lifetime is associated with the environment and not just with the session.

Page / URL

https://onnxruntime.ai/docs/get-started/with-c.html#features

@gedoensmax gedoensmax added the documentation improvements or additions to documentation; typically submitted using template label Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation improvements or additions to documentation; typically submitted using template
Projects
None yet
Development

No branches or pull requests

1 participant