bench_mla_decode crashes with --model deepseek: randint from=1 >= to=1

Open Beginner friendly
#2,410 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python, pytorch
Domain
performance

Research direction

Run op_tests/op_benchmarks/triton/bench_mla_decode.py --model deepseek -o to reproduce the crash. Then inspect test_mla_decode_rope.py, especially input_helper and the S=0 cases generated by the benchmark configuration. Done means the deepseek benchmark completes without the invalid torch.randint range.

Written by the indexing model from the issue text.

Description

Description

bench_mla_decode.py crashes when run with --model deepseek due to test_mla_decode_rope.input_helper calling torch.randint(1, S+1, ...) where S=0.

Reproduction

python3 op_tests/op_benchmarks/triton/bench_mla_decode.py --model deepseek -o

Error

File ".../test_mla_decode_rope.py", line 38, in input_helper
    seqlens = torch.randint(1, S + 1, (B,), dtype=torch.int32, device=device)
RuntimeError: random_ expects 'from' to be less than 'to', but got from=1 >= to=1

Root Cause

The model benchmark config generates S=0 for some batch size / sequence length combinations, and input_helper doesn't guard against S <= 0.

Environment

  • GPU: AMD Instinct MI355X (gfx950)
  • PyTorch: 2.8.0+rocm7.2
  • AITER: commit a89006c

🤖 Generated with Claude Code

Dominant language
Python
Stars
565
Forks
585
Avg merge
3d 1h
Merged PRs (30d)
371

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ROCm/aiter

All issues in ROCm/aiter

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.