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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION]how to create nvcv::Tensor from an existing gpu memory by zero-copy? #149

Open
kywish opened this issue Mar 28, 2024 · 0 comments
Labels
question Further information is requested

Comments

@kywish
Copy link

kywish commented Mar 28, 2024

how to create nvcv::Tensor from an fixed gpu memory by zero-copy?

By the way, when I use TensorWrapData, release the tensor will release original gpu memory too馃槀

float* pGpuData= ...
...
{
    nvcv::TensorDataStridedCuda::Buffer inBuf;
    inBuf.basePtr = pGpuData;
    ...
    nvcv::TensorDataStridedCuda inData(... , inBuf);
    nvcv::Tensor inTensor = TensorWrapData(inData);
}
...
when I use pGpuData, it wall released
@kywish kywish added the question Further information is requested label Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant