[clang] [offload-arch] Report gfx1250-strict to match rocminfo (PR #224480)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 18 06:13:23 PDT 2026
================
@@ -58,28 +61,39 @@ int printGPUsByKFD(StringRef NodePath) {
return 1;
long GFXVersion = 0;
+ uint64_t Capability = 0;
for (line_iterator Lines(**BufferOrErr, false); !Lines.is_at_end();
++Lines) {
- StringRef Line(*Lines);
- if (Line.consume_front("gfx_target_version")) {
- if (Line.drop_while([](char C) { return std::isspace(C); })
- .consumeInteger(10, GFXVersion))
+ // Split by ' ' to differentiate capability and capability2
+ auto [Key, Value] = StringRef(*Lines).split(' ');
+ if (Key == "gfx_target_version") {
+ if (Value.trim().consumeInteger(10, GFXVersion))
+ return 1;
+ } else if (Key == "capability") {
----------------
jhuber6 wrote:
We could possibly also just `consume_front` and then peek to see if the next char is `2`.
https://github.com/llvm/llvm-project/pull/224480
More information about the cfe-commits
mailing list