Commit 35a9809
hipblaslt: stop the build detecting a bare gfx1250 on strict silicon
_detectArchNames asks a device enumerator first so that a target.lst or an
HSA_OVERRIDE_GFX_VERSION pin still wins, and took that answer verbatim.
As of ROCm 10.2 amdgpu-arch -- the default enumerator -- is a trampoline
that execs offload-arch, which names an agent from the KFD node's
gfx_target_version alone and loads neither ROCr nor HIP. Both gfx1250
steppings publish 120500 there, since the revision lives in the node's
capability bits 25:22 that offload-arch never reads, so an A0 part came
back as a bare "gfx1250" and the detect_gpu_archs fallback never ran.
Configs that name no ISA take their target from here, so on strict
silicon they built and tuned as base. Nothing failed to say so: a base
code object still loads and still runs on A0, the strict hazard
workarounds were simply absent, and the only sign was the architecture in
the artifact path. Route the enumerator's answer through
restore_steppings.
ROCr does apply the revision rule and rocminfo reports through ROCr, so
it still answers gfx1250-strict. Letting rocminfo only ever lengthen a
name keeps each tool doing what it is good for: rocminfo needs read-write
/dev/kfd, so a caller outside the render group gets nothing from it and
has to keep enumerating with amdgpu-arch. A base rocminfo reports under
more than one spelling is left alone rather than guessed at, since a box
holding both steppings has no single right answer to substitute, and a
base the enumeration already spells with a stepping is left alone for the
same reason from the other direction -- that answer came from a tool that
can tell the two apart on this box, so the device rocminfo happens not to
be reporting would otherwise be renamed to its neighbour's stepping.
Three testenvs had been adding --gpu-targets to the Tensile options
whenever the detected name ended in -strict. That covered for the
detection defect above while causing one of its own, forcing the strict
stepping onto configs pinned to other ISAs; with detection fixed it is
both unnecessary and wrong, so all three are gone. Adding --gpu-targets to
make a strict test pass is a symptom of this bug rather than a fix for it.
The same three testenvs exported TENSILE_ARCHITECTURE from the detected
name, which would put an unnormalized string back into Tensile downstream
of the normalization below. Nothing else reads the variable, so those are
gone too.
HSA_DISABLE_GFX12_STRICT picks which stepping the runtime reports on a
revision-0 part, and tox does not inherit a variable that is not listed,
so it read as unset inside the testenv -- which on ROCm 10.2 means the
base one. That name drives both test selection through skip-<arch> and
the client build, so dropping it did not narrow the run, it ran the base
half of the corpus on strict silicon and reported green.
An installed ROCm ships libtensilelite-host.so.1 too, and $ROCM_PATH/lib
ahead of the build directory let that copy win. The two are not
interchangeable: CMakeLists.txt defines TENSILE_YAML or TENSILE_MSGPACK
and never both, so a msgpack-only host library has no reader for the YAML
libraries Tensile writes by default. Every hardware config then failed at
once, the client dying on "Failed to load solution library" before it ran
a single GEMM, so put the build directory first.
build-client only overrides the compilers when it is given a ROCm path and
has no detection fallback of its own, so CMake's search won and found
/opt/rocm's amdclang++ -- which rejects gfx1250-strict outright on a host
whose system ROCm predates the target. Pin $ROCM_PATH at each call site.
The quotes are escaped because tox parses the command with shlex and would
otherwise strip them before the inner shell ever sees them.
The test-side detection called rocm_agent_enumerator, which parses
rocminfo with a capture group ending at gfx\d+ and so truncates a suffix
in exactly the way described above. That list is what config_helpers.
configMarks keys its skip-<arch> marks off, and the two spellings of a
config carry mirrored marks -- a strict config says skip-gfx1250, a base
config says skip-gfx1250-strict. Handing that comparison a truncated name
therefore reverses the selection rather than narrowing it. Read through
Tensile.GpuArch instead, the same detection the build uses, with
TENSILE_ROCM_PATH applied around the call and taken back out again so the
test-specific override does not leak into anything the tests launch.
That detection answers with a configuration rather than an architecture,
so the answer needs normalizing before a mark name is built from it:
amdgpu-arch names a gfx90a agent gfx90a:sramecc+:xnack-, listing the
target features that agent happens to have, while a mark is written for
the architecture. Since configMarks builds its names by concatenation --
"skip-%s" % arch -- an unnormalized answer looks for
skip-gfx90a:sramecc+:xnack- and finds nothing any config file spells,
unskipping every config pinned off that architecture: 446 tests on
gfx90a, 380 on gfx942, 324 on gfx950, each announced beforehand by an
Unknown pytest.mark warning carrying the feature string that nobody reads
as an error. Route the answer through cmake_gpu_target, the same
normalization the build spells GPU_TARGETS with, so only the
colon-delimited features come off. The hyphenated stepping stays, for the
mirrored-mark reason above: truncating gfx1250-strict to gfx1250 does not
narrow that selection either, it reverses it. The enumerator this
replaces had been taking the features off as a side effect of taking the
stepping off, which is why both axes have to be spelled out here.
_rocmShimReporting shims the detection tools through a fake ROCM_PATH so a
test cannot fall through to PATH and answer from the machine running it.
rocminfo is now consulted to restore a stepping, so it needs shimming for
the same reason; left out, it reported this machine's stepping onto
whatever architecture the caller asked for. It is the one tool here asked
in its own format, read for indented Name: lines rather than bare ones.
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 17f9023 commit 35a9809
5 files changed
Lines changed: 181 additions & 58 deletions
File tree
- projects/hipblaslt/tensilelite
- Tensile
- Common
- Tests
- unit
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
519 | 519 | | |
520 | 520 | | |
521 | 521 | | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
522 | 529 | | |
523 | | - | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
524 | 533 | | |
525 | 534 | | |
526 | 535 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
103 | 184 | | |
104 | 185 | | |
105 | 186 | | |
106 | 187 | | |
107 | 188 | | |
108 | 189 | | |
109 | | - | |
110 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
111 | 193 | | |
112 | 194 | | |
113 | 195 | | |
114 | 196 | | |
115 | 197 | | |
| 198 | + | |
| 199 | + | |
116 | 200 | | |
117 | 201 | | |
118 | 202 | | |
119 | 203 | | |
120 | 204 | | |
121 | | - | |
| 205 | + | |
122 | 206 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
130 | 210 | | |
131 | 211 | | |
132 | 212 | | |
| |||
Lines changed: 51 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
31 | 58 | | |
32 | 59 | | |
33 | 60 | | |
34 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
35 | 80 | | |
36 | 81 | | |
37 | 82 | | |
38 | 83 | | |
39 | 84 | | |
40 | 85 | | |
41 | 86 | | |
42 | | - | |
43 | | - | |
| 87 | + | |
| 88 | + | |
44 | 89 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 90 | + | |
| 91 | + | |
60 | 92 | | |
61 | 93 | | |
62 | 94 | | |
| |||
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3380 | 3380 | | |
3381 | 3381 | | |
3382 | 3382 | | |
| 3383 | + | |
| 3384 | + | |
| 3385 | + | |
| 3386 | + | |
| 3387 | + | |
| 3388 | + | |
3383 | 3389 | | |
3384 | 3390 | | |
3385 | | - | |
| 3391 | + | |
| 3392 | + | |
| 3393 | + | |
| 3394 | + | |
| 3395 | + | |
3386 | 3396 | | |
3387 | 3397 | | |
3388 | | - | |
| 3398 | + | |
3389 | 3399 | | |
3390 | 3400 | | |
3391 | 3401 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
34 | 43 | | |
35 | 44 | | |
36 | 45 | | |
| |||
50 | 59 | | |
51 | 60 | | |
52 | 61 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | 62 | | |
57 | | - | |
58 | | - | |
| 63 | + | |
| 64 | + | |
59 | 65 | | |
60 | 66 | | |
61 | 67 | | |
| |||
80 | 86 | | |
81 | 87 | | |
82 | 88 | | |
83 | | - | |
| 89 | + | |
84 | 90 | | |
85 | 91 | | |
86 | 92 | | |
| |||
190 | 196 | | |
191 | 197 | | |
192 | 198 | | |
193 | | - | |
194 | 199 | | |
195 | | - | |
| 200 | + | |
196 | 201 | | |
197 | 202 | | |
198 | 203 | | |
| |||
207 | 212 | | |
208 | 213 | | |
209 | 214 | | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
| 215 | + | |
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
231 | 230 | | |
232 | 231 | | |
233 | 232 | | |
| |||
503 | 502 | | |
504 | 503 | | |
505 | 504 | | |
506 | | - | |
507 | 505 | | |
508 | | - | |
| 506 | + | |
509 | 507 | | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
| 508 | + | |
516 | 509 | | |
517 | 510 | | |
518 | 511 | | |
| |||
524 | 517 | | |
525 | 518 | | |
526 | 519 | | |
527 | | - | |
528 | 520 | | |
529 | 521 | | |
530 | 522 | | |
| |||
0 commit comments