Skip to content

Handled lifted constants in torch export.#6087

Closed
qihqi wants to merge 2 commits intopytorch:masterfrom
qihqi:tensor_constant
Closed

Handled lifted constants in torch export.#6087
qihqi wants to merge 2 commits intopytorch:masterfrom
qihqi:tensor_constant

Conversation

@qihqi
Copy link
Copy Markdown
Collaborator

@qihqi qihqi commented Dec 10, 2023

@qihqi qihqi requested review from JackCaoG and lsy323 December 10, 2023 19:55
exported = torch.export.export(model, arg)
shlo = exported_program_to_stablehlo(exported)
ans2 = shlo(*arg).cpu().to(torch.float32)
self.assertTrue(torch.allclose(ans, ans2, atol=1e-5))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about we set torch.manual_seed in this test file in case the test becomes flaky?

@qihqi
Copy link
Copy Markdown
Collaborator Author

qihqi commented Dec 12, 2023

moved #6111

@qihqi qihqi closed this Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants