Skip to content

Conversation

ayshiff
Copy link

@ayshiff ayshiff commented Jan 22, 2025

Converts the example input list to a tuple before passing it to torch.func.functional_call to resolve the argument type mismatch.

Tested with: python models/pyhpc_equation_of_state.py

Fixes pytorch/xla#8164

Converts the example input list to a tuple before passing it to torch.func.functional_call to resolve argument type mismatch.
@ayshiff
Copy link
Author

ayshiff commented Jan 24, 2025

JAX_PLATFORMS=cpu python models/pyhpc_equation_of_state.py

[XLATensor2(..., device='meta', size=(204, 204, 26), dtype=torch.float64), XLATensor2(..., device='meta', size=(204, 204, 26), dtype=torch.float64), XLATensor2(..., device='meta', size=(1, 1, 26), dtype=torch.float64)]
Eager mode time 0.7211941659988952
Eager max abs vs expected tensor(0.0720, dtype=torch.float64)
Jitted mode time 0.24614562499846215
Jitted max abs vs expected tensor(0.0720, dtype=torch.float64)

@ayshiff
Copy link
Author

ayshiff commented Jan 25, 2025

cc @ManfeiBai

Copy link
Collaborator

@ManfeiBai ManfeiBai left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Model support for pyhpc_equation_of_state with Torch_XLA2

2 participants