Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A demo op np.zeros with the new FFI interface is implemented as an example. Files mentioned in the example can be found in the POC mentioned above. It will help to read both of the frontend and backend registration if one wants to register some other ops.

Firstly, in frontend, np.zeros1 is zeros is registered in python/mxnet/ndarray/numpy/_op.py as usual:

...

Secondly, in backend, _npi.zeros1 is zeros is registered in src/api/operator/numpy/np_init_op.cc, as follows.

...