Skip to content

Commit

Permalink
hmem/rocr: Fix dmabuf for amd gpu implementation
Browse files Browse the repository at this point in the history
Two symbols were added to check for and then get the dmabuf fd. They
were not initialized.

NETCASSINI-4994

Signed-off-by: Chuck Fossen <[email protected]>
  • Loading branch information
chuckfossen authored and j-xiong committed Aug 1, 2024
1 parent 1497db5 commit 9eb6942
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/hmem_rocr.c
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,22 @@ static int rocr_hmem_dl_init(void)
goto err;
}

hsa_ops.hsa_system_get_info = dlsym(hsa_handle, "hsa_system_get_info");
if (!hsa_ops.hsa_system_get_info) {
FI_WARN(&core_prov, FI_LOG_CORE,
"Failed to find hsa_system_get_info\n");
goto err;
}

#if HAVE_HSA_AMD_PORTABLE_EXPORT_DMABUF
hsa_ops.hsa_amd_portable_export_dmabuf = dlsym(hsa_handle, "hsa_amd_portable_export_dmabuf");
if (!hsa_ops.hsa_amd_portable_export_dmabuf) {
FI_WARN(&core_prov, FI_LOG_CORE,
"Failed to find hsa_amd_portable_export_dmabuf\n");
goto err;
}
#endif

return FI_SUCCESS;

err:
Expand Down

0 comments on commit 9eb6942

Please sign in to comment.