Get tensor-> data when the tensor's backend is CUDA #1321
Unanswered
MirkoDeVita98
asked this question in
Q&A
Replies: 1 comment
-
You can use |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
Hello! I am trying to read the data content of a tensor that is supposed to be on GPU, when I try to access the content of data normally I get segmentation fault due to accessing an address that is not on RAM. It all comes to making this to work, but I am missing where I should get the backend (first argument of ggml_backend_tensor_get_async) from:
std::vector<int32_t> dst_data(ggml_nelements(dst));
ggml_backend_tensor_get_async(backend,dst, dst_data.data(), 0, ggml_nbytes(dst));
Thank you in advance for the help!
Beta Was this translation helpful? Give feedback.
All reactions