Merge remote-tracking branch 'nccl/master' into develop
This commit is contained in:
+19
-9
@@ -15,25 +15,35 @@ typedef hsa_status_t (*PFN_hsa_system_get_info)(hsa_system_info_t attribute, voi
|
||||
typedef hsa_status_t (*PFN_hsa_status_string)(hsa_status_t status, const char ** status_string);
|
||||
typedef hsa_status_t (*PFN_hsa_amd_portable_export_dmabuf)(const void* ptr, size_t size, int* dmabuf, uint64_t* offset);
|
||||
|
||||
#ifdef __HIP_PLATFORM_AMD__
|
||||
#define CUPFN(symbol) symbol
|
||||
#else
|
||||
#define CUPFN(symbol) pfn_##symbol
|
||||
#endif
|
||||
|
||||
// Check CUDA PFN driver calls
|
||||
#define CUCHECK(cmd) do { \
|
||||
#define HSACHECK(cmd) do { \
|
||||
hsa_status_t err = pfn_##cmd; \
|
||||
if( err != HSA_STATUS_SUCCESS ) { \
|
||||
const char *errStr; \
|
||||
pfn_hsa_status_string(err, &errStr); \
|
||||
WARN("ROCr failure '%s'", errStr); \
|
||||
WARN("HIP failure '%s'", errStr); \
|
||||
return ncclUnhandledCudaError; \
|
||||
} \
|
||||
} while(false)
|
||||
|
||||
// Check CUDA PFN driver calls
|
||||
#define CUCHECK(cmd) do { \
|
||||
hipError_t err = cmd; \
|
||||
if( err != hipSuccess ) { \
|
||||
WARN("HIP failure '%s' at %s:%d", hipGetErrorString(err), __FILE__, __LINE__); \
|
||||
return ncclUnhandledCudaError; \
|
||||
} \
|
||||
} while(false)
|
||||
|
||||
#define CUCHECKGOTO(cmd, res, label) do { \
|
||||
hsa_status_t err = pfn_##cmd; \
|
||||
if( err != HSA_STATUS_SUCCESS ) { \
|
||||
const char *errStr; \
|
||||
pfn_hsa_status_string(err, &errStr); \
|
||||
WARN("ROCr failure '%s'", errStr); \
|
||||
hipError_t err = cmd; \
|
||||
if( err != hipSuccess ) { \
|
||||
WARN("HIP failure '%s' at %s:%d", hipGetErrorString(err), __FILE__, __LINE__); \
|
||||
res = ncclUnhandledCudaError; \
|
||||
goto label; \
|
||||
} \
|
||||
@@ -45,7 +55,7 @@ typedef hsa_status_t (*PFN_hsa_amd_portable_export_dmabuf)(const void* ptr, size
|
||||
if( err != HSA_STATUS_SUCCESS ) { \
|
||||
const char *errStr; \
|
||||
pfn_hsa_status_string(err, &errStr); \
|
||||
INFO(NCCL_ALL,"%s:%d ROCr failure '%s'", __FILE__, __LINE__, errStr); \
|
||||
INFO(NCCL_ALL,"%s:%d HIP failure '%s'", __FILE__, __LINE__, errStr); \
|
||||
} \
|
||||
} while(false)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user