在DirectX 12中读取CUDA缓冲区

huangapple go评论52阅读模式
英文:

reading CUDA buffer in directx12

问题

after creating a GPU buffer in CUDA then exporting it using cuMemExportToShareableHandle() and getting a HANDLE then using the CUDA HANDLE as input in ID3D12Device::OpenSharedHandle() then fails with Access violation writing location

(A) OpenSharedHandle()可以打开CUDA句柄吗或

(B) OpenSharedHandle()只能打开由CreateSharedHandle()创建的句柄
如果是(A),那么我的句柄可能有问题
如果是(B),那么是否有另一种方法将CUDA句柄导入DirectX12?

英文:

after creating a GPU buffer in CUDA then exporting it using cuMemExportToShareableHandle() and getting a HANDLE then using the CUDA HANDLE as input in ID3D12Device::OpenSharedHandle() then fails with Access violation writing locationcan

(A)OpenSharedHandle() open CUDA handles or

(B)OpenSharedHandle() only opens handles created by CreateSharedHandle()
if it's (A) then there is something wrong with my handle
if it's (B) then is there another way to import the CUDA handle into directx12?

答案1

得分: 1

"OpenSharedHandle()"只能打开DirectX句柄,但由DirectX 12创建的句柄可以被CUDA的"cuMemImportFromShareableHandle()"打开。

英文:

I asked on the official directx discord
OpenSharedHandle() can only open directx handles
but a handle created by directx12 CreateSharedHandle() can be open by CUDA cuMemImportFromShareableHandle()

huangapple
  • 本文由 发表于 2023年2月8日 09:38:53
  • 转载请务必保留本文链接:https://go.coder-hub.com/75380614.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定