Skip to content

Commit 35a9809

Browse files
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/Architectures.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
from .Types import IsaVersion
3131
from .Utilities import print1
32-
from ..GpuArch import detect_gpu_archs
32+
from ..GpuArch import detect_gpu_archs, restore_steppings
3333

3434
import rocisa
3535

@@ -519,8 +519,17 @@ def _detectArchNames(detectionTool) -> List[str]:
519519
What steppings changed is not the order but what survives the answer: the
520520
name used to be rebuilt from its ISA, and gfx1250-strict shares (12,5,0)
521521
with gfx1250, so the rebuild silently reported the wrong stepping.
522+
523+
The enumerator's answer goes through ``restore_steppings`` because asking it
524+
first is not free: as of ROCm 10.2 amdgpu-arch -- the default enumerator --
525+
names an A0 gfx1250 part "gfx1250", so the enumerator always answered and
526+
the ``detect_gpu_archs`` fallback never ran. Configs that name no ISA get
527+
their target from here, so a strict part built and tuned as base, and the
528+
only sign was the arch in the artifact path.
522529
"""
523-
return _fromEnumerator(detectionTool) or _supportedArchNames(detect_gpu_archs())
530+
return restore_steppings(_fromEnumerator(detectionTool)) or _supportedArchNames(
531+
detect_gpu_archs()
532+
)
524533

525534

526535
def _fromEnumerator(detectionTool) -> List[str]:

projects/hipblaslt/tensilelite/Tensile/GpuArch.py

Lines changed: 90 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,33 +100,113 @@ def _real_archs(names):
100100
return [name for name in names if name and name != _PLACEHOLDER_ARCH]
101101

102102

103+
def _base_arch(name):
104+
"""``name`` without its stepping suffix or its target features.
105+
106+
A stepping is hyphenated onto the base name (``gfx1250-strict``) while
107+
features are colon-delimited and may carry hyphens of their own
108+
(``gfx950:sramecc+:xnack-``), so the base ends at whichever comes first.
109+
"""
110+
return name.partition(":")[0].split("-", 1)[0]
111+
112+
113+
def _rocminfo_archs(rocminfo):
114+
"""The agent names rocminfo reports, or ``[]`` if it is absent or fails.
115+
116+
rocminfo needs read-write /dev/kfd, so a caller outside the render group
117+
gets the empty list rather than an error -- which is why it supplements
118+
amdgpu-arch here instead of replacing it.
119+
"""
120+
if not rocminfo:
121+
return []
122+
output = _run([rocminfo])
123+
if not output:
124+
return []
125+
return _real_archs(_ROCMINFO_AGENT_RE.findall(output))
126+
127+
128+
def _restore_steppings(archs, rocminfo_archs):
129+
"""``archs``, with any stepping suffix only rocminfo reports put back.
130+
131+
amdgpu-arch stopped being able to report a stepping in ROCm 10.2: it is now
132+
a trampoline that execs offload-arch, which names an agent from the KFD
133+
node's ``gfx_target_version`` alone and loads neither ROCr nor HIP. Both
134+
gfx1250 steppings publish 120500 there -- the revision lives in the node's
135+
``capability`` bits 25:22, which offload-arch never reads -- so an A0 part
136+
comes back as a bare "gfx1250". ROCr does apply that rule, and rocminfo
137+
reports through ROCr, so it still answers "gfx1250-strict".
138+
139+
Letting rocminfo only ever *lengthen* a name keeps each tool doing what it
140+
is good for: amdgpu-arch still enumerates, and rocminfo contributes a suffix
141+
only for a base the two already agree on. A base rocminfo reports under more
142+
than one spelling is left alone rather than guessed at, since a box holding
143+
both steppings has no single right answer to substitute.
144+
145+
A base ``archs`` itself already spells with a stepping is left alone for the
146+
same reason from the other direction: that answer came from a tool that can
147+
tell the two apart on this box, so there is nothing to restore, and the
148+
device rocminfo happens not to be reporting would otherwise be renamed to
149+
its neighbour's stepping.
150+
"""
151+
by_base = {}
152+
for name in rocminfo_archs:
153+
by_base.setdefault(_base_arch(name), set()).add(name.partition(":")[0])
154+
155+
told_apart = {
156+
_base_arch(name) for name in archs if _base_arch(name) != name.partition(":")[0]
157+
}
158+
159+
restored = []
160+
for arch in archs:
161+
head, separator, features = arch.partition(":")
162+
unrestorable = head != _base_arch(head) or head in told_apart
163+
candidates = set() if unrestorable else by_base.get(head, set())
164+
if len(candidates) == 1:
165+
(only,) = candidates
166+
if only.startswith(head + "-"):
167+
head = only
168+
restored.append(head + separator + features)
169+
return restored
170+
171+
172+
def restore_steppings(archs):
173+
"""``archs``, with any stepping suffix only rocminfo reports put back.
174+
175+
For callers holding an enumeration this module did not produce. Tensile's
176+
build path is one: it asks a device enumerator first so that a ``target.lst``
177+
or ``HSA_OVERRIDE_GFX_VERSION`` pin still wins, and every enumerator it can
178+
be pointed at truncates a stepping the same way amdgpu-arch does, so the
179+
answer needs the same cross-check before it names a compiler target.
180+
"""
181+
return _restore_steppings(archs, _rocminfo_archs(_tool(_ROCMINFO_RELPATHS)))
182+
183+
103184
def _probe():
104185
"""``(archs, any_tool_found)`` from the first tool that answers.
105186
106187
Deliberately does not use rocm_agent_enumerator: it parses rocminfo with a
107188
capture group that ends at ``gfx\\d+``, so it truncates a suffix and answers
108189
"gfx1250" for an agent rocminfo names "gfx1250-strict" -- which would build
109-
the wrong stepping's kernels without a word. amdgpu-arch and rocminfo both
110-
report the full name.
190+
the wrong stepping's kernels without a word. amdgpu-arch truncates the same
191+
way as of ROCm 10.2, so its answer is cross-checked against rocminfo, the
192+
one local source that applies the revision rule; see ``_restore_steppings``.
111193
112194
The second element separates "no ROCm here" from "ROCm is here but reported
113195
nothing usable", which the callers report differently.
114196
"""
115197
amdgpu_arch = _tool(_AMDGPU_ARCH_RELPATHS)
198+
rocminfo = _tool(_ROCMINFO_RELPATHS)
199+
116200
if amdgpu_arch:
117201
output = _run([amdgpu_arch])
118202
if output:
119203
archs = _real_archs(_ARCH_LINE_RE.findall(output))
120204
if archs:
121-
return archs, True
205+
return _restore_steppings(archs, _rocminfo_archs(rocminfo)), True
122206

123-
rocminfo = _tool(_ROCMINFO_RELPATHS)
124-
if rocminfo:
125-
output = _run([rocminfo])
126-
if output:
127-
archs = _real_archs(_ROCMINFO_AGENT_RE.findall(output))
128-
if archs:
129-
return archs, True
207+
archs = _rocminfo_archs(rocminfo)
208+
if archs:
209+
return archs, True
130210

131211
return [], bool(amdgpu_arch or rocminfo)
132212

projects/hipblaslt/tensilelite/Tensile/Tests/gpu_detection.py

Lines changed: 51 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,37 +26,69 @@
2626
GPU architecture detection for TensileLite unit and common tests.
2727
"""
2828

29+
import contextlib
2930
import os
30-
import subprocess
31+
32+
from Tensile.GpuArch import cmake_gpu_target, detect_gpu_archs
33+
34+
35+
@contextlib.contextmanager
36+
def _rocmPathFromTestOverride():
37+
"""``TENSILE_ROCM_PATH`` standing in for ``ROCM_PATH`` inside the block.
38+
39+
``Tensile.GpuArch`` reads ``ROCM_PATH``, the variable the build uses. The
40+
tests keep their own override so a run can probe a different install without
41+
moving the one the build points at, so it is applied here and taken back
42+
out again rather than leaking into anything the tests go on to launch.
43+
"""
44+
override = os.environ.get("TENSILE_ROCM_PATH")
45+
if not override:
46+
yield
47+
return
48+
49+
previous = os.environ.get("ROCM_PATH")
50+
os.environ["ROCM_PATH"] = override
51+
try:
52+
yield
53+
finally:
54+
if previous is None:
55+
del os.environ["ROCM_PATH"]
56+
else:
57+
os.environ["ROCM_PATH"] = previous
3158

3259

3360
def get_available_archs() -> list[str]:
34-
"""Get list of available GPU architectures via rocm_agent_enumerator.
61+
"""Get list of available GPU architectures, one entry per distinct name.
62+
63+
Reads through ``Tensile.GpuArch``, the same detection the build uses, so a
64+
stepping suffix survives. It has to: ``config_helpers.configMarks`` keys its
65+
``skip-<arch>`` marks off this list, and the two spellings of a config carry
66+
mirrored marks -- a strict config says ``skip-gfx1250``, a base config says
67+
``skip-gfx1250-strict``. Handing that comparison a truncated ``gfx1250`` for
68+
an agent named ``gfx1250-strict`` therefore does not narrow the selection,
69+
it reverses it: every base config runs against a strict client and every
70+
strict config is skipped. ``rocm_agent_enumerator``, which this used to
71+
call, truncates in exactly that way.
72+
73+
The target features go, through the same ``cmake_gpu_target`` the build
74+
spells ``GPU_TARGETS`` with. A detection tool answers with a configuration,
75+
so amdgpu-arch names a gfx90a agent ``gfx90a:sramecc+:xnack-``, and a mark
76+
is written for the architecture rather than for one agent's features:
77+
``skip-gfx90a`` never matches ``skip-gfx90a:sramecc+:xnack-``, so keeping
78+
them would unskip every config pinned off this architecture. Only the
79+
colon-delimited features come off; the hyphenated stepping stays.
3580
3681
Environment variable priority:
3782
1. TENSILE_ROCM_PATH (test-specific override)
3883
2. ROCM_PATH (standard ROCm variable)
3984
3. /opt/rocm (default)
4085
4186
Returns:
42-
List of unique gfx architecture strings (e.g. ["gfx950"]).
43-
Returns empty list if rocm_agent_enumerator is not found or fails.
87+
List of unique gfx architecture strings (e.g. ["gfx1250-strict"]).
88+
Returns empty list if no detection tool is found or all of them fail.
4489
"""
45-
rocmpath = os.environ.get(
46-
"TENSILE_ROCM_PATH", os.environ.get("ROCM_PATH", "/opt/rocm")
47-
)
48-
enumerator = os.path.join(rocmpath, "bin", "rocm_agent_enumerator")
49-
if not os.path.exists(enumerator):
50-
return []
51-
try:
52-
output = subprocess.check_output([enumerator, "-t", "GPU"])
53-
return list(dict.fromkeys(
54-
line.strip()
55-
for line in output.decode().splitlines()
56-
if line.strip() and "gfx000" not in line
57-
))
58-
except (FileNotFoundError, subprocess.CalledProcessError):
59-
return []
90+
with _rocmPathFromTestOverride():
91+
return list(dict.fromkeys(map(cmake_gpu_target, detect_gpu_archs())))
6092

6193

6294
def has_arch(target: str) -> bool:

projects/hipblaslt/tensilelite/Tensile/Tests/unit/test_arch_steppings.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3380,12 +3380,22 @@ def _rocmShimReporting(tmp_path, arch):
33803380
PATH and answer from the machine running the test. The tools are shimmed
33813381
through ROCM_PATH rather than PATH because both resolvers look under the
33823382
ROCm install first; everything else the script needs is still found on PATH.
3383+
3384+
rocminfo is shimmed for the same reason, and is the one tool here that is
3385+
asked in its own format: it is consulted to put back a stepping the other
3386+
two truncate, and it is read for indented ``Name:`` lines rather than bare
3387+
ones. Left out, it would report this machine's stepping onto whatever
3388+
architecture the caller asked for.
33833389
"""
33843390
root = tmp_path / "rocm"
3385-
for relative in ("bin/rocm_agent_enumerator", "lib/llvm/bin/amdgpu-arch"):
3391+
for relative, body in (
3392+
("bin/rocm_agent_enumerator", f"echo {arch}"),
3393+
("lib/llvm/bin/amdgpu-arch", f"echo {arch}"),
3394+
("bin/rocminfo", f'echo " Name: {arch}"'),
3395+
):
33863396
tool = root / relative
33873397
tool.parent.mkdir(parents=True, exist_ok=True)
3388-
tool.write_text(f"#!/bin/sh\necho {arch}\n")
3398+
tool.write_text(f"#!/bin/sh\n{body}\n")
33893399
tool.chmod(tool.stat().st_mode | stat.S_IEXEC)
33903400
return root
33913401

projects/hipblaslt/tensilelite/tox.ini

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,20 @@ deps =
2626
invoke
2727
setenv =
2828
ROCM_PATH = {env:ROCM_PATH:/opt/rocm}
29-
LD_LIBRARY_PATH = {env:ROCM_PATH:/opt/rocm}/lib:{env:LD_LIBRARY_PATH:}
29+
# The client's build dir has to come first. An installed ROCm also ships
30+
# libtensilelite-host.so.1, and that copy is msgpack-only, so it cannot read
31+
# the YAML libraries Tensile writes by default. Let it win and every
32+
# hardware config fails at once with "Failed to load solution library".
33+
LD_LIBRARY_PATH = {toxinidir}/build_tmp/tensilelite:{env:ROCM_PATH:/opt/rocm}/lib:{env:LD_LIBRARY_PATH:}
3034
TENSILE_CLIENT_STATIC = {env:TENSILE_CLIENT_STATIC:}
3135
TENSILELITE_CLIENT_ARGS = {env:TENSILELITE_CLIENT_ARGS:}
3236
TENSILE_NUM_PYTEST_WORKERS = {env:TENSILE_NUM_PYTEST_WORKERS:4}
3337
passenv =
38+
; Picks which stepping the runtime reports on a revision-0 gfx1250 part, and
39+
; on ROCm 10.2 unset means the base one. That name drives both test selection
40+
; (through skip-<arch>) and the client build, so dropping it here does not
41+
; narrow the run -- it runs the base half of the corpus on strict silicon.
42+
HSA_DISABLE_GFX12_STRICT
3443
; FFM variables
3544
HSA_MODEL_TOPOLOGY
3645
HSA_MODEL_TOML
@@ -50,12 +59,9 @@ commands =
5059
pytest -v --basetemp={envtmpdir} --junit-xml={toxinidir}/rocisa_tests.xml --junit-prefix=rocisa --color=yes -n {env:TENSILE_NUM_PYTEST_WORKERS:4} {toxinidir}/rocisa/test
5160
pip install pytest-cov
5261
sh -c "ARCH=$(invoke get-gpu-arch); \
53-
export TENSILE_ARCHITECTURE=\$ARCH; \
54-
EXTRA_TENSILE_OPTS=; \
55-
case $ARCH in *-strict) EXTRA_TENSILE_OPTS=--tensile-options=--gpu-targets,$ARCH;; esac; \
5662
export TENSILELITE_CLIENT_ARGS='{env:TENSILELITE_CLIENT_ARGS:} --gpu-targets '$ARCH; \
57-
invoke build-client --build-dir {toxinidir}/build_tmp $TENSILELITE_CLIENT_ARGS || exit $?; \
58-
pytest -v --basetemp={envtmpdir} --junit-xml={toxinidir}/python_tests.xml --junit-prefix={envname} --color=yes -n $TENSILE_NUM_PYTEST_WORKERS --prebuilt-client={toxinidir}/build_tmp/tensilelite/client/tensilelite-client --global-parameters CheckASMCodeSize=True $EXTRA_TENSILE_OPTS {toxinidir}/Tensile/Tests {posargs}; \
63+
invoke build-client --build-dir {toxinidir}/build_tmp --rocm-path \"$ROCM_PATH\" $TENSILELITE_CLIENT_ARGS || exit $?; \
64+
pytest -v --basetemp={envtmpdir} --junit-xml={toxinidir}/python_tests.xml --junit-prefix={envname} --color=yes -n $TENSILE_NUM_PYTEST_WORKERS --prebuilt-client={toxinidir}/build_tmp/tensilelite/client/tensilelite-client --global-parameters CheckASMCodeSize=True {toxinidir}/Tensile/Tests {posargs}; \
5965
rc=$?; test $rc -eq 5 && exit 0; exit $rc"
6066
allowlist_externals =
6167
mkdir
@@ -80,7 +86,7 @@ basepython = python3
8086
commands =
8187
pip install {toxinidir}/rocisa/
8288
sh -c "ARCH=$(invoke get-gpu-arch); \
83-
invoke build-client --build-dir {toxinidir}/build_tmp --enable-sdma --gpu-targets $ARCH || exit $?; \
89+
invoke build-client --build-dir {toxinidir}/build_tmp --enable-sdma --rocm-path \"$ROCM_PATH\" --gpu-targets $ARCH || exit $?; \
8490
pytest -v --basetemp={envtmpdir} --junit-xml={toxinidir}/comm_tests.xml --junit-prefix={envname} --color=yes -m comm --prebuilt-client={toxinidir}/build_tmp/tensilelite/client/tensilelite-client {toxinidir}/Tensile/Tests {posargs}; \
8591
rc=$?; test $rc -eq 5 && exit 0; exit $rc"
8692

@@ -190,9 +196,8 @@ commands =
190196

191197
# Build the client
192198
sh -c "ARCH=$(invoke get-gpu-arch); \
193-
export TENSILE_ARCHITECTURE=\$ARCH; \
194199
export TENSILELITE_CLIENT_ARGS='{env:TENSILELITE_CLIENT_ARGS:} --gpu-targets '$ARCH; \
195-
invoke build-client --build-dir {toxinidir}/build_tmp $TENSILELITE_CLIENT_ARGS"
200+
invoke build-client --build-dir {toxinidir}/build_tmp --rocm-path \"$ROCM_PATH\" $TENSILELITE_CLIENT_ARGS"
196201

197202
# Run unit tests with coverage (no report yet)
198203
pytest --cov=Tensile --cov=rocisa \
@@ -207,12 +212,7 @@ commands =
207212
{toxinidir}/Tensile/Tests/unit
208213

209214
# Run common tests with coverage (append to existing coverage data).
210-
# Wrapped in sh -c so the tests target the arch the runtime reports, which on
211-
# gfx1250 A0 silicon is gfx1250-strict rather than gfx1250.
212-
sh -c "ARCH=$(invoke get-gpu-arch); \
213-
EXTRA_TENSILE_OPTS=; \
214-
case $ARCH in *-strict) EXTRA_TENSILE_OPTS=--tensile-options=--gpu-targets,$ARCH;; esac; \
215-
pytest --cov=Tensile --cov=rocisa \
215+
sh -c "pytest --cov=Tensile --cov=rocisa \
216216
--cov-config={toxinidir}/pyproject.toml \
217217
--cov-append \
218218
--cov-report=html:{toxinidir}/htmlcov \
@@ -227,7 +227,6 @@ commands =
227227
-m common \
228228
--prebuilt-client={toxinidir}/build_tmp/tensilelite/client/tensilelite-client \
229229
--global-parameters CheckASMCodeSize=True \
230-
$EXTRA_TENSILE_OPTS \
231230
{toxinidir}/Tensile/Tests/common {posargs}"
232231

233232
# Generate detailed coverage report summary
@@ -503,16 +502,10 @@ commands =
503502
pip install {toxinidir}/rocisa/
504503

505504
sh -c "ARCH=$(invoke get-gpu-arch); \
506-
export TENSILE_ARCHITECTURE=\$ARCH; \
507505
export TENSILELITE_CLIENT_ARGS='{env:TENSILELITE_CLIENT_ARGS:} --gpu-targets '$ARCH; \
508-
invoke build-client --build-dir {toxinidir}/build_tmp $TENSILELITE_CLIENT_ARGS"
506+
invoke build-client --build-dir {toxinidir}/build_tmp --rocm-path \"$ROCM_PATH\" $TENSILELITE_CLIENT_ARGS"
509507

510-
# Wrapped in sh -c so the tests target the arch the runtime reports, which on
511-
# gfx1250 A0 silicon is gfx1250-strict rather than gfx1250.
512-
sh -c "ARCH=$(invoke get-gpu-arch); \
513-
EXTRA_TENSILE_OPTS=; \
514-
case $ARCH in *-strict) EXTRA_TENSILE_OPTS=--tensile-options=--gpu-targets,$ARCH;; esac; \
515-
pytest --cov=Tensile --cov=rocisa \
508+
sh -c "pytest --cov=Tensile --cov=rocisa \
516509
--cov-config={toxinidir}/pyproject.toml \
517510
--cov-report=html:{toxinidir}/htmlcov \
518511
--cov-report=xml:{toxinidir}/coverage.xml \
@@ -524,7 +517,6 @@ commands =
524517
-m common \
525518
--prebuilt-client={toxinidir}/build_tmp/tensilelite/client/tensilelite-client \
526519
--global-parameters CheckASMCodeSize=True \
527-
$EXTRA_TENSILE_OPTS \
528520
{toxinidir}/Tensile/Tests/common {posargs}"
529521

530522
coverage report --show-missing

0 commit comments

Comments
 (0)