mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3276] [CLOSED] [Other] setup: calibrate a dual config whose gpu is the string 0,1 #4541
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#4541
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/3276
Author: @MEsfits
Created: 10/19/2026
Status: ❌ Closed
Base:
main← Head:fix-calibrate-string-gpu-020📝 Commits (1)
3f52b2dsetup: calibrate a dual config whose gpu is the string 0,1 (#3275)📊 Changes
2 files changed (+31 additions, -2 deletions)
View changed files
📝
setup.py(+20 -2)📝
tools/test_setup_amd.py(+11 -0)📄 Description
Problem and result
Setup's calibration of a dual config whose
"gpu"is the string form"0,1"(accepted and split by serve) dies after all measurement rounds with[X] there is no GPU 0,1: 0 = NVIDIA GeForce RTX 3090 Ti, 1 = NVIDIA GeForce RTX 3090. Nothing is saved, because the hardware key the rounds are stored under cannot be computed.hardware_key()passed the raw value togpu_info(), which matches one card by number (x["index"] == pick), so the string matched nothing. List-form duals ([0, 1]) worked; only the string form died.recommend_remote_expert_opt()had the same blind spot: itsisinstance(cfg.get("gpu"), list)check skipped string-form duals, so they never got the helper-cache recommendation.After the fix the same config keys and calibrates exactly like the list form.
Related discussion
Fixes #3275. The identical fix was sent earlier for the 0.1.45 line (#2378) and did not land; the 0.2.0 tree still had the pre-fix line. Focused bug fix, no scope agreement needed.
Approach
gpu_sel(value): a config's"gpu"as a list of card numbers --0,[0, 2]and the string form"0,2"(which serve splits the same way);[]when it names none.hardware_key(): string-form selectors go throughgpu_sel()beforegpu_info().recommend_remote_expert_opt():len(gpu_sel(...)) < 2instead of theisinstance(..., list)check.CalibrationKey:"0,1"keys exactly like[0, 1];gpu_sel("0,1") == [0, 1],gpu_sel("0") == [0].The NVIDIA key format is unchanged (the existing test asserts it). No behavior change outside setup; serve and the engine are untouched.
Validation
Passed:
python -m unittest tools.test_setup_amd.CalibrationKeyon3f52b2d7(0.2.0 tree,e88ee39d) -- 8/8 tests OK, including the newtest_nvidia_string_dual_keys_like_the_list.hardware_key(cfg)with"gpu": "0,1"now returnsNVIDIA GeForce RTX 3090 Ti + NVIDIA GeForce RTX 3090|48GB|AMD Ryzen 7 9800X3D 8-Core Processor|59GB|<model>|262144|images; before the fix the same call died withthere is no GPU 0,1.Failed:
Not run:
setup.pyonly (pure Python); CUDA/HIP/SYCL/CPU binaries are untouched.Limits
hardware_key()andrecommend_remote_expert_opt()are covered; the othergpu_info()callers already pass card numbers.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.