kevinthesun commented on a change in pull request #6024:
URL: https://github.com/apache/incubator-tvm/pull/6024#discussion_r465948305
##########
File path: src/relay/op/tensor/transform.cc
##########
@@ -2146,7 +2146,18 @@ Array<te::Tensor> StridedSliceCompute(const Attrs&
attrs, const Array<te::Tensor
const Type& out_type) {
const StridedSliceAttrs* param = attrs.as<StridedSliceAttrs>();
CHECK(param != nullptr);
- if (param->begin && param->end && param->strides) {
+
+ bool dyn = false;
+ for (auto& v : out_type.as<TensorTypeNode>()->shape) {
+ if (const tir::VarNode* var_node = v.as<tir::VarNode>()) {
+ if (var_node->name_hint == "any_dim") {
+ dyn = true;
+ break;
+ }
+ }
+ }
+
+ if (param->begin && param->end && param->strides && !dyn) {
Review comment:
Yeah. I think it would be more complicated to fix topi. Probably we can
use dynamic stridedslice compute.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]