What exactly do OrtArena, Ort::MemoryInfo::CreateCpu and Ort::Value::CreateTensor do? #12797
Unanswered
mmaras1999
asked this question in
Other Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I was wondering how exactly does Ort::Value::CreateTensor work. I have a model that I'm running with CUDA provider, I want to avoid copying data as much as possible.
If I understand correctly, the Ort::Value is some wrapper for data. I'm currently creating it like this:
`auto memory_info = Ort::MemoryInfo::CreateCpu(
OrtAllocatorType::OrtArenaAllocator,
OrtMemType::OrtMemTypeDefault
);
So I was wondering, what exactly does it do with the data? I'm assuming that it's not copying the buffers, but I don't really get the MemoryInfo argument importance.
From what I've understood, the MemoryInfo suggests where the data buffer resides, in my case on CPU. But what exactly do the OrtArenaAllocator do? Why does it need to allocate any data whatsoever? Does it actually copy the data from the buffer somewhere?
Beta Was this translation helpful? Give feedback.
All reactions