Skip to content

Discard check_LLVM_MAIN_REVISION object file#2345

Merged
valarLip merged 1 commit intomainfrom
fix/aiter-check-llvm-revision-stray-file
Mar 19, 2026
Merged

Discard check_LLVM_MAIN_REVISION object file#2345
valarLip merged 1 commit intomainfrom
fix/aiter-check-llvm-revision-stray-file

Conversation

@kTorp
Copy link
Contributor

@kTorp kTorp commented Mar 19, 2026

Motivation

When running diffusion workloads on MI300/MI355 an unknown object file .-o kept being created in the current working directory. It was traced back to a function check_LLVM_MAIN_REVISION() which was introduced in #1703 and is hit during JIT compilation of aiter kernels.

This PR introduces a minimal fix to prevent this stray .-o object file from being created during aiter JIT compilation without affecting the LLVM revision check logic.

Technical Details

The check_LLVM_MAIN_REVISION() function in aiter/jit/core.py compiles a small test snippet using hipcc via stdin.

echo '#include <tuple> 
__host__ __device__ void func(){std::tuple<int, int> t = std::tuple(1, 1);}' | hipcc -x hip -P -c -Wno-unused-command-line-argument -

When hipcc is invoked with -c (compile-only) it derives the output object filename from the input filename. Because the input here is stdin (denoted by the trailing -), the compiler treats the filename as - and writes -.o into the current directory. That file is a side-effect and never referenced/consumed; the function only cares about the exit code.

The fix is minimal (discarding the object file using -o /dev/null as is done in hip_flag_checker in the same file).

Test Plan

  1. Tested diffusion workloads with aiter compiled kernels with and without the fix.
  2. Testing the function return code

Test Result

  1. Generated images kept the same quality and e2e performance speed before and after
  2. Function returned the same code before and after

Submission Checklist

@kTorp kTorp requested a review from a team March 19, 2026 07:07
@github-actions
Copy link
Contributor

🏷️ CI Guide

Runs automatically on every PR:

  • ✅ Pre-checks (submodule verification, code formatting)
  • ✅ Aiter op tests (gfx942 + gfx950)
  • ✅ Triton tests (only when aiter/ops/triton/** or related paths are changed)

Extended tests (opt-in via labels):

Label Tests
ci:sglang SGLang integration tests
ci:atom ATOM benchmark (DeepSeek-R1 + GPT-OSS)
ci:vllm vLLM benchmark
ci:all All of the above

Add labels via the sidebar or gh pr edit 2345 --add-label <label>

@valarLip valarLip merged commit cb4efe0 into main Mar 19, 2026
25 checks passed
@valarLip valarLip deleted the fix/aiter-check-llvm-revision-stray-file branch March 19, 2026 14:24
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