diff --git a/projects/hip/docs/markdown/CUDA_Runtime_API_functions_supported_by_HIP.md b/projects/hip/docs/markdown/CUDA_Runtime_API_functions_supported_by_HIP.md index d7266ac450..663e6ad082 100644 --- a/projects/hip/docs/markdown/CUDA_Runtime_API_functions_supported_by_HIP.md +++ b/projects/hip/docs/markdown/CUDA_Runtime_API_functions_supported_by_HIP.md @@ -60,6 +60,7 @@ | `cudaStreamBeginCapture` | | | `cudaStreamEndCapture` | | | `cudaStreamIsCapturing` | | +| `cudaStreamGetCaptureInfo` | | | `cudaStreamCreate` | `hipStreamCreate` | | `cudaStreamCreateWithFlags` | `hipStreamCreateWithFlags` | | `cudaStreamCreateWithPriority` | `hipStreamCreateWithPriority` | @@ -69,6 +70,7 @@ | `cudaStreamQuery` | `hipStreamQuery` | | `cudaStreamSynchronize` | `hipStreamSynchronize` | | `cudaStreamWaitEvent` | `hipStreamWaitEvent` | +| `cudaThreadExchangeStreamCaptureMode` | | ## **5. Event Management** @@ -396,6 +398,7 @@ | `cudaGraphHostNodeGetParams` | | | `cudaGraphHostNodeSetParams` | | | `cudaGraphInstantiate` | | +| `cudaGraphExecKernelNodeSetParams` | | | `cudaGraphKernelNodeGetParams` | | | `cudaGraphKernelNodeSetParams` | | | `cudaGraphLaunch` | | @@ -784,6 +787,8 @@ | 83 |*`cudaErrorSystemNotReady`* | | | 84 |*`cudaErrorIllegalState`* | | | 127 |*`cudaErrorStartupFailure`* | | +| 803 |*`cudaErrorSystemDriverMismatch`* | | +| 804 |*`cudaErrorCompatNotSupportedOnDevice`* | | | 900 |*`cudaErrorStreamCaptureUnsupported`* | | | 901 |*`cudaErrorStreamCaptureInvalidated`* | | | 902 |*`cudaErrorStreamCaptureMerge`* | | @@ -792,6 +797,7 @@ | 905 |*`cudaErrorStreamCaptureIsolation`* | | | 906 |*`cudaErrorStreamCaptureImplicit`* | | | 907 |*`cudaErrorCapturedEvent`* | | +| 908 |*`cudaErrorStreamCaptureWrongThread`* | | | 10000 |*`cudaErrorApiFailureBase`* | | | enum |***`cudaFuncCache`*** |***`hipFuncCache_t`*** | | 0 |*`cudaFuncCachePreferNone`* |*`hipFuncCachePreferNone`* | @@ -906,6 +912,10 @@ | 0 |*`cudaStreamCaptureStatusNone`* | | | 1 |*`cudaStreamCaptureStatusActive`* | | | 2 |*`cudaStreamCaptureStatusInvalidated`* | | +| enum |***`cudaStreamCaptureMode`*** | | +| 0 |*`cudaStreamCaptureModeGlobal`* | | +| 1 |*`cudaStreamCaptureModeThreadLocal`* | | +| 2 |*`cudaStreamCaptureModeRelaxed`* | | | enum |***`cudaSurfaceBoundaryMode`*** |***`hipSurfaceBoundaryMode`*** | | 0 |*`cudaBoundaryModeZero`* |*`hipBoundaryModeZero`* | | 1 |*`cudaBoundaryModeClamp`* |*`hipBoundaryModeClamp`* | diff --git a/projects/hip/hipify-clang/src/CUDA2HIP_Runtime_API_functions.cpp b/projects/hip/hipify-clang/src/CUDA2HIP_Runtime_API_functions.cpp index 8f5b87a864..96454d7ec3 100644 --- a/projects/hip/hipify-clang/src/CUDA2HIP_Runtime_API_functions.cpp +++ b/projects/hip/hipify-clang/src/CUDA2HIP_Runtime_API_functions.cpp @@ -131,12 +131,16 @@ const std::map CUDA_RUNTIME_FUNCTION_MAP{ {"cudaStreamGetPriority", {"hipStreamGetPriority", "", CONV_STREAM, API_RUNTIME}}, // cuStreamIsCapturing {"cudaStreamIsCapturing", {"hipStreamIsCapturing", "", CONV_STREAM, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuStreamGetCaptureInfo + {"cudaStreamGetCaptureInfo", {"hipStreamGetCaptureInfo", "", CONV_STREAM, API_RUNTIME, HIP_UNSUPPORTED}}, // cuStreamQuery {"cudaStreamQuery", {"hipStreamQuery", "", CONV_STREAM, API_RUNTIME}}, // cuStreamSynchronize {"cudaStreamSynchronize", {"hipStreamSynchronize", "", CONV_STREAM, API_RUNTIME}}, // cuStreamWaitEvent {"cudaStreamWaitEvent", {"hipStreamWaitEvent", "", CONV_STREAM, API_RUNTIME}}, + // cuThreadExchangeStreamCaptureMode + {"cudaThreadExchangeStreamCaptureMode", {"hipThreadExchangeStreamCaptureMode", "", CONV_STREAM, API_RUNTIME, HIP_UNSUPPORTED}}, // 5.5.Event Management // no analogue @@ -640,6 +644,8 @@ const std::map CUDA_RUNTIME_FUNCTION_MAP{ {"cudaGraphHostNodeSetParams", {"hipGraphHostNodeSetParams", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, // cuGraphInstantiate {"cudaGraphInstantiate", {"hipGraphInstantiate", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphExecKernelNodeSetParams + {"cudaGraphExecKernelNodeSetParams", {"hipGraphExecKernelNodeSetParams", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, // cuGraphKernelNodeGetParams {"cudaGraphKernelNodeGetParams", {"hipGraphKernelNodeGetParams", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, // cuGraphKernelNodeSetParams diff --git a/projects/hip/hipify-clang/src/CUDA2HIP_Runtime_API_types.cpp b/projects/hip/hipify-clang/src/CUDA2HIP_Runtime_API_types.cpp index 3cc9345644..6e86cf8fda 100644 --- a/projects/hip/hipify-clang/src/CUDA2HIP_Runtime_API_types.cpp +++ b/projects/hip/hipify-clang/src/CUDA2HIP_Runtime_API_types.cpp @@ -770,6 +770,10 @@ const std::map CUDA_RUNTIME_TYPE_NAME_MAP { {"cudaErrorSystemNotReady", {"hipErrorSystemNotReady", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 83 // CUDA_ERROR_ILLEGAL_STATE = 401 {"cudaErrorIllegalState", {"hipErrorIllegalState", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 84 + // CUDA_ERROR_SYSTEM_DRIVER_MISMATCH + {"cudaErrorSystemDriverMismatch", {"hipErrorSystemDriverMismatch", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 803 + // CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE + {"cudaErrorCompatNotSupportedOnDevice", {"hipErrorCompatNotSupportedOnDevice", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 804 // no analogue {"cudaErrorStartupFailure", {"hipErrorStartupFailure", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 127 // CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED = 900 @@ -788,6 +792,8 @@ const std::map CUDA_RUNTIME_TYPE_NAME_MAP { {"cudaErrorStreamCaptureImplicit", {"hipErrorStreamCaptureImplicit", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 906 // CUDA_ERROR_CAPTURED_EVENT = 907 {"cudaErrorCapturedEvent", {"hipErrorCapturedEvent", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 907 + // CUDA_ERROR_STREAM_CAPTURE_WRONG_THREAD = 908 + {"cudaErrorStreamCaptureWrongThread", {"hipErrorStreamCaptureWrongThread", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 908 // Deprecated since CUDA 4.1 {"cudaErrorApiFailureBase", {"hipErrorApiFailureBase", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 10000 @@ -1083,6 +1089,16 @@ const std::map CUDA_RUNTIME_TYPE_NAME_MAP { // CU_STREAM_CAPTURE_STATUS_INVALIDATED {"cudaStreamCaptureStatusInvalidated", {"hipStreamCaptureStatusInvalidated", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 2 + // CUstreamCaptureMode + {"cudaStreamCaptureMode", {"hipStreamCaptureMode", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, + // cudaStreamCaptureMode enum values + // CU_STREAM_CAPTURE_MODE_GLOBAL + {"cudaStreamCaptureModeGlobal", {"hipStreamCaptureModeGlobal", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0 + // CU_STREAM_CAPTURE_MODE_THREAD_LOCAL + {"cudaStreamCaptureModeThreadLocal", {"hipStreamCaptureModeThreadLocal", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 1 + // CU_STREAM_CAPTURE_MODE_RELAXED + {"cudaStreamCaptureModeRelaxed", {"hipStreamCaptureModeRelaxed", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 2 + // no analogue {"cudaSurfaceBoundaryMode", {"hipSurfaceBoundaryMode", "", CONV_TYPE, API_RUNTIME}}, // cudaSurfaceBoundaryMode enum values