Skip to content

Commit cb4023a

Browse files
TedThemistokleousTed Themistokleous
andauthored
[ROCM EP] - Updates to enable HIPBLAS API updates (#122) (microsoft#24885)
* Use the latest hipify-perl for ROCm 7.0 instead of pinned version Required so we can convert kernels with the latest hipify that supports latest hipblas change - Remove hipify-perl version from rocm-6.3.0-14776 build - Use the argument pushed to the amd_hipify.py script. related to ROCm#69 * Remove roctracer_hcc.h include Not needed as roctracer_hip.h superceeds this * Removal of hipblas_v2_api reference Just make this use hipblas directly * Use local system hipify no os path join needed * Add HIPIFY Path log mesasge for build ### Description <!-- Describe your changes. --> Update to use the local version of hipify from the ROCm release. Relevant since we'd like to ensure the latest hipify changes are being used and being tested when using ROCm EP ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> Latest and greatest for ROCm EP to convert kernels via hipify-perl mechanism Co-authored-by: Ted Themistokleous <[email protected]>
1 parent 80555f5 commit cb4023a

File tree

6 files changed

+4
-13172
lines changed

6 files changed

+4
-13172
lines changed

cmake/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,7 @@ if (onnxruntime_USE_ROCM)
372372
if (HIPIFY_PERL_PATH-NOTFOUND)
373373
MESSAGE(FATAL_ERROR "hipify-perl not found")
374374
endif()
375+
MESSAGE("HIPIFY PATH:"${HIPIFY_PERL_PATH}/hipify-perl)
375376
set(onnxruntime_HIPIFY_PERL ${HIPIFY_PERL_PATH}/hipify-perl)
376377
endif()
377378

cmake/onnxruntime_kernel_explorer.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ elseif (onnxruntime_USE_ROCM)
6464
)
6565
auto_set_source_files_hip_language(${kernel_explorer_kernel_srcs} ${kernel_explorer_rocm_kernel_srcs})
6666
target_sources(kernel_explorer PRIVATE ${kernel_explorer_rocm_kernel_srcs})
67-
target_compile_definitions(kernel_explorer PRIVATE __HIP_PLATFORM_AMD__=1 __HIP_PLATFORM_HCC__=1 HIPBLAS_V2)
67+
target_compile_definitions(kernel_explorer PRIVATE __HIP_PLATFORM_AMD__=1 __HIP_PLATFORM_HCC__=1 HIPBLAS)
6868
if (onnxruntime_USE_COMPOSABLE_KERNEL)
6969
target_compile_definitions(kernel_explorer PRIVATE USE_COMPOSABLE_KERNEL)
7070
if (onnxruntime_USE_COMPOSABLE_KERNEL_CK_TILE)

cmake/onnxruntime_providers_rocm.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154

155155
set_target_properties(onnxruntime_providers_rocm PROPERTIES LINKER_LANGUAGE CXX)
156156
set_target_properties(onnxruntime_providers_rocm PROPERTIES FOLDER "ONNXRuntime")
157-
target_compile_definitions(onnxruntime_providers_rocm PRIVATE HIPBLAS_V2)
157+
target_compile_definitions(onnxruntime_providers_rocm PRIVATE HIPBLAS)
158158

159159
if (onnxruntime_ENABLE_TRAINING)
160160
target_include_directories(onnxruntime_providers_rocm PRIVATE ${ORTTRAINING_ROOT} ${CMAKE_CURRENT_BINARY_DIR}/amdgpu/orttraining ${MPI_CXX_INCLUDE_DIRS})

onnxruntime/core/providers/rocm/roctracer_manager.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
#include <hip/hip_runtime_api.h>
99
#include <roctracer/roctracer.h>
10-
#include <roctracer/roctracer_hcc.h>
1110
#include <roctracer/roctracer_hip.h>
1211
#include <roctracer/roctracer_ext.h>
1312
#include <roctracer/roctracer_roctx.h>

tools/ci_build/amd_hipify.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,4 +187,4 @@ def hipify(hipify_perl_path, src_file_path, dst_file_path):
187187
parser.add_argument("src", help="src")
188188
args = parser.parse_args()
189189

190-
hipify(os.path.join(os.path.dirname(__file__), "hipify-perl"), args.src, args.output)
190+
hipify(args.hipify_perl, args.src, args.output)

0 commit comments

Comments
 (0)