[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.
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.
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.
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.
Thank you so much for letting me know!
This PR introduces the
tensor_ir_inplace_opfor frontend so that we can leverage ourcall_tir_inplacein SLM model definition flow.One unit test is added. This PR also fixed a few typos in type annotations.