diff --git a/src/runtime/module.cc b/src/runtime/module.cc index f9c281ab9d02..393d269222c1 100644 --- a/src/runtime/module.cc +++ b/src/runtime/module.cc @@ -148,7 +148,7 @@ bool RuntimeEnabled(const std::string& target) { } else if (target == "hexagon") { f_name = "device_api.hexagon"; } else if (target.length() >= 5 && target.substr(0, 5) == "nvptx") { - f_name = "device_api.gpu"; + f_name = "device_api.cuda"; } else if (target.length() >= 4 && target.substr(0, 4) == "rocm") { f_name = "device_api.rocm"; } else if (target.length() >= 4 && target.substr(0, 4) == "llvm") { diff --git a/src/target/llvm/codegen_nvptx.cc b/src/target/llvm/codegen_nvptx.cc index ebe6d6d67442..24b7bd2b6acc 100644 --- a/src/target/llvm/codegen_nvptx.cc +++ b/src/target/llvm/codegen_nvptx.cc @@ -138,7 +138,7 @@ class CodeGenNVPTX : public CodeGenLLVM { if (sync == "warp") { // TODO(tqchen) warp sync in CUDA9 return nullptr; - } else if (sync == "shared") { + } else if (sync == "shared" || sync == "shared.dyn") { llvm::Function* f = llvm::Intrinsic::getDeclaration(module_.get(), ::llvm::Intrinsic::nvvm_barrier0); return builder_->CreateCall(f, {});