wkcn commented on issue #15921: [WIP] dynamic custom operator support
URL: https://github.com/apache/incubator-mxnet/pull/15921#issuecomment-526482892
 
 
   We don't need to change the NNVM code. For multiple registration, we can use 
different names to register them in the back-end. Users only focus on the 
front-end, which uses `namespace` to distinguish different implementations of 
CustomOp.
   
   For example, users want to register a ConvOp to override the original 
Convolutional Op:
   ```python
   mx.library.load('MyConvOp.so', override=True)
   # mx.nd.Convolution will be the custom operator
   ```
   If users doesn't want to override the original ConvOp,
   ```python
   mx.library.load('MyConvOp.so', namespace='myop')
   # mx.nd.myop.Convolution is the custom operator, and mx.nd.Convolution is 
not overrided.
   ```
   
   The flag `override` is `False` by default. If users don't set it `True` and 
register an operator multiple times, it will raises the exception to prompt 
that `The operator xxx has been registered. Please rename it`.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to