test_cuda_pack_reconstruction_matches_pytorch_at_scale[iq1_m] fails on Jetson Thor: exact ties exceed the blocks // 1000 bound
メンテナーはふだん 2 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Python
- スター
- 5.3k
- フォーク
- 745
- 平均マージ
- 4日 2時間
- マージ済み PR(30日)
- 160
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/Model-Optimizer のほかの issue
-
[Bug] modelopt-mcp: all launcher subprocesses hang when the server runs as a stdio MCP server — missing stdin=DEVNULL対応中かも @ChenhanYu が 13 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
NVIDIA/Model-Optimizer#2551 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
Puzzletron Progress 6/8 (calculating one block scores) takes 10 to 20 times more than in tutorial再び着手できるかも @tejasng053 が 19 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
NVIDIA/Model-Optimizer#1667 ·
メンテナーはふだん 2 日以内に返信
-
fp4_kernel_hopper.py uses tl.make_block_ptr, which is removed in Triton main (breaks NVFP4 fake quant)対応中かも @kinjalpatel27 が今日担当しました。 オープン
難易度 3/5 半日 初心者へのやさしさ 72/100
NVIDIA/Model-Optimizer#2810 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
test_cast_fp4_impl_gpu_mem is flaky on Jetson Thor: mem_get_info reports system-wide memory on integrated GPUs対応中かも @LinCanNerd が 7 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
NVIDIA/Model-Optimizer#2706 ·
メンテナーはふだん 2 日以内に返信
-
Support activation-only scale search for PyTorch AWQ calibration対応中かも @meenchen が 9 日前に担当しました。 オープン
NVIDIA/Model-Optimizer#2674 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
NVIDIA/Model-Optimizer の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
jbacalso24/mimry#291 ·
メンテナーはふだん 1 日以内に返信
-
good first issue
難易度 2/5 1時間未満 初心者へのやさしさ 82/100
eli-alvarado/us-watchlist-alerts#14 ·
メンテナーはふだん 1 日以内に返信
-
from-review-extraction python severity:nit
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
LearningCircuit/local-deep-research#7462 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
cathrynlavery/diagram-design#441 ·
メンテナーはふだん 2 日以内に返信
-
[Cleanup] Include the public header in work_split.cpp対応中かも @blozano-tt が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
tenstorrent/tt-metal#60850 ·
メンテナーはふだん 1 日以内に返信