Skip to content

Add easy KernelBench level2 problem ports#62

Open
saarang123 wants to merge 1 commit intotensara:mainfrom
saarang123:codex/kernelbench-level2-easy-ports
Open

Add easy KernelBench level2 problem ports#62
saarang123 wants to merge 1 commit intotensara:mainfrom
saarang123:codex/kernelbench-level2-easy-ports

Conversation

@saarang123
Copy link
Copy Markdown

@saarang123 saarang123 commented Mar 30, 2026

Summary

  • add four exact-port KernelBench Level 2 problems
  • add deterministic seeded testcase generation and small debug-friendly samples
  • add a local validator script for sample/checker-style sanity on these new ports

Included problems

  • gemm-relu-divide
  • conv2d-divide-leaky-relu
  • conv2d-hardswish-relu
  • matmul-mish-mish

Implementation notes

  • each problem materializes learned module state as explicit deterministic inputs so the Tensara runtime contract stays simple
  • ports preserve the original op ordering from KernelBench
  • verifiers report concrete mismatches instead of only returning a boolean
  • samples are intentionally small for debugger/sample-path use
  • testcase generation is seeded with Problem.get_seed(...)

Validation

  • py_compile passed for all new def.py files and the validator script
  • all four problem classes import and instantiate successfully against the Tensara Problem base
  • sample/testcase metadata generation was checked in a local Torch environment

Environment limitation

  • full CUDA execution was not run in this shell because the Torch environments available here were CPU-only (torch.cuda.is_available() == False)

Extra file

  • staging/validate_kernelbench_level2_ports.py provides a local CUDA-side validation path for these ports once run in a GPU-capable environment

@saarang123
Copy link
Copy Markdown
Author

Validated on Together H100 on March 30, 2026.

Ran the new KernelBench Level 2 ports on a free production node after checking that nvidia-smi showed no active compute apps. Remote setup was:

  • source /data/srng/.bashrc
  • conda activate qwen-inference
  • run from /home/srng/repos/problems

Command:

python staging/validate_kernelbench_level2_ports.py --all

Result:

- gemm-relu-divide: sample + all generated tests passed
- conv2d-divide-leaky-relu: sample + all generated tests passed
- conv2d-hardswish-relu: sample + all generated tests passed
- matmul-mish-mish: sample + all generated tests passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants