You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "Lunderberg (via GitHub)" <gi...@apache.org> on 2024/06/12 19:33:46 UTC
[PR] [Relax][BlockBuilder] Use PrimValue to provide tir_vars [tvm]
Lunderberg opened a new pull request, #17087:
URL: https://github.com/apache/tvm/pull/17087
Prior to this commit, if a TIR variable was required to compute the output of `BlockBuilder.call_te`, but that TIR variable could not be inferred from the shape of any tensor arguments, it would be provided in an optional `tir_vars` argument to `R.call_tir`. In C++, this would be then be accessed as an optional
`call->args[2].as<ShapeExprNode>()`.
This extra argument can cause unexpected bugs. For example, the bug that was fixed in https://github.com/apache/tvm/pull/17086 was caused by `RewriteDataflowReshape` identifying the output buffer using `prim_func->buffer_map.Get(prim_func->params.back())`, which is only correct if `tir_vars` is empty. Rather than fixing these issues as they come up, it would be better to make the general Relax guarantees stronger by removing the `tir_vars` argument altogether.
Use of extra `R.shape` parameter to specify additional `tir_vars` predates the existence of `relax::PrimValue`, and is no longer required. This commit updates `BlockBuilder.call_te` to use additional `relax.PrimValue` arguments to handle symbolic values that cannot be inferred from tensor shapes, rather than `tir_vars`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Relax][BlockBuilder] Use PrimValue to provide tir_vars [tvm]
Posted by "tqchen (via GitHub)" <gi...@apache.org>.
tqchen closed pull request #17087: [Relax][BlockBuilder] Use PrimValue to provide tir_vars
URL: https://github.com/apache/tvm/pull/17087
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For additional commands, e-mail: discuss-archive-help@tvm.apache.org
Re: [PR] [Relax][BlockBuilder] Use PrimValue to provide tir_vars [tvm]
Posted by "masahi (via GitHub)" <gi...@apache.org>.
masahi commented on PR #17087:
URL: https://github.com/apache/tvm/pull/17087#issuecomment-2163772759
cc @tqchen @Hzfengsy
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Relax][BlockBuilder] Use PrimValue to provide tir_vars [tvm]
Posted by "Lunderberg (via GitHub)" <gi...@apache.org>.
Lunderberg commented on PR #17087:
URL: https://github.com/apache/tvm/pull/17087#issuecomment-2344121768
Rebased onto main to avoid stale CI results.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org