Unverified Commit 62a1b87b authored by Paul Fultz II's avatar Paul Fultz II Committed by GitHub
Browse files

Remove call to offload bundler (#719)


Co-authored-by: default avatarmvermeulen <5479696+mvermeulen@users.noreply.github.com>
parent 651ea160
...@@ -79,22 +79,16 @@ compile_hip_src(const std::vector<src_file>& srcs, std::string params, const std ...@@ -79,22 +79,16 @@ compile_hip_src(const std::vector<src_file>& srcs, std::string params, const std
// call extract kernel // call extract kernel
td.execute(MIGRAPHX_STRINGIZE(MIGRAPHX_EXTRACT_KERNEL), " -i " + obj_path.string()); td.execute(MIGRAPHX_STRINGIZE(MIGRAPHX_EXTRACT_KERNEL), " -i " + obj_path.string());
} }
if(is_hip_clang_compiler())
{
// call clang-offload-bundler
td.execute(MIGRAPHX_STRINGIZE(MIGRAPHX_OFFLOADBUNDLER_BIN),
"--type=o --targets=hip-amdgcn-amd-amdhsa-" + arch +
" --inputs=" + obj_path.string() + " --outputs=" + obj_path.string() +
".hsaco --unbundle");
}
} }
const std::string ext = is_hcc_compiler() ? ".hsaco" : ".o";
for(const auto& entry : fs::directory_iterator{td.path}) for(const auto& entry : fs::directory_iterator{td.path})
{ {
const auto& obj_path = entry.path(); const auto& obj_path = entry.path();
if(not fs::is_regular_file(obj_path)) if(not fs::is_regular_file(obj_path))
continue; continue;
if(obj_path.extension() != ".hsaco") if(obj_path.extension() != ext)
continue; continue;
hsacos.push_back(read_buffer(obj_path.string())); hsacos.push_back(read_buffer(obj_path.string()));
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment