From 624c37df9b091f2d6f411c793254f42ee724b127 Mon Sep 17 00:00:00 2001 From: masahi Date: Thu, 12 Oct 2017 13:09:02 -0400 Subject: [PATCH] fixed rocm runtime. set default gcn arch to be gfx803 (#544) --- 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 };