Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix XLA type of the view_as_real #8370

Merged
merged 2 commits into from
Nov 12, 2024
Merged

Fix XLA type of the view_as_real #8370

merged 2 commits into from
Nov 12, 2024

Conversation

JackCaoG
Copy link
Collaborator

ViewAsComplexCopy has the same issue, I will fix it in a follow up.

view_as_real(c64) should return a tensor with XLA type and torch type f32. In the old lowering, the result type was incorrectly set as the input type. The result looks OK because we also overwrite the torch.dtype in tensor_methods.cpp but that's the wrong way to handling it.

@JackCaoG JackCaoG added the tpuci label Nov 12, 2024
@JackCaoG JackCaoG requested a review from tengyifei November 12, 2024 21:06
@JackCaoG JackCaoG marked this pull request as ready for review November 12, 2024 21:14
@JackCaoG JackCaoG merged commit 071ddfa into master Nov 12, 2024
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants