Skip to content

Instantly share code, notes, and snippets.

@m1ser4ble
Last active May 14, 2025 07:23
Show Gist options
  • Save m1ser4ble/bd31f4e1beac1375ddb3b1d09fabe089 to your computer and use it in GitHub Desktop.
Save m1ser4ble/bd31f4e1beac1375ddb3b1d09fabe089 to your computer and use it in GitHub Desktop.
import torch
saved_exported_program = torch.export.load('exported.pt2')
x=torch.ones(2,2).cuda()
y=torch.zeros(2,2).cuda()
mod = saved_exported_program.module())
res=torch.compile(mod)(x,y)
print(res[0].device)
print(res[0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment