Files
nvfp4-megamoe-kernel/tests/unit/test_ptx_llvm_runner.py

20 lines
659 B
Python

"""Runner: test each llvm.inline_asm approach in separate process."""
import subprocess
import sys
for approach in ["v1_mlir_type", "v2_no_asm_dialect", "v3_multiline"]:
print(f"\n{'='*50}")
print(f"Testing: {approach}")
print(f"{'='*50}")
result = subprocess.run(
[sys.executable, "tests/unit/test_ptx_llvm.py", approach],
capture_output=True,
text=True,
timeout=120,
)
print(result.stdout)
if result.stderr:
# Only show last 500 chars of stderr (LLVM ERROR is usually at the end)
print(f"STDERR (last 500): ...{result.stderr[-500:]}")
print(f"Exit code: {result.returncode}")