Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/runtime/rocm/rocm_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ class ROCMModuleNode : public runtime::ModuleNode {
}

const char* type_key() const final { return "hip"; }

int GetPropertyMask() const final {
return ModulePropertyMask::kBinarySerializable | ModulePropertyMask::kRunnable;
}
PackedFunc GetFunction(const String& name, const ObjectPtr<Object>& sptr_to_self) final;

void SaveToFile(const String& file_name, const String& format) final {
Expand Down
2 changes: 1 addition & 1 deletion src/target/llvm/codegen_llvm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ llvm::GlobalVariable* CodeGenLLVM::AllocateSharedMemory(DataType dtype, size_t s
llvm::GlobalValue::LinkageTypes linkage) {
llvm::Type* type = llvm::ArrayType::get(DTypeToLLVMType(dtype), size);
llvm::GlobalVariable* global =
new llvm::GlobalVariable(*module_, type, false, linkage, nullptr, "shmem", nullptr,
new llvm::GlobalVariable(*module_, type, false, linkage, llvm::UndefValue::get(type), "shmem", nullptr,
llvm::GlobalValue::NotThreadLocal, shared_address_space);
#if TVM_LLVM_VERSION >= 100
global->setAlignment(llvm::Align(alignment));
Expand Down
2 changes: 1 addition & 1 deletion src/tir/transforms/lower_thread_allreduce.cc
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ class ThreadAllreduceBuilder final : public StmtExprMutator {
// rocm only supports 32 bit operands for shuffling at the moment
if ((target_->kind->name == "rocm") &&
(std::any_of(types.begin(), types.end(), [](DataType ty) {
if (ty.is_vector()) return true;
if ((ty.is_vector()) || !ty.is_int()) return true;
return ty.bits() != 32;
}))) {
return false;
Expand Down