icemelon9 commented on a change in pull request #4312: [TOPI][Relay][OP] 
Dynamic NMS and strided_slice
URL: https://github.com/apache/incubator-tvm/pull/4312#discussion_r345392898
 
 

 ##########
 File path: src/relay/op/tensor/transform.cc
 ##########
 @@ -2006,11 +2031,50 @@ Array<Tensor> StridedSliceCompute(const Attrs& attrs,
                                   const Target& target) {
   const StridedSliceAttrs *param = attrs.as<StridedSliceAttrs>();
   CHECK(param != nullptr);
-  return Array<Tensor>{
-    topi::strided_slice(inputs[0], param->begin, param->end, param->strides)
-  };
+  const ConstantNode *cbegin, *cend, *cstrides;
+  if ((cbegin = param->begin.as<ConstantNode>()) &&
+      (cend = param->end.as<ConstantNode>()) &&
+      (cstrides = param->strides.as<ConstantNode>())) {
+    Array<Integer> begin, end, strides;
+    int32_t* strides_val = reinterpret_cast<int32_t*>(cstrides->data->data);
 
 Review comment:
   consider dtype of int64_t?

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to