Skip to content

Tests: follow install.ps1 widened AMD probe and hipinfo gates - #19327

Merged
danielhanchen merged 1 commit into
mainfrom
ci/install-ps1-mixed-host-anchors
Nov 24, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci/install-ps1-mixed-host-anchors

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Problem

Two install.ps1 source checks fail on main since #19181 (honour UNSLOTH_FORCE_ROCM_TORCH on a mixed NVIDIA + AMD Windows host):

  • tests/studio/install/test_rdna1_unsupported_message_8529.py::test_the_unsupported_arch_variable_is_declared_outside_the_amd_block
    AssertionError: install.ps1: the AMD declaration block was restructured; re-check this test
    
  • tests/studio/install/test_rocm_support.py::TestHipSdkInstalledButDeviceInaccessible::test_install_ps1_sets_flag_when_hipinfo_binary_found
    assert (-1 != -1)
    

Cause

#19181 widened two gates on purpose, and both tests anchored on the exact old text:

  • The AMD probe gate went from if (-not $HasNvidiaSmi) { to if (-not $HasNvidiaSmi -or $ProbeAmdBesideNvidia) {, so a mixed host is probed for the flag, mask and notice. $ROCmUnsupportedGfxArch = $null is still declared before that gate, which is the property the first test protects; its regex just no longer matched the gate line.
  • The hipinfo block went from if ($hipinfoExe) { to if ($hipinfoExe -and -not $script:StudioMuteLines) {. The silent, notice-only probe on an NVIDIA host that keeps CUDA does not run hipinfo, so an unbounded HIP tool cannot hold up that install (comment above the block). $HipSdkInstalled = $true is still the first statement inside it; the second test searched for the literal if ($hipinfoExe) and found nothing.

The installer is right in both places; the tests needed to follow it.

Fix

Test only:

  • The first test accepts any gate that starts if (-not $HasNvidiaSmi and still requires the declaration between $ROCmGfxArch = $null and that gate.
  • The second test finds the if ($hipinfoExe ...) block by regex, so extra conditions are allowed, but it still requires the gate to test $hipinfoExe and now also requires $HipSdkInstalled = $true to be the block's first statement (before it only had to appear somewhere after the gate).

Verification

  • Both files: 951 passed, 1 skipped (2 failed on main).
  • Sabotage on install.ps1, one at a time, each makes the matching test fail:
    • moving $ROCmUnsupportedGfxArch = $null inside the probe gate;
    • putting another statement before $HipSdkInstalled = $true;
    • dropping $hipinfoExe from the hipinfo gate.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T18:26:29.248296Z e2e7b0a Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: e2e7b0a9dd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit 58bfa7b into main Nov 24, 2026
1 of 17 checks passed
@danielhanchen
danielhanchen deleted the ci/install-ps1-mixed-host-anchors branch November 24, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant