[Mlir-commits] [mlir] [mlir][gpu] Add innermost-first policy when mapping loops to GPU IDs (PR #160634)
Georgios Pinitas
llvmlistbot at llvm.org
Thu Sep 25 05:30:40 PDT 2025
================
@@ -65,16 +66,29 @@ static MappingLevel &operator++(MappingLevel &mappingLevel) {
return mappingLevel;
}
+// Map the policy string to a typed mapping policy.
+static FailureOr<MappingPolicy> getMappingPolicyFromStr(StringRef policy) {
+ std::string policyCanonical = policy.trim().lower();
+
+ auto option =
+ llvm::StringSwitch<std::optional<MappingPolicy>>(policyCanonical)
----------------
GeorgeARM wrote:
Type is visible on the right-hand side. So I presume the use of `auto` here is fine?
https://github.com/llvm/llvm-project/pull/160634
More information about the Mlir-commits
mailing list