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_r345392677
##########
File path: src/relay/op/tensor/transform.cc
##########
@@ -1947,57 +1948,81 @@ Array<Array<Layout> > StridedSliceInferCorrectLayout(
// NOTE: Discard "const" qualifier here.
auto *params =
const_cast<StridedSliceAttrs*>(attrs.as<StridedSliceAttrs>());
+ CHECK(params != nullptr);
+ Array<Integer> begin, end, strides;
+ const ConstantNode *cbegin, *cend, *cstrides;
+ if ((cbegin = params->begin.as<ConstantNode>()) &&
+ (cend = params->end.as<ConstantNode>()) &&
+ (cstrides = params->strides.as<ConstantNode>())) {
+
+ int32_t* strides_val = reinterpret_cast<int32_t*>(cstrides->data->data);
Review comment:
what if the data has the 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