-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Relax][Frontent] "tensor_ir_inplace" op #16498
[Relax][Frontent] "tensor_ir_inplace" op #16498
Conversation
This PR introduces the `tensor_ir_inplace_op` for frontend so that we can leverage our `call_tir_inplace` in SLM model definition flow. One unit test is added. This PR also fixed a few typos in type annotations.
Thanks for fixing the typos 🙂 Can't believe I had them there in the first place. Is the main reason to add this op so you could use an inline |
@slyubomirsky You're welcome! The main reason introducing this op is to use |
def test( | ||
self, embedding_table: Tensor, input_ids: Tensor, embedding_dst: Tensor, offset: int | ||
): | ||
tensor_expr_op_out = op.tensor_ir_op( |
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.
Did you mean to call op.tensor_ir_inplace_op
here? It doesn't look like you are testing the new nn.op.tensor_ir_inplace_op
added in this PR.
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.
Ooooooops sorry my bad. Is that updated? Or I can find a chance to update the test next time.
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.
No worries, I was just hoping to use this PR to guide my use of nn.op.tensor_ir_inplace_op
but then became nervous about using the feature when I saw it wasn't tested. I haven't made any change to update the test and would appreciate the update whenever you have cycles to come back to this. It's not blocking me though, so low priority is fine. Thanks @MasterJH5574
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.
Thank you so much for letting me know!
This PR introduces the
tensor_ir_inplace_op
for frontend so that we can leverage ourcall_tir_inplace
in SLM model definition flow.One unit test is added. This PR also fixed a few typos in type annotations.