Skip to content

Commit

Permalink
Add compiler flag --iree-hip-target
Browse files Browse the repository at this point in the history
  • Loading branch information
PragmaTwice committed Nov 23, 2024
1 parent 2426649 commit 703df80
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion integrations/pjrt/src/iree_pjrt/rocm/client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,18 @@ iree_status_t ROCMClientInstance::CreateDriver(iree_hal_driver_t** out_driver) {
}

bool ROCMClientInstance::SetDefaultCompilerFlags(CompilerJob* compiler_job) {
return compiler_job->SetFlag("--iree-hal-target-backends=rocm");
auto flags = {
"--iree-hal-target-backends=rocm",

// TODO: gfx908 is just a placeholder here to make it work,
// we should instead detect the device target on the fly
"--iree-hip-target=gfx908",
};

for (auto flag : flags) {
if (!compiler_job->SetFlag(flag)) return false;
}
return true;
}

} // namespace iree::pjrt::rocm

0 comments on commit 703df80

Please sign in to comment.