tlby commented on a change in pull request #17610: MXNET-1447 [Perl] Runtime
features and large tensor support.
URL: https://github.com/apache/incubator-mxnet/pull/17610#discussion_r380310923
##########
File path: perl-package/AI-MXNet/lib/AI/MXNet/NDArray.pm
##########
@@ -384,8 +385,11 @@ method _slice (
)
{
confess("start $start > stop $stop") if $start > $stop;
+ my $sub = AI::MXNet::RunTime->Features()->is_enabled('INT64_TENSOR_SIZE')
+ ? \&AI::MXNetCAPI::NDArraySlice64
+ : \&AI::MXNetCAPI::NDArraySlice;
Review comment:
It seems a little awkward to put the caller in charge of checking the
`INT64_TENSOR_SIZE` compile setting. Would it make sense to make
`AI::MXNetCAPI::NDArraySlice()` and friends responsible for checking the flag
and deferring to the `NDArray*64()` variants when appropriate?
----------------------------------------------------------------
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