ROCm header path updates (#14170)

ROCm reorganized header file locations. Use the new locations to avoid
warnings.
This commit is contained in:
Jeff Daily 2023-01-15 18:28:13 -08:00 committed by GitHub
parent 9c0c49900e
commit fe052e603b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 3 deletions

View file

@ -262,7 +262,7 @@ if (onnxruntime_USE_ROCM)
endif()
if (NOT CMAKE_HIP_ARCHITECTURES)
set(CMAKE_HIP_ARCHITECTURES "gfx906;gfx908;gfx90a;gfx1030")
set(CMAKE_HIP_ARCHITECTURES "gfx906;gfx908;gfx90a")
endif()
file(GLOB rocm_cmake_components ${onnxruntime_ROCM_HOME}/lib/cmake/*)

View file

@ -23,7 +23,7 @@ limitations under the License.
#pragma once
#include <hip/hip_fp16.h>
#include <hipblas.h>
#include <hipblas/hipblas.h>
#include <hipcub/hipcub.hpp>
#include "core/providers/rocm/rocm_common.h"
#include "core/providers/rocm/cu_inc/common.cuh"

View file

@ -123,7 +123,7 @@ def hipify(hipify_perl_path, src_file_path, dst_file_path):
# NCCL -> RCCL
# s = s.replace('NCCL_CALL', 'RCCL_CALL')
s = s.replace("#include <nccl.h>", "#include <rccl.h>")
s = s.replace("#include <nccl.h>", "#include <rccl/rccl.h>")
# CUDNN -> MIOpen
s = s.replace("CUDNN", "MIOPEN")
@ -161,6 +161,11 @@ def hipify(hipify_perl_path, src_file_path, dst_file_path):
# Deletions
s = s.replace('#include "device_atomic_functions.h"', "") # HIP atomics in main hip header already
# Fix warnings due to incorrect header paths, intentionally after all other hipify steps.
s = s.replace("#include <hiprand_kernel.h>", "#include <hiprand/hiprand_kernel.h>")
s = s.replace("#include <rocblas.h>", "#include <rocblas/rocblas.h>")
s = s.replace("#include <hipblas.h>", "#include <hipblas/hipblas.h>")
with open(dst_file_path, "w") as f:
f.write(s)