[GH-ISSUE #566] Proposal: extend existing calibration to Linux HIP #269

Closed
opened 2026-11-04 01:41:29 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @xyzzing on GitHub (Oct 3, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/566

Would you be open to a small contribution extending the existing calibration flow to Linux HIP?

In the revision I reviewed (db4f91a), setup excludes HIP from the calibration offer and saved-profile reuse, while the calibration hardware key uses NVIDIA-oriented GPU discovery.

I propose starting with:

Correct HIP device identification and calibration profile matching.
Would you be open to a small contribution extending the existing calibration flow to Linux HIP?

In the revision I reviewed (db4f91a), setup excludes HIP from the calibration offer and saved-profile reuse, while the calibration hardware key uses NVIDIA-oriented GPU discovery.

I propose starting with:

  • Correct HIP device identification and calibration profile matching.
  • The existing CPU worker count, PCIe work-share and speculative-confidence controls, after verifying each works on HIP
  • Preserving the current baseline and acceptance conventions, with configuration recovery if calibration fails.
  • Integration tests and repeated measurements on an RX 7900 XTX, documenting the actual hardware, software and workload.

The goal is to let AMD users tune the existing execution settings for their CPU/GPU combination. I would build on tools/calibrate.py and the current setup flow.

Broader workload tuning and RDNA3 matrix-core attention could follow as separate contributions once there is supporting evidence.

Does this scope fit your direction, and are there existing changes or interface preferences I should coordinate with before implementing it?

Originally created by @xyzzing on GitHub (Oct 3, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/566 Would you be open to a small contribution extending the existing calibration flow to Linux HIP? In the revision I reviewed (db4f91a), setup excludes HIP from the calibration offer and saved-profile reuse, while the calibration hardware key uses NVIDIA-oriented GPU discovery. I propose starting with: Correct HIP device identification and calibration profile matching. Would you be open to a small contribution extending the existing calibration flow to Linux HIP? In the revision I reviewed (db4f91a), setup excludes HIP from the calibration offer and saved-profile reuse, while the calibration hardware key uses NVIDIA-oriented GPU discovery. I propose starting with: - Correct HIP device identification and calibration profile matching. - The existing CPU worker count, PCIe work-share and speculative-confidence controls, after verifying each works on HIP - Preserving the current baseline and acceptance conventions, with configuration recovery if calibration fails. - Integration tests and repeated measurements on an RX 7900 XTX, documenting the actual hardware, software and workload. The goal is to let AMD users tune the existing execution settings for their CPU/GPU combination. I would build on tools/calibrate.py and the current setup flow. Broader workload tuning and RDNA3 matrix-core attention could follow as separate contributions once there is supporting evidence. Does this scope fit your direction, and are there existing changes or interface preferences I should coordinate with before implementing it?
Author
Owner

@Niko1221 commented on GitHub (Oct 3, 2026):

Yes, this fits, thanks for offering. Starting with HIP device identification and profile matching is the right first step (setup skips calibration on HIP today, setup.py around cal = None if hip, and hardware_key assumes NVIDIA). Then add the existing controls one at a time as you verify each on HIP.

A few preferences: small PRs (identification and matching first), the NVIDIA path's behavior and the saved settings format unchanged, tests in tools/test_calibrate.py / tools/test_setup_amd.py, and your 7900 XTX measurements in the PR description. RDNA3 attention work is best kept separate, as you suggest.

<!-- gh-comment-id:5970948879 --> @Niko1221 commented on GitHub (Oct 3, 2026): Yes, this fits, thanks for offering. Starting with HIP device identification and profile matching is the right first step (setup skips calibration on HIP today, `setup.py` around `cal = None if hip`, and `hardware_key` assumes NVIDIA). Then add the existing controls one at a time as you verify each on HIP. A few preferences: small PRs (identification and matching first), the NVIDIA path's behavior and the saved settings format unchanged, tests in `tools/test_calibrate.py` / `tools/test_setup_amd.py`, and your 7900 XTX measurements in the PR description. RDNA3 attention work is best kept separate, as you suggest.
Author
Owner

@Niko1221 commented on GitHub (Oct 4, 2026):

The first step is in 0.1.39 (there was no PR yet, so we wrote the small part ourselves):

  • Card identity: hardware_key (the settings file's key for a saved calibration) names a HIP config's cards from amd_gpus, in HIP's numbering, with the architecture in the name (AMD Radeon RX 7900 XTX (gfx1100)|24GB|...). Before, every AMD card was ?|0GB, and on a PC with an NVIDIA card too a HIP index named that NVIDIA card.
  • Matching: setup reuses a saved calibration on Linux HIP as it does on NVIDIA. A ./setup.sh --calibrate run by hand is kept for its card and model, and applied when setup runs again. Windows HIP keeps the defaults for now.
  • Setup still offers the tuning on NVIDIA only. The NVIDIA key and the settings format are unchanged.

We have no Linux AMD card here, so this is covered by unit tests (tools/test_setup_amd.py, CalibrationKey) only. A run on your 7900 XTX (./setup.sh --calibrate, then ./setup.sh --setup again, and check that it says "the settings tuned for this PC earlier are used") would be the real check. After that, the controls (CPU workers, PCIe share, spec confidence) one at a time as you verify each on HIP, as you planned. PRs for those are welcome.

<!-- gh-comment-id:5979966024 --> @Niko1221 commented on GitHub (Oct 4, 2026): The first step is in 0.1.39 (there was no PR yet, so we wrote the small part ourselves): - **Card identity:** `hardware_key` (the settings file's key for a saved calibration) names a HIP config's cards from `amd_gpus`, in HIP's numbering, with the architecture in the name (`AMD Radeon RX 7900 XTX (gfx1100)|24GB|...`). Before, every AMD card was `?|0GB`, and on a PC with an NVIDIA card too a HIP index named that NVIDIA card. - **Matching:** setup reuses a saved calibration on Linux HIP as it does on NVIDIA. A `./setup.sh --calibrate` run by hand is kept for its card and model, and applied when setup runs again. Windows HIP keeps the defaults for now. - Setup still offers the tuning on NVIDIA only. The NVIDIA key and the settings format are unchanged. We have no Linux AMD card here, so this is covered by unit tests (`tools/test_setup_amd.py`, `CalibrationKey`) only. A run on your 7900 XTX (`./setup.sh --calibrate`, then `./setup.sh --setup` again, and check that it says "the settings tuned for this PC earlier are used") would be the real check. After that, the controls (CPU workers, PCIe share, spec confidence) one at a time as you verify each on HIP, as you planned. PRs for those are welcome.
Author
Owner

@xyzzing commented on GitHub (Oct 7, 2026):

PR #1297 carries the remaining calibrate.py HIP surface re-based on current main: --calibrate-draft, --calibrate-prompts, the HIP PCIe-share left as configured, and load_prompts/EDIT_PROMPT. It is reconciled with main's host_worker_extras(). It rides with the kernel-shape PR so both are testable together. Happy to split it out if one PR per concern is preferred here too.

<!-- gh-comment-id:6030205405 --> @xyzzing commented on GitHub (Oct 7, 2026): PR #1297 carries the remaining `calibrate.py` HIP surface re-based on current main: `--calibrate-draft`, `--calibrate-prompts`, the HIP PCIe-share left as configured, and `load_prompts`/`EDIT_PROMPT`. It is reconciled with main's `host_worker_extras()`. It rides with the kernel-shape PR so both are testable together. Happy to split it out if one PR per concern is preferred here too.
Author
Owner

@Niko1221 commented on GitHub (Oct 13, 2026):

Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.

If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.

<!-- gh-comment-id:6155936290 --> @Niko1221 commented on GitHub (Oct 13, 2026): Thanks for the report. To keep the tracker current we are closing issues older than three days: [0.1.44](https://github.com/Niko1221/Strata/releases/tag/v0.1.44) is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1. If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#269
No description provided.