diff --git a/unified-runtime/source/adapters/cuda/common.cpp b/unified-runtime/source/adapters/cuda/common.cpp index cf4619868f695..aa472d6dd52bd 100644 --- a/unified-runtime/source/adapters/cuda/common.cpp +++ b/unified-runtime/source/adapters/cuda/common.cpp @@ -22,18 +22,27 @@ ur_result_t mapErrorUR(CUresult Result) { switch (Result) { case CUDA_SUCCESS: return UR_RESULT_SUCCESS; + case CUDA_ERROR_NOT_INITIALIZED: + return UR_RESULT_ERROR_UNINITIALIZED; + case CUDA_ERROR_NOT_SUPPORTED: + return UR_RESULT_ERROR_UNSUPPORTED_FEATURE; case CUDA_ERROR_NOT_PERMITTED: return UR_RESULT_ERROR_INVALID_OPERATION; case CUDA_ERROR_INVALID_CONTEXT: return UR_RESULT_ERROR_INVALID_CONTEXT; case CUDA_ERROR_INVALID_DEVICE: return UR_RESULT_ERROR_INVALID_DEVICE; + case CUDA_ERROR_NO_DEVICE: + return UR_RESULT_ERROR_DEVICE_NOT_FOUND; case CUDA_ERROR_INVALID_VALUE: return UR_RESULT_ERROR_INVALID_VALUE; case CUDA_ERROR_OUT_OF_MEMORY: return UR_RESULT_ERROR_OUT_OF_HOST_MEMORY; case CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES: return UR_RESULT_ERROR_OUT_OF_RESOURCES; + case CUDA_ERROR_INVALID_PTX: + case CUDA_ERROR_NO_BINARY_FOR_GPU: + return UR_RESULT_ERROR_INVALID_BINARY; default: return UR_RESULT_ERROR_UNKNOWN; }