Uh oh!
There was an error while loading. Please reload this page.
Add HIP backend - #135
Conversation
thanks so much @amd-asalykov, validating on a bare metal MI350X right now. Also thanks @laasya-konidala for setting things up and checking the codebase + verifying! |
@simonguozirui you might have noticed that in the current implementation we rely on |
simonguozirui
commented
Feb 22, 2026
Gotcha Added a few guardrails to ensure a separate AMD and NVIDIA code path Two more small things to close things off
|
amd-asalykov
commented
Feb 26, 2026
Hi @simonguozirui, I updated the PR and included hip keywords checks fd4589f Could you please review the changes? CUDA/HIP kernels are very similar in terms of keywords, so additionally to the standard CUDA checks I only added a check for the hipcc compiler Regarding L2 cache clearing: I see KernelBench uses 268MB buffer tensor KernelBench/src/kernelbench/timing.py Line 139 in b6c5259 |
salykova
commented
Feb 27, 2026
@simonguozirui bumping up |
| if not any(p in code for p in HIP_COMPILE_PATTERNS): | ||
| return (True, "Missing load_inline or cpp_extension for compilation") | ||
| if "hipcc" not in code: | ||
| return (True, "Missing hipcc compiler") |
There was a problem hiding this comment.
awesome yes we will need to trigger the hipcc compiler
There was a problem hiding this comment.
as we require os.environ["CXX"] = "hipcc" in the LM generated code to trigger hipcc rather than hipify
simonguozirui
commented
Feb 27, 2026
Looks great, thanks so much for investigating the cache size for cache flushing for AMD. Thank you @laasya-konidala for running and verifying! |
* add hip backend for eval_single_sample * update pyproject.toml for CDNA4 * update * update * update * update * add ROCm version requirement * check and add more guardrails * add hip keywords check --------- Co-authored-by: Simon Guo <simonguo@stanford.edu>
Updated version of #96
How to install:
Run on MI350X/MI355X:
Run on MI300X/MI325X: