[Mlir-commits] [mlir] [mlir][gpu][transforms] Add support for mapping to lanes (PR #146912)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Fri Jul 4 14:34:18 PDT 2025


================
@@ -106,6 +106,20 @@ int64_t GPUThreadMappingAttr::getRelativeIndex() const {
              : getMappingId();
 }
 
+int64_t GPULaneMappingAttr::getMappingId() const {
+  return static_cast<int64_t>(getLane());
+}
+
+bool GPULaneMappingAttr::isLinearMapping() const {
+  return getMappingId() >= static_cast<int64_t>(MappingId::LinearDim0);
+}
+
+int64_t GPULaneMappingAttr::getRelativeIndex() const {
----------------
ftynse wrote:

I'm mildly confused. Where are the declarations of these methods?

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


More information about the Mlir-commits mailing list