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 04:15:06 UTC
[GitHub] [incubator-mxnet] sergeykolychev opened a new pull request #17610:
MXNET-1447 [Perl] Runtime features and large tensor support.
sergeykolychev opened a new pull request #17610: MXNET-1447 [Perl] Runtime features and large tensor support.
URL: https://github.com/apache/incubator-mxnet/pull/17610
## Description ##
[Perl] MXNET-1447 Runtime features and large tensor support.
# Checklist ##
### Essentials ###
Please feel free to remove inapplicable items for your PR.
- [ ] The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant [JIRA issue](https://issues.apache.org/jira/projects/MXNET/issues) created (except PRs with tiny changes)
- [ ] Changes are complete (i.e. I finished coding on this PR)
- [ ] All changes have test coverage:
- Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
- Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
- Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
- [ ] Code is well-documented:
- For user-facing API changes, API doc string has been updated.
- For new C++ functions in header files, their functionalities and arguments are documented.
- For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
- Check the API doc at https://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
- [ ] To the best of my knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change
### Changes ###
1) Added runtime features
2) Added support for large tensors
## Comments ##
----------------------------------------------------------------
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
[GitHub] [incubator-mxnet] tlby commented on a change in pull request
#17610: MXNET-1447 [Perl] Runtime features and large tensor support.
Posted by GitBox <gi...@apache.org>.
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_r380406036
##########
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:
If that's how things are done in Python, then no need to diverge from this pattern. Thanks!
----------------------------------------------------------------
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
[GitHub] [incubator-mxnet] sergeykolychev commented on issue #17610:
MXNET-1447 [Perl] Runtime features and large tensor support.
Posted by GitBox <gi...@apache.org>.
sergeykolychev commented on issue #17610: MXNET-1447 [Perl] Runtime features and large tensor support.
URL: https://github.com/apache/incubator-mxnet/pull/17610#issuecomment-587115463
@tlby The ``mx_`` typedefs change is a sync to current state of the mxnet/c_api.h in master branch.
----------------------------------------------------------------
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
[GitHub] [incubator-mxnet] sergeykolychev commented on issue #17610:
MXNET-1447 [Perl] Runtime features and large tensor support.
Posted by GitBox <gi...@apache.org>.
sergeykolychev commented on issue #17610: MXNET-1447 [Perl] Runtime features and large tensor support.
URL: https://github.com/apache/incubator-mxnet/pull/17610#issuecomment-586810603
@tlby
Robert, could you please review. This is first from several PRs I plan to do with next few months.
It adds support for large tensors (int64) and for displaying runtime features (compile flags).
----------------------------------------------------------------
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
[GitHub] [incubator-mxnet] sergeykolychev edited a comment on issue #17610:
MXNET-1447 [Perl] Runtime features and large tensor support.
Posted by GitBox <gi...@apache.org>.
sergeykolychev edited a comment on issue #17610: MXNET-1447 [Perl] Runtime features and large tensor support.
URL: https://github.com/apache/incubator-mxnet/pull/17610#issuecomment-586810603
@tlby
Robert, could you please review. This is first from several PRs I plan to do within next few months.
It adds support for large tensors (int64) and for displaying runtime features (compile flags).
----------------------------------------------------------------
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
[GitHub] [incubator-mxnet] sergeykolychev merged pull request #17610:
MXNET-1447 [Perl] Runtime features and large tensor support.
Posted by GitBox <gi...@apache.org>.
sergeykolychev merged pull request #17610: MXNET-1447 [Perl] Runtime features and large tensor support.
URL: https://github.com/apache/incubator-mxnet/pull/17610
----------------------------------------------------------------
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
[GitHub] [incubator-mxnet] sergeykolychev commented on a change in pull
request #17610: MXNET-1447 [Perl] Runtime features and large tensor support.
Posted by GitBox <gi...@apache.org>.
sergeykolychev 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_r380326059
##########
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:
@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.
----------------------------------------------------------------
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
[GitHub] [incubator-mxnet] tlby commented on a change in pull request
#17610: MXNET-1447 [Perl] Runtime features and large tensor support.
Posted by GitBox <gi...@apache.org>.
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