[Mlir-commits] [mlir] [mlir] Target Description and Cost Model in MLIR (PR #85141)

Mehdi Amini llvmlistbot at llvm.org
Fri Mar 15 16:32:27 PDT 2024


================
@@ -240,6 +241,9 @@ class MLIRContext {
   /// (attributes, operations, types, etc.).
   llvm::hash_code getRegistryHash();
 
+  /// Get context-specific system description
+  SystemDesc &getSystemDesc();
----------------
joker-eph wrote:

> This would be costly, as no op today has a target ID and we assume less of them will have it than not have it.

I don't follow, this is something you do once at the beginning of the pass, and then cache and pass around.
Have you looked at the GPU target attributes? Or the DLTI? 

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


More information about the Mlir-commits mailing list