OneRaynyDay opened a new pull request #11637: [MXNET-652] Allow for 
multi-context input to load gluon models from onnx
URL: https://github.com/apache/incubator-mxnet/pull/11637
 
 
   ## Description ##
   Currently, Airbnb is developing applications that use mxnet(particularly 
`gluon`). We use the `mxnet.contrib.onnx` package, which supports importing to 
gluon from ONNX format. As this is an extremely important part of our pipeline, 
we want to add support to multi-gpu imports, which is currently not supported.
   
   This is actually a very simple change, because `_load_init()` already 
supports, directly, a `Context` object or an iterable of them. However, the 
current implementation for `import_to_gluon` suggests a `str` of `'CPU'` or 
`'GPU'`. This is not only different from other parts of the mxnet codebase, but 
also does not allow us to specify which gpu's we want to load the model into.
   
   ## Checklist ##
   ### Essentials ###
   Please feel free to remove inapplicable items for your PR.
   - [ ] The PR title starts with [MXNET-652], where 652 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 
http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
   - [ ] To the my best knowledge, examples are either not affected by this 
change, or have been fixed to be compatible with this change
   
   ### Changes ###
   - [ ] Modified gluon model loading from ONNX to allow multi-context argument.
   
   ## Comments ##
   - Currently, we use `ctx` as a keyword argument for a large portion of the 
core library. There doesn't seem to be any significant reason for why the 
`contrib.onnx` code uses `str` instead, rather than it being a minor oversight 
that passed PR's.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to