[Mlir-commits] [mlir] [mlir][NVVM] Reject malformed target chip names (PR #220873)
Mehdi Amini
llvmlistbot at llvm.org
Mon Sep 7 15:29:09 PDT 2026
================
@@ -62,16 +64,28 @@ struct NVVMCheckSMVersion {
// Parses an SM version string and returns an equivalent full SM version
// integer.
- static unsigned getTargetFullSmVersionFromStr(StringRef smVersionString) {
- bool isAA = smVersionString.back() == kArchAcceleratedSuffix;
- bool isFS = smVersionString.back() == kFamilySpecificSuffix;
+ static std::optional<unsigned>
+ getTargetFullSmVersionFromStr(StringRef smVersionString) {
+ if (!smVersionString.consume_front("sm_"))
----------------
joker-eph wrote:
Done — I added kStreamingMultiprocessorPrefix and use it in consume_front. I used “Prefix” because sm_ precedes the version.
https://github.com/llvm/llvm-project/pull/220873
More information about the Mlir-commits
mailing list