test_cuda_pack_reconstruction_matches_pytorch_at_scale[iq1_m] fails on Jetson Thor: exact ties exceed the blocks // 1000 bound
I maintainer di solito rispondono entro 2 giorni
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Ambito
- machine-learning, testing
Direzione di ricerca
Start with tests/gpu/torch/quantization/test_iq_formats_cuda.py, especially test_cuda_pack_reconstruction_matches_pytorch_at_scale and the neighboring encoder test docstring. Run the reported pytest command on a CUDA GPU and compare per-block squared errors for differing blocks with the PyTorch reference. Done means tied blocks are accepted within the stated tolerance while genuine quality regressions still fail; linked PR #2708 is already open.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
tests/gpu/torch/quantization/test_iq_formats_cuda.py::test_cuda_pack_reconstruction_matches_pytorch_at_scale[iq1_m] fails on Jetson Thor:
> assert differing <= blocks // 1000, f"{differing} of {blocks} blocks differ"
E AssertionError: 2 of 1024 blocks differ
E assert 2 <= (1024 // 1000)
Both differing blocks are exact ties. The CUDA encoding and the PyTorch encoding of each block decode to different values (one group of 8 weights uses a different grid point), but they reconstruct the block with bit-identical squared error:
| format | block (row, block) | SSE, CUDA | SSE, PyTorch | bytes that differ |
|---|---|---|---|---|
| iq1_m | (60, 7) | 41.883705 | 41.883705 | 2 |
| iq1_m | (68, 4) | 43.345009 | 43.345009 | 1 |
| iq2_xs | (123, 6) | 22.985538 | 22.985538 | 2 |
Total relative error matches exactly for all five formats, so the CUDA encoder loses no quality. iq2_xs passes only because it has 1 such block, which is at the bound.
The docstring of test_cuda_pack_matches_pytorch_encoder_and_is_decodable already explains this behavior. The two encoders evaluate the same squared error with different floating-point fusion, so near-ties can round to different sides "in roughly one block in several thousand". That rate depends on how the compiler fuses the CUDA encoder's arithmetic for the target GPU. On Thor it is 2 in 1024 for IQ1_M. The blocks // 1000 bound therefore encodes one GPU's tie rate rather than the property the test's docstring states ("may disagree on a near-tied scale, but not on quality").
Impact: test-only. A GPU test fails on Jetson Thor.
Steps/Code to reproduce bug
On Jetson Thor:
pytest "tests/gpu/torch/quantization/test_iq_formats_cuda.py::test_cuda_pack_reconstruction_matches_pytorch_at_scale"
Expected behavior
The test passes wherever the CUDA encoder reconstructs each block as well as the reference, which is true on Thor.
Proposed fix: require every differing block to have the same per-block squared error as the reference (rtol=1e-5). Keep the total-error check, and loosen the count bound to 1% of blocks. With that change, flipping a grid-index bit in a single block still fails the test. I'll open a PR.
Who can help?
- @cjluo-nv (IQ formats)
System information
- Container used (if applicable): none
- OS: Ubuntu 24.04.4 LTS (JetPack 7.2.1, L4T R39.2)
- CPU architecture: aarch64
- GPU name: NVIDIA Thor (Jetson, sm_110, integrated GPU)
- GPU memory size: 122.8 GiB, shared with the CPU
- Number of GPUs: 1
- Library versions (if applicable):
- Python: 3.12.3
- ModelOpt version or commit hash:
mainat 90ba9fbc - CUDA: 13.0 (the
modelopt_cuda_ext_ggmlextension is built for sm_110) - PyTorch: 2.13.0+cu130
- Transformers: 5.14.1
- TensorRT-LLM: N/A
- ONNXRuntime: N/A
- TensorRT: N/A
- Any other details that may help: Every other test in
test_iq_formats_cuda.pypasses on Thor, including byte parity on the small fixed input and the comparison with llama.cpp's decoder.
- Lingua principale
- Python
- Stelle
- 5.3k
- Fork
- 745
- Merge medio
- 3g 17h
- PR unite (30g)
- 177
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NVIDIA/Model-Optimizer
-
[Bug] modelopt-mcp: all launcher subprocesses hang when the server runs as a stdio MCP server — missing stdin=DEVNULLForse già presa @ChenhanYu l’ha presa 16 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
NVIDIA/Model-Optimizer#2551 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
Puzzletron Progress 6/8 (calculating one block scores) takes 10 to 20 times more than in tutorialForse di nuovo libera @tejasng053 l’ha presa 22 giorni fa e non c’è nessuna pull request aperta. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
NVIDIA/Model-Optimizer#1667 ·
I maintainer di solito rispondono entro 2 giorni
-
feature request
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
NVIDIA/Model-Optimizer#2865 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 54/100
NVIDIA/Model-Optimizer#2857 ·
I maintainer di solito rispondono entro 2 giorni
-
fp4_kernel_hopper.py uses tl.make_block_ptr, which is removed in Triton main (breaks NVFP4 fake quant)Forse già presa @kinjalpatel27 l’ha presa 3 giorni fa. Aperta
Difficoltà 3/5 Mezza giornata Idoneità per principianti 72/100
NVIDIA/Model-Optimizer#2810 · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di NVIDIA/Model-Optimizer
Issue simili
-
tunneld on Windows: Wi-Fi devices are not discovered because uvicorn runs on a ProactorEventLoopAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
doronz88/pymobiledevice3#2051 ·
I maintainer di solito rispondono entro 1 giorno
-
Remove DatacircleAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
collabnix/awesome-mcp-lists#230 ·
I maintainer di solito rispondono entro 9 giorni
-
Groc schedules with out of range values pass config validation and fail later when the scheduler is builtForse già presa @auraseb l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
autowarefoundation/autoware_carla_scenario#342 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ianktoo/project-monitor#14 ·