Skip to content

Commit

Permalink
Merge pull request #1812 from emankov/HIPIFY
Browse files Browse the repository at this point in the history
[HIPIFY][TensorMg][feature] `cuTensorMg` support - Part 4 - final
  • Loading branch information
emankov authored Dec 26, 2024
2 parents 51a029a + 3e2e7da commit bc12971
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 0 deletions.
34 changes: 34 additions & 0 deletions bin/hipify-perl
Original file line number Diff line number Diff line change
Expand Up @@ -9939,19 +9939,36 @@ sub warnHipOnlyUnsupportedFunctions {
"cutensorMgHostDevice_t",
"cutensorMgHandle_t",
"cutensorMgHandle_s",
"cutensorMgDestroyTensorDescriptor",
"cutensorMgDestroyCopyPlan",
"cutensorMgDestroyCopyDescriptor",
"cutensorMgDestroyContractionPlan",
"cutensorMgDestroyContractionFind",
"cutensorMgDestroyContractionDescriptor",
"cutensorMgDestroy",
"cutensorMgCreateTensorDescriptor",
"cutensorMgCreateCopyPlan",
"cutensorMgCreateCopyDescriptor",
"cutensorMgCreateContractionPlan",
"cutensorMgCreateContractionFind",
"cutensorMgCreateContractionDescriptor",
"cutensorMgCreate",
"cutensorMgCopyPlan_t",
"cutensorMgCopyPlan_s",
"cutensorMgCopyGetWorkspace",
"cutensorMgCopyDescriptor_t",
"cutensorMgCopyDescriptor_s",
"cutensorMgCopy",
"cutensorMgContractionPlan_t",
"cutensorMgContractionPlan_s",
"cutensorMgContractionGetWorkspace",
"cutensorMgContractionFind_t",
"cutensorMgContractionFind_s",
"cutensorMgContractionFindSetAttribute",
"cutensorMgContractionFindAttribute_t",
"cutensorMgContractionDescriptor_t",
"cutensorMgContractionDescriptor_s",
"cutensorMgContraction",
"cutensorMgAlgo_t",
"cutensorJitMode_t",
"cutensorHandleWritePlanCacheToFile",
Expand Down Expand Up @@ -11327,19 +11344,36 @@ sub warnRocOnlyUnsupportedFunctions {
"cutensorMgHostDevice_t",
"cutensorMgHandle_t",
"cutensorMgHandle_s",
"cutensorMgDestroyTensorDescriptor",
"cutensorMgDestroyCopyPlan",
"cutensorMgDestroyCopyDescriptor",
"cutensorMgDestroyContractionPlan",
"cutensorMgDestroyContractionFind",
"cutensorMgDestroyContractionDescriptor",
"cutensorMgDestroy",
"cutensorMgCreateTensorDescriptor",
"cutensorMgCreateCopyPlan",
"cutensorMgCreateCopyDescriptor",
"cutensorMgCreateContractionPlan",
"cutensorMgCreateContractionFind",
"cutensorMgCreateContractionDescriptor",
"cutensorMgCreate",
"cutensorMgCopyPlan_t",
"cutensorMgCopyPlan_s",
"cutensorMgCopyGetWorkspace",
"cutensorMgCopyDescriptor_t",
"cutensorMgCopyDescriptor_s",
"cutensorMgCopy",
"cutensorMgContractionPlan_t",
"cutensorMgContractionPlan_s",
"cutensorMgContractionGetWorkspace",
"cutensorMgContractionFind_t",
"cutensorMgContractionFind_s",
"cutensorMgContractionFindSetAttribute",
"cutensorMgContractionFindAttribute_t",
"cutensorMgContractionDescriptor_t",
"cutensorMgContractionDescriptor_s",
"cutensorMgContraction",
"cutensorMgAlgo_t",
"cutensorJitMode_t",
"cutensorHandleWritePlanCacheToFile",
Expand Down
17 changes: 17 additions & 0 deletions docs/tables/CUTENSOR_API_supported_by_HIP.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,25 @@
|`cutensorLoggerSetFile`|1.3.2.0| | | |`hiptensorLoggerSetFile`|5.7.0| | | | |
|`cutensorLoggerSetLevel`|1.3.2.0| | | |`hiptensorLoggerSetLevel`|5.7.0| | | | |
|`cutensorLoggerSetMask`|1.3.2.0| | | |`hiptensorLoggerSetMask`|5.7.0| | | | |
|`cutensorMgContraction`|1.4.0.0| | | | | | | | | |
|`cutensorMgContractionFindSetAttribute`|1.5.0.0| | | | | | | | | |
|`cutensorMgContractionGetWorkspace`|1.4.0.0| | | | | | | | | |
|`cutensorMgCopy`|1.4.0.0| | | | | | | | | |
|`cutensorMgCopyGetWorkspace`|1.4.0.0| | | | | | | | | |
|`cutensorMgCreate`|1.4.0.0| | | | | | | | | |
|`cutensorMgCreateContractionDescriptor`|1.4.0.0| | | | | | | | | |
|`cutensorMgCreateContractionFind`|1.4.0.0| | | | | | | | | |
|`cutensorMgCreateContractionPlan`|1.4.0.0| | | | | | | | | |
|`cutensorMgCreateCopyDescriptor`|1.4.0.0| | | | | | | | | |
|`cutensorMgCreateCopyPlan`|1.4.0.0| | | | | | | | | |
|`cutensorMgCreateTensorDescriptor`|1.4.0.0| | | | | | | | | |
|`cutensorMgDestroy`|1.4.0.0| | | | | | | | | |
|`cutensorMgDestroyContractionDescriptor`|1.4.0.0| | | | | | | | | |
|`cutensorMgDestroyContractionFind`|1.4.0.0| | | | | | | | | |
|`cutensorMgDestroyContractionPlan`|1.4.0.0| | | | | | | | | |
|`cutensorMgDestroyCopyDescriptor`|1.4.0.0| | | | | | | | | |
|`cutensorMgDestroyCopyPlan`|1.4.0.0| | | | | | | | | |
|`cutensorMgDestroyTensorDescriptor`|1.4.0.0| | | | | | | | | |
|`cutensorOperationDescriptorGetAttribute`|2.0.0.0| | | | | | | | | |
|`cutensorOperationDescriptorSetAttribute`|2.0.0.0| | | | | | | | | |
|`cutensorPermutation`|1.0.1.0| | |2.0.0.0|`hiptensorPermutation`|6.1.0| | | | |
Expand Down
34 changes: 34 additions & 0 deletions src/CUDA2HIP_TENSOR_API_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,23 @@ const std::map<llvm::StringRef, hipCounter> CUDA_TENSOR_FUNCTION_MAP {
{"cutensorLoggerForceDisable", {"hiptensorLoggerForceDisable", "", CONV_LIB_FUNC, API_TENSOR, 2}},
{"cutensorMgCreate", {"", "", CONV_LIB_FUNC, API_TENSOR, 2, UNSUPPORTED}},
{"cutensorMgDestroy", {"", "", CONV_LIB_FUNC, API_TENSOR, 2, UNSUPPORTED}},
{"cutensorMgCreateTensorDescriptor", {"", "", CONV_LIB_FUNC, API_TENSOR, 2, UNSUPPORTED}},
{"cutensorMgDestroyTensorDescriptor", {"", "", CONV_LIB_FUNC, API_TENSOR, 2, UNSUPPORTED}},
{"cutensorMgCreateCopyDescriptor", {"", "", CONV_LIB_FUNC, API_TENSOR, 2, UNSUPPORTED}},
{"cutensorMgDestroyCopyDescriptor", {"", "", CONV_LIB_FUNC, API_TENSOR, 2, UNSUPPORTED}},
{"cutensorMgCopyGetWorkspace", {"", "", CONV_LIB_FUNC, API_TENSOR, 2, UNSUPPORTED}},
{"cutensorMgCreateCopyPlan", {"", "", CONV_LIB_FUNC, API_TENSOR, 2, UNSUPPORTED}},
{"cutensorMgDestroyCopyPlan", {"", "", CONV_LIB_FUNC, API_TENSOR, 2, UNSUPPORTED}},
{"cutensorMgCopy", {"", "", CONV_LIB_FUNC, API_TENSOR, 2, UNSUPPORTED}},
{"cutensorMgCreateContractionFind", {"", "", CONV_LIB_FUNC, API_TENSOR, 2, UNSUPPORTED}},
{"cutensorMgDestroyContractionFind", {"", "", CONV_LIB_FUNC, API_TENSOR, 2, UNSUPPORTED}},
{"cutensorMgContractionFindSetAttribute", {"", "", CONV_LIB_FUNC, API_TENSOR, 2, UNSUPPORTED}},
{"cutensorMgCreateContractionDescriptor", {"", "", CONV_LIB_FUNC, API_TENSOR, 2, UNSUPPORTED}},
{"cutensorMgDestroyContractionDescriptor", {"", "", CONV_LIB_FUNC, API_TENSOR, 2, UNSUPPORTED}},
{"cutensorMgContractionGetWorkspace", {"", "", CONV_LIB_FUNC, API_TENSOR, 2, UNSUPPORTED}},
{"cutensorMgCreateContractionPlan", {"", "", CONV_LIB_FUNC, API_TENSOR, 2, UNSUPPORTED}},
{"cutensorMgDestroyContractionPlan", {"", "", CONV_LIB_FUNC, API_TENSOR, 2, UNSUPPORTED}},
{"cutensorMgContraction", {"", "", CONV_LIB_FUNC, API_TENSOR, 2, UNSUPPORTED}},
};

const std::map<llvm::StringRef, cudaAPIversions> CUDA_TENSOR_FUNCTION_VER_MAP {
Expand Down Expand Up @@ -114,6 +131,23 @@ const std::map<llvm::StringRef, cudaAPIversions> CUDA_TENSOR_FUNCTION_VER_MAP {
{"cutensorLoggerForceDisable", {CUTENSOR_1320, CUDA_0, CUDA_0 }},
{"cutensorMgCreate", {CUTENSOR_1400, CUDA_0, CUDA_0 }},
{"cutensorMgDestroy", {CUTENSOR_1400, CUDA_0, CUDA_0 }},
{"cutensorMgCreateTensorDescriptor", {CUTENSOR_1400, CUDA_0, CUDA_0 }},
{"cutensorMgDestroyTensorDescriptor", {CUTENSOR_1400, CUDA_0, CUDA_0 }},
{"cutensorMgCreateCopyDescriptor", {CUTENSOR_1400, CUDA_0, CUDA_0 }},
{"cutensorMgDestroyCopyDescriptor", {CUTENSOR_1400, CUDA_0, CUDA_0 }},
{"cutensorMgCopyGetWorkspace", {CUTENSOR_1400, CUDA_0, CUDA_0 }},
{"cutensorMgCreateCopyPlan", {CUTENSOR_1400, CUDA_0, CUDA_0 }},
{"cutensorMgDestroyCopyPlan", {CUTENSOR_1400, CUDA_0, CUDA_0 }},
{"cutensorMgCopy", {CUTENSOR_1400, CUDA_0, CUDA_0 }},
{"cutensorMgCreateContractionFind", {CUTENSOR_1400, CUDA_0, CUDA_0 }},
{"cutensorMgDestroyContractionFind", {CUTENSOR_1400, CUDA_0, CUDA_0 }},
{"cutensorMgContractionFindSetAttribute", {CUTENSOR_1500, CUDA_0, CUDA_0 }},
{"cutensorMgCreateContractionDescriptor", {CUTENSOR_1400, CUDA_0, CUDA_0 }},
{"cutensorMgDestroyContractionDescriptor", {CUTENSOR_1400, CUDA_0, CUDA_0 }},
{"cutensorMgContractionGetWorkspace", {CUTENSOR_1400, CUDA_0, CUDA_0 }},
{"cutensorMgCreateContractionPlan", {CUTENSOR_1400, CUDA_0, CUDA_0 }},
{"cutensorMgDestroyContractionPlan", {CUTENSOR_1400, CUDA_0, CUDA_0 }},
{"cutensorMgContraction", {CUTENSOR_1400, CUDA_0, CUDA_0 }},
};

const std::map<llvm::StringRef, hipAPIversions> HIP_TENSOR_FUNCTION_VER_MAP {
Expand Down

0 comments on commit bc12971

Please sign in to comment.