You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/02/17 17:51:30 UTC
[GitHub] [incubator-mxnet] tlby commented on a change in pull request
#17610: MXNET-1447 [Perl] Runtime features and large tensor support.
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:
users@infra.apache.org
With regards,
Apache Git Services