masahi commented on code in PR #14144:
URL: https://github.com/apache/tvm/pull/14144#discussion_r1119835315
##########
python/tvm/relay/op/contrib/tensorrt.py:
##########
@@ -709,7 +709,9 @@ def strided_slice_checker(
if any([x is not None and x <= 0 for x in attrs.strides]):
logger.info(f"{op_name}: stride must be positive")
return False
- for i in range(0, len(args[0].checked_type.shape)):
+ if len(attrs.axes) > len(args[0].checked_type.shape):
+ logger.info(f"{op_name}: number of indexed axes is higher than input
tensor rank")
Review Comment:
No need for these changes, remove L712 and L713.
##########
python/tvm/relay/op/contrib/tensorrt.py:
##########
@@ -709,7 +709,9 @@ def strided_slice_checker(
if any([x is not None and x <= 0 for x in attrs.strides]):
logger.info(f"{op_name}: stride must be positive")
return False
- for i in range(0, len(args[0].checked_type.shape)):
+ if len(attrs.axes) > len(args[0].checked_type.shape):
+ logger.info(f"{op_name}: number of indexed axes is higher than input
tensor rank")
+ for i in range(0, len(attrs.axes)):
begin = int(attrs.begin[i])
Review Comment:
it should be `attrs.begin[attrs.axes[i]]`
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]