[Mlir-commits] [mlir] Reimplementing target description concept using DLTI attribute (PR #92138)

Niranjan Hasabnis llvmlistbot at llvm.org
Thu May 30 03:45:11 PDT 2024


================
@@ -214,10 +244,23 @@ class DataLayout {
   /// unspecified.
   uint64_t getStackAlignment() const;
 
+  /// Returns for max vector op width if the property is defined for the given
+  /// device ID, otherwise return std::nullopt.
+  std::optional<uint32_t>
+      getMaxVectorOpWidth(TargetDeviceDescSpecInterface::DeviceID) const;
+
+  /// Returns for L1 cache size if the property is defined for the given
+  /// device ID, otherwise return std::nullopt.
+  std::optional<uint32_t>
+      getL1CacheSizeInBytes(TargetDeviceDescSpecInterface::DeviceID) const;
+
 private:
   /// Combined layout spec at the given scope.
   const DataLayoutSpecInterface originalLayout;
 
+  /// Combined target system desc spec at the given scope.
+  const TargetSystemDescSpecInterface originalTargetSystemDesc;
+
----------------
nhasabni wrote:

I agree. However, at this point, it is a bit unclear how the properties will evolve and will be used.

https://github.com/llvm/llvm-project/pull/92138


More information about the Mlir-commits mailing list