fix llvm build errors

This commit is contained in:
Michael Melesse
2022-10-17 18:29:15 +00:00
parent 4f21501def
commit 32dbc08c05

View File

@@ -269,11 +269,9 @@ namespace triton
/* ------------------------ */
// HIP //
/* ------------------------ */
std::string llir_to_amdgpu(llvm::Module *module, const std::string &_proc)
{
init_llvm();
// proc = std::get<0>(GetFeatureStrFromGCNArchName(rocminfo));
// features = std::get<1>(GetFeatureStrFromGCNArchName(rocminfo));
@@ -281,7 +279,7 @@ namespace triton
llvm::SmallVector<char, 0> buffer;
std::string triple = "amdgcn-amd-amdhsa";
std::string layout = "";
std::string features="+sramecc,-xnack";
std::string features = "+sramecc,-xnack";
std::string proc = STRINGIFY(MI_GPU_ARCH);
// name kernel
auto in_time_t = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
@@ -305,7 +303,7 @@ namespace triton
llvm::Reloc::PIC_, llvm::None,
llvm::CodeGenOpt::None);
// set data layout
if(layout.empty())
if (layout.empty())
module->setDataLayout(machine->createDataLayout());
else
module->setDataLayout(layout);
@@ -361,9 +359,6 @@ namespace triton
std::cout << lld_result << std::endl;
}
return hsaco_path;
}
return hsaco_path;
}