Skip to content

Instantly share code, notes, and snippets.

@davidberard98
Last active April 2, 2025 01:10
Show Gist options
  • Save davidberard98/2ea697eb550c94d0d1948fedb5c5c7d8 to your computer and use it in GitHub Desktop.
Save davidberard98/2ea697eb550c94d0d1948fedb5c5c7d8 to your computer and use it in GitHub Desktop.
cat > cache_bc_issue.py << EOF
import torch
torch._inductor.config.autotune_remote_cache = False
def fn(x, y, z):
return torch.mm((x + y).relu(), z)
x, y, z = [torch.rand((8, 8), device="cuda") for _ in range(3)]
fn_s = torch.compile(fn, mode="max-autotune")
for _ in range(3):
print(fn_s(x, y, z))
EOF
rm -rf /tmp/torchinductor_$USER
python cache_bc_issue.py
git revert 0861af2596a40fae40adab24131378d4da98addd
python cache_bc_issue.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment