junrushao1994 commented on a change in pull request #8200:
URL: https://github.com/apache/tvm/pull/8200#discussion_r647965316
##########
File path: src/relay/transforms/pattern_utils.h
##########
@@ -441,7 +441,7 @@ static inline long double ToScalar(const runtime::NDArray&
array, size_t i = 0)
static inline Array<Integer> ToVector(const runtime::NDArray& array) {
size_t ndim = array.Shape().size();
ICHECK_EQ(ndim, 1) << "This function should only be used for 1D NDArrays";
- size_t len = array.Shape().front();
+ size_t len = array.Shape().at(0);
Review comment:
Several lines of code that are good for future development. @zhiics
asked me to add them to `runtime::Array` last time, and it turns out to be
useful right now :-)
--
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]