-
Notifications
You must be signed in to change notification settings - Fork 6.8k
MXNET-1447 [Perl] Runtime features and large tensor support. #17610
Conversation
@tlby |
@@ -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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tlby On python side the switch is made in the caller space. The c api has two functions defined for each task, one with (u)?int32_t
input/output and another with (u)?int64_t
I don't know how to combine these two functions via the swig space.
Looks like a task for you to complete later the line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If that's how things are done in Python, then no need to diverge from this pattern. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a full switch away from the mx_
typedefs in reaction to #15899?
@tlby The |
…17610) * [Perl] MXNET-1447 Runtime features and large tensor support. * MXNET-1447 fixed test, corrected module version. * miscellaneous cleanups. * added missing file.
Description
[Perl] MXNET-1447 Runtime features and large tensor support.
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments