-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add AMDAIEDevice to the executable target config #528
Add AMDAIEDevice to the executable target config #528
Conversation
I was wondering about how this could/should work. LGTM but can you get rid of https://github.com/nod-ai/iree-amd-aie/blob/main/runtime/src/iree-amd-aie/aie_runtime/iree_aie_runtime.h#L59-L68 then. |
compiler/plugins/target/AMD-AIE/iree-amd-aie/Transforms/test/lower_to_aie.mlir
Outdated
Show resolved
Hide resolved
aedc86f
to
10b1454
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
if (!config) return std::nullopt; | ||
std::optional<StringAttr> attr = config.getAs<StringAttr>("target_device"); | ||
if (!attr) return std::nullopt; | ||
return AMDAIE::symbolizeEnum<AMDAIEDevice>(attr.value().getValue()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😎 yea I forgot mlir gives symbolize and stringify.
This enables passes pre-
aie.device
to retrieve the target AIE device, which I will use in later PRs to lookup hardware-related parameters from theAMDAIEDeviceModel
.