Skip to content

Commit

Permalink
Add AMD GPU configuration info (iree-org#9731)
Browse files Browse the repository at this point in the history
  • Loading branch information
erman-gurses authored Jul 7, 2022
1 parent dd94ed3 commit acb9188
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,12 @@ class ROCMTargetBackend final : public TargetBackend {
MLIRContext *context) const {
Builder b(context);
SmallVector<NamedAttribute> configItems;
// Add some configurations to the `hal.executable.target` attribute.
auto addConfig = [&](StringRef name, Attribute value) {
configItems.emplace_back(StringAttr::get(context, name), value);
};
// Set target arch
addConfig("target_arch", StringAttr::get(context, clROCMTargetChip));

auto configAttr = b.getDictionaryAttr(configItems);
return IREE::HAL::ExecutableTargetAttr::get(
Expand Down

0 comments on commit acb9188

Please sign in to comment.