Cherry-pick some SPIR-V related MLIR commits (#11384)
* [mlir][spirv] Check GlobalVariableOp result to be of pointer types
* [mlir][spirv] Improve vector extract/insert element conversion
* [mlir][spirv] Allow controlling subgroup size
* [mlir][spirv] Fix missing parameter usage
diff --git a/compiler/src/iree/compiler/Codegen/SPIRV/ConvertToSPIRVPass.cpp b/compiler/src/iree/compiler/Codegen/SPIRV/ConvertToSPIRVPass.cpp
index acfc07a..f852273 100644
--- a/compiler/src/iree/compiler/Codegen/SPIRV/ConvertToSPIRVPass.cpp
+++ b/compiler/src/iree/compiler/Codegen/SPIRV/ConvertToSPIRVPass.cpp
@@ -337,8 +337,9 @@
}
auto workgroupSize32 = llvm::to_vector<4>(llvm::map_range(
workgroupSize, [](int64_t v) { return static_cast<int32_t>(v); }));
- funcOp->setAttr(spirv::getEntryPointABIAttrName(),
- spirv::getEntryPointABIAttr(workgroupSize32, context));
+ funcOp->setAttr(
+ spirv::getEntryPointABIAttrName(),
+ spirv::getEntryPointABIAttr(context, workgroupSize32, llvm::None));
}
spirv::TargetEnvAttr targetAttr = getSPIRVTargetEnvAttr(moduleOp);
diff --git a/compiler/src/iree/compiler/Dialect/Vulkan/Utils/TargetEnvironment.cpp b/compiler/src/iree/compiler/Dialect/Vulkan/Utils/TargetEnvironment.cpp
index 4280227..c65078f 100644
--- a/compiler/src/iree/compiler/Dialect/Vulkan/Utils/TargetEnvironment.cpp
+++ b/compiler/src/iree/compiler/Dialect/Vulkan/Utils/TargetEnvironment.cpp
@@ -171,6 +171,7 @@
context, vkCapabilities.getMaxComputeSharedMemorySize(),
vkCapabilities.getMaxComputeWorkGroupInvocations(),
builder.getI64ArrayAttr(sizes), vkCapabilities.getSubgroupSize(),
+ /*min_subgroup_size=*/llvm::None, /*max_subgroup_size=*/llvm::None,
ArrayAttr::get(context, spvAttrs));
}
} // anonymous namespace
diff --git a/third_party/llvm-project b/third_party/llvm-project
index 907e473..dd66553 160000
--- a/third_party/llvm-project
+++ b/third_party/llvm-project
@@ -1 +1 @@
-Subproject commit 907e473569b40da44cbef1d353e05363651cc66f
+Subproject commit dd6655376816622ffa9a344c651c7ea7be5cb2e7