mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1759] [CLOSED] tools tests: test_amd_is_not_asked mocks the Linux HIP engine build too (it wrote sys.prefix/.strata-rocm.json) #3654
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3654
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/1759
Author: @chaog992
Created: 10/9/2026
Status: ❌ Closed
Base:
main← Head:unsloth-hip-test-linux📝 Commits (1)
cfa6197tools tests: test_amd_is_not_asked mocks the Linux HIP engine build too (it wrote sys.prefix/.strata-rocm.json)📊 Changes
1 file changed (+2 additions, -1 deletions)
View changed files
📝
tools/test_setup_unsloth.py(+2 -1)📄 Description
Title
Issue: no dedicated issue opened. This is the separate Unsloth test failure noted in #1658.
Related precedent: #975, fixed test-only in
d1ec32b. This change is independent of #1658.Summary
IQ4XS.test_amd_is_not_askedmocksget_prebuilt_hip, which setup uses on Windows, but notbuild_engine_hip,which setup uses on Linux. The tested Linux machine has no usable system ROCm, so the test runs setup's real ROCm step.
That step requests AMD's ROCm package index, writes
Path(sys.prefix)/.strata-rocm.jsonand tries to launchrocm-sdk. The file's docstring promises "Mocked - no GPU, no downloads, nothing written outside a temp folder".With the system Python, the stamp write raises
PermissionError. In a fresh venv the test passes and leaves thestamp, even though
setup.main()has stopped with exit code 1: its two string assertions do not check that setupcompleted. A stamp with the same version and index can also make a later setup in that environment skip the ROCm
install.
What changed
tools/test_setup_unsloth.py(+2/-1): the test also mocksbuild_engine_hip, returning the same temporary enginedirectory as the existing
get_prebuilt_hipmock.setup.pyand the assertions are unchanged. No CUDA, HIP or SYCL engine code is changed.Extra Notes
WSL2, Ubuntu 24.04.1. Base
fb58e0d, headcfa6197.python3 -m unittest tools.test_setup_unsloth, three runs per revision with the system Python 3.12.3 and with avenv made from it:
setup.main()call in a venv:rocm-sdk path --root;assertion, so the test still guards what it is for.
failures remain in
test_setup_risk(#1658 addresses it) andtest_setup_engine_hash(#1510 addresses it).nvidia-smiqueries.setup.WIN=Trueon Linux, this test stops at the device check on both revisions. So an exit-code assertionwould also need a
hip_cardmock.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.