Skip to content

Instantly share code, notes, and snippets.

@mlazos
Created April 23, 2025 23:12
Show Gist options
  • Save mlazos/6e7af71e34e75a8f456278031800caeb to your computer and use it in GitHub Desktop.
Save mlazos/6e7af71e34e75a8f456278031800caeb to your computer and use it in GitHub Desktop.
import torch
torch._logging.set_logs(fusion=True)
@torch.compile()
def foo(x, y):
return (x @ y).permute(1, 0).relu().permute(1, 0).contiguous()
foo(torch.ones(256, 256, device="cuda"), torch.ones(256, 256, device="cuda"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment