Skip to content

Fix #3930: Add tests for the host-target APX override - #4015

Draft
claude[bot] wants to merge 3 commits into
mainfrom
claude/issue-3930-20261015-2236
Draft

claude[bot] wants to merge 3 commits into
mainfrom
claude/issue-3930-20261015-2236

Conversation

@claude

@claude claude Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Fixes #3930

  • Add developer options --mock-host-target=<target> and --mock-host-os-apx=on|off (listed under --help-dev) so tests can supply the detected host target and OS APX state without NVL/DMR hardware. Both only affect host target selection; an explicit --target or --cpu ignores them.
  • Print the effective APX features (Target::getEnabledAPXFeatures()) in --print-target for x86-64 APX-capable targets (Target APX Features: <list>|none).
  • Add tests/lit-tests/host-apx-os-state.ispc covering NVL and DMR:
    • explicit/implicit host selection with OS APX off, with and without a partial --opt=disable-apx=egpr mask: all APX features disabled;
    • host selection with OS APX on: backend defaults kept, minus the user mask;
    • explicitly named targets / --cpu with OS APX off: backend defaults kept, minus the user mask;
    • an invalid --mock-host-target value is rejected.

The test fails if m_disabledAPX |= Opt::APX_all is removed. Lit tests pass locally with LLVM 23.1. The test requires LLVM_22_0+; the expected default APX list on LLVM 22 (without jmpabs) has not been verified.

🤖 Generated with Claude Code

Add developer options --mock-host-target=<target> and
--mock-host-os-apx=on|off so tests can supply the detected host target and
the OS APX state, and print the effective APX features
(Target::getEnabledAPXFeatures()) in --print-target for APX-capable
targets. Add a lit test that checks the override for NVL and DMR: host
selection with OS APX off disables all APX features, even with a partial
--opt=disable-apx mask; with OS APX on, or with an explicitly named
target or --cpu, the backend defaults are kept minus the user mask.

Co-authored-by: aneshlya <2833813+aneshlya@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dbabokin

Copy link
Copy Markdown
Collaborator

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 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-10T00:27:57.108187Z 421575f 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. Keep them coming!

Reviewed commit: 421575f265

ℹ️ 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".

aneshlya and others added 2 commits November 10, 2026 11:49
Document which target family to use for AMD Zen 4/5/6 and Intel Sapphire
Rapids, Granite Rapids, Diamond Rapids and Nova Lake, the default target
each --cpu selects, --cpu/--target compatibility, and the multi-target
rules: one target per ISA family, no --cpu, dispatch order, AMX gating and
the missing OS APX check. Gang sizes are documented as defaults only, not
as performance recommendations (discussion #3827).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
--mock-host-target now rejects non-x86 targets, and --mock-host-os-apx
warns that it is ignored on non-x86 hosts. The target guide keeps only
user-visible facts that are not documented elsewhere and links to the
existing APX, AMX and multi-target documentation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

Add tests for the host-target APX override when the OS lacks APX support

2 participants