-
Notifications
You must be signed in to change notification settings - Fork 6.7k
[MXNET-1415]Add MXEnginePushAsyncND and MXEnginePushSyncND C APIs #15177
Conversation
|
The proposed APIs are not part of cpp-package C++ API. Hence removing the "C++" label. |
anirudh2290
left a comment
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.
@wkcn What is the additional use case for this apart from horovod ? Is this going to be changed in horovod ?
|
@anirudh2290 I will write a use case to test the two APIs : ), and it does not change Horovod. It is useful for Horovod to avoid including different versions of ndarray header file. In addition, it will be better for TVM and other third-party libraries. I write a custom operator library MobulaOP (https://github.com/wkcn/mobulaop), and I found that there is not any way to use the asynchronous execution of MXNet. Although we can use TVMBridge API (https://github.com/apache/incubator-mxnet/blob/master/src/nnvm/tvm_bridge.cc#L174) to create an asynchronous function, there is an ABI compatibility problem (We discussed it on TVM forum https://discuss.tvm.ai/t/the-abi-compatibility-of-packedfunc/1601), because TVMBridge uses the C++ class PackedFunc with std::function object. |
|
@wkcn thank you for providing the details! |
|
Hi, @anirudh2290 . I have written a simple example to show hot to use these two APIs. Test Procedure:
|
…ache#15177) * add MXEnginePushAsyncND and MXEnginePushSyncND * fix test build * return exception value * retrigger CI
Description
Hi, there.
In the PR #14615, @yuxihu added
Add MXEnginePushAsyncandMXEnginePushSyncC APIs.MXEnginePushAsyncandMXEnginePushSyncneedsVarHandles ofNDArrays.However, MXNet doesn't expose the API to get the VarHandle of a NDArray.
After the discussion with @szha, We considered that it's more elegant to add
MXEnginePushAsyncNDandMXEnginePushSyncNDC APIs, whose arguments areNDArrayHandles, rather thanVarHandles.Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes