We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae01547 commit f31e94dCopy full SHA for f31e94d
src/hmem_cuda.c
@@ -763,6 +763,9 @@ int cuda_hmem_init(void)
763
"If libfabric is not compiled with gdrcopy support, "
764
"this variable is not checked. (default: true)");
765
766
+ fi_param_define(NULL, "hmem_cuda_use_dmabuf", FI_PARAM_BOOL,
767
+ "Use dma-buf for sharing buffer with hardware. (default:true)");
768
+
769
ret = cuda_hmem_dl_init();
770
if (ret != FI_SUCCESS)
771
return ret;
@@ -936,7 +939,11 @@ bool cuda_is_gdrcopy_enabled(void)
936
939
937
940
bool cuda_is_dmabuf_supported(void)
938
941
{
- return cuda_attr.dmabuf_supported;
942
+ int use_dmabuf = 1;
943
944
+ fi_param_get_bool(NULL, "hmem_cuda_use_dmabuf", &use_dmabuf);
945
946
+ return use_dmabuf && cuda_attr.dmabuf_supported;
947
}
948
949
#else
0 commit comments