[Mlir-commits] [mlir] [MLIR][DLTI] Pretty parsing and printing for DLTI attrs (PR #113365)
Rolf Morel
llvmlistbot at llvm.org
Wed Oct 30 07:19:28 PDT 2024
================
@@ -790,13 +790,22 @@ mlir::detail::verifyTargetSystemSpec(TargetSystemSpecInterface spec,
DenseMap<StringAttr, DataLayoutEntryInterface> deviceDescKeys;
DenseSet<TargetSystemSpecInterface::DeviceID> deviceIDs;
for (const auto &entry : spec.getEntries()) {
- TargetDeviceSpecInterface targetDeviceSpec = entry.second;
+ auto targetDeviceSpec =
+ llvm::dyn_cast<TargetDeviceSpecInterface>(entry.getValue());
----------------
rolfmorel wrote:
Indeed, there a couple places where I added superfluous `llvm::` before `dyn_cast`. Fix incoming soon.
Surprisingly, inside this function I need to have the prefix as otherwise I get the following errors:
```
mlir/lib/Dialect/DLTI/DLTI.cpp:441:9: error: call to non-static member function without an object argument
dyn_cast<TargetSystemSpecInterface::DeviceID>(entry.getKey());
^~~~~~~~
/data/nfs_home/rmorel/dev/llvm-project.git/dlti-parse/mlir/lib/Dialect/DLTI/DLTI.cpp:446:13: error: call to non-static member function without an object argument
dyn_cast<TargetDeviceSpecInterface>(entry.getValue())) {
^~~~~~~~
```
https://github.com/llvm/llvm-project/pull/113365
More information about the Mlir-commits
mailing list