-
Notifications
You must be signed in to change notification settings - Fork 559
Replace XlaValue with upstream lazy::Value #3572
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
Conversation
|
Test failing with: Looking into it. |
|
@JackCaoG, this should be ready for a quick review (although it's very long 😢 ), thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I think we can merge this one first given the size of the pr and fix the review comment in the next pr.
| // an array of torch::lazy::Value while we uses XlaValue. | ||
| // an array of torch::lazy::Value while we uses torch::lazy::Value. | ||
| for (auto& operand : operands) { | ||
| AddOperand(operand.node, operand.index); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact I think this can be changed. Since now we also use torch::lazy::Value, we don't need to manually call AddOperand, we can reuse upstream constructor to do that. @wonjoolee95 Can you fix that in a follow up pr?
| }; | ||
|
|
||
| using OpList = absl::Span<const XlaValue>; | ||
| using OpList = absl::Span<const torch::lazy::Value>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can also use upstream OpList I think, no need to redefine it here.
|
@miladm FYI, this will likely cause a lot of conflicts. |
Thanks for the comments! Created a follow-up PR here #3583. Waiting on the CI to verify the tests. |
- `SgnOp` and `SignOp`
- Full codegen migration: #3577
- Mistakenly re-introduced: #3572
- `LogSigmoid`
- Introduced: #3539
- Full codegen migration: #3743
- `SiLU`
- Introduced: #2721
- Full codegen migration: #3780
- `SiLUBackward`
- Introduced: #3195
- Full codegen migration: #3780
- `SeLU`
- Introduced: #3547
- Full codegen migration: #3780
- `Sigmoid`
- Introduced: 6a73deb (no PR record)
- Full codegen migration: #6342
Replace XlaValue with upstream lazy::Value
Following up on #3567, we see that keeping our own
torch_xla::XlaValuecauses issues for LTC codegen and will make things unnecessarily more complicated. This removes ourtorch_xla::XlaValuecompletely and uses the upstreamlazy::Value.This PR adds a function
GetXlaShape(lazy::Value)inir.hthat retrieves the xla shape given alazy::Value, which eliminates the need to keep our ownXlaValue.