Add some missing APIs on nv path and hipify
Change-Id: Ic0f4740ab06bf70b1de61b39fedc7a6e7605cb61
[ROCm/hip commit: 8a8c7a6b4d]
This commit is contained in:
@@ -230,6 +230,7 @@ while (@ARGV) {
|
||||
#Includes:
|
||||
$countIncludes += s/(\s*#\s*include\s+)[<"]cuda_runtime\.h[>"]/$1<hip\/hip_runtime.h>/;
|
||||
$countIncludes += s/(\s*#\s*include\s+)[<"]cuda_runtime_api\.h[>"]/$1<hip\/hip_runtime_api.h>/;
|
||||
$countIncludes += s/(\s*#\s*include\s+)[<"]cuda_fp16\.h[>"]/$1<hip\/hip_fp16.h>/;
|
||||
|
||||
|
||||
#--------
|
||||
@@ -249,6 +250,7 @@ while (@ARGV) {
|
||||
$ft{'err'} += s/\bcudaErrorNoDevice\b/hipErrorNoDevice/g;
|
||||
$ft{'err'} += s/\bcudaErrorNotReady\b/hipErrorNotReady/g;
|
||||
$ft{'err'} += s/\bcudaErrorUnknown\b/hipErrorUnknown/g;
|
||||
$ft{'err'} += s/\bcudaErrorPeerAccessAlreadyEnabled\b/hipErrorPeerAccessAlreadyEnabled/g;
|
||||
|
||||
# error APIs:
|
||||
$ft{'err'} += s/\bcudaGetLastError\b/hipGetLastError/g;
|
||||
@@ -294,6 +296,7 @@ while (@ARGV) {
|
||||
$ft{'mem'} += s/\bcudaHostAllocPortable\b/hipHostMallocPortable/g;
|
||||
$ft{'mem'} += s/\bcudaHostAllocMapped\b/hipHostMallocMapped/g;
|
||||
$ft{'mem'} += s/\bcudaHostAllocWriteCombined\b/hipHostMallocWriteCombined/g;
|
||||
$ft{'mem'} += s/\bcudaHostRegisterMapped\b/hipHostRegisterMapped/g;
|
||||
$ft{'mem'} += s/\bcudaHostRegister\b/hipHostRegister/g;
|
||||
$ft{'mem'} += s/\bcudaHostUnregister\b/hipHostUnregister/g;
|
||||
$ft{'mem'} += s/\bcudaHostGetDevicePointer\b/hipHostGetDevicePointer/g;
|
||||
@@ -333,6 +336,7 @@ while (@ARGV) {
|
||||
$ft{'event'} += s/\bcudaEventRecord\b/hipEventRecord/g;
|
||||
$ft{'event'} += s/\bcudaEventElapsedTime\b/hipEventElapsedTime/g;
|
||||
$ft{'event'} += s/\bcudaEventSynchronize\b/hipEventSynchronize/g;
|
||||
$ft{'event'} += s/\bcudaEventDisableTiming\b/hipEventDisableTiming/g;
|
||||
|
||||
#--------
|
||||
# Streams
|
||||
@@ -415,6 +419,8 @@ while (@ARGV) {
|
||||
$ft{'mem'} += s/\bcudaIpcOpenMemHandle\b/hipIpcOpenMemHandle/g;
|
||||
$ft{'mem'} += s/\bcudaIpcCloseMemHandle\b/hipIpcCloseMemHandle/g;
|
||||
$ft{'mem'} += s/\bcudaIpcGetMemHandle\b/hipIpcGetMemHandle/g;
|
||||
$ft{'mem'} += s/\bcudaIpcMemHandle_t\b/hipIpcMemHandle_t/g;
|
||||
$ft{'mem'} += s/\bcudaIpcMemLazyEnablePeerAccess\b/hipIpcMemLazyEnablePeerAccess/g;
|
||||
|
||||
|
||||
# Shared mem:
|
||||
|
||||
@@ -70,6 +70,7 @@ hipMemcpyHostToHost
|
||||
#define HIP_LAUNCH_PARAM_BUFFER_SIZE CU_LAUNCH_PARAM_BUFFER_SIZE
|
||||
#define HIP_LAUNCH_PARAM_END CU_LAUNCH_PARAM_END
|
||||
#define hipLimitMallocHeapSize cudaLimitMallocHeapSize
|
||||
#define hipIpcMemLazyEnablePeerAccess cudaIpcMemLazyEnablePeerAccess
|
||||
|
||||
typedef cudaEvent_t hipEvent_t;
|
||||
typedef cudaStream_t hipStream_t;
|
||||
|
||||
مرجع در شماره جدید
Block a user