From 62d6e7d0f173dffdb2e783b6f6cb2351bae2adab Mon Sep 17 00:00:00 2001 From: Masahiro Masuda Date: Fri, 13 Oct 2017 00:34:06 +0900 Subject: [PATCH] fixed rocm runtime. set default gcn arch to be gfx803 --- src/codegen/llvm/codegen_amdgpu.cc | 2 +- src/runtime/rocm/rocm_module.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/codegen/llvm/codegen_amdgpu.cc b/src/codegen/llvm/codegen_amdgpu.cc index 4769efdb0405..146880b7dd89 100644 --- a/src/codegen/llvm/codegen_amdgpu.cc +++ b/src/codegen/llvm/codegen_amdgpu.cc @@ -136,7 +136,7 @@ runtime::Module BuildAMDGPU(Array funcs, std::string target) { ) >= 4 && target.substr(0, 4) == "rocm"); llvm::TargetMachine* tm = \ - GetLLVMTargetMachine("-mtriple=amdgcn-amd-amdhsa-hcc -mcpu=gfx900" + \ + GetLLVMTargetMachine("-mtriple=amdgcn-amd-amdhsa-hcc -mcpu=gfx803" + \ target.substr(4, target.length() - 4)); std::unique_ptr cg(new CodeGenAMDGPU()); diff --git a/src/runtime/rocm/rocm_module.cc b/src/runtime/rocm/rocm_module.cc index 2839e10945f8..98ec6f63d74e 100644 --- a/src/runtime/rocm/rocm_module.cc +++ b/src/runtime/rocm/rocm_module.cc @@ -152,7 +152,7 @@ class ROCMWrappedFunc { ThreadWorkLoad wl = thread_axis_cfg_.Extract(args); void* config[] = { - HIP_LAUNCH_PARAM_BUFFER_POINTER, &packed_args, + HIP_LAUNCH_PARAM_BUFFER_POINTER, packed_args, HIP_LAUNCH_PARAM_BUFFER_SIZE, &packed_nbytes, HIP_LAUNCH_PARAM_END };