Skip to content

Instantly share code, notes, and snippets.

@xmfan
Created February 13, 2024 02:35
Show Gist options
  • Save xmfan/c8fe3b2c3e2dddae25883b74c402d44d to your computer and use it in GitHub Desktop.
Save xmfan/c8fe3b2c3e2dddae25883b74c402d44d to your computer and use it in GitHub Desktop.
import torch
def fn2():
x = torch.randn(2, 2, device="cuda")
y = 5
return x / y
torch.compile(fn2, mode="reduce-overhead")()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment