Add New Tensor Function
The steps to add an tensor function are as follows:
- Add the implementation of the tensor function for the corresponding Backend (CPU).
- Add the enumeration of the tensor function types.
- Register the implemented tensor function for the corresponding Backend.
- Add the frontend representation of the tensor function.
Add the implementation of the tensor function for the corresponding Backend
CPU
Under the CPU directory, add the subclass of TensorFunction in CPUTensorFunction.hpp.
Here is an example:
Add the enumeration of the tensor function types
Add the enumeration of the tensor function types in the OpDefined.hpp file.
Register the implemented tensor function for the corresponding Backend
Add the CPUabcFunction in the corresponding Backend.cpp file.
Add the frontend representation of the tensor function
- Register the corresponding front-end representation of the Tensor function in Tensor.hpp.
- Implement the corresponding front-end representation of the Tensor function in Tensor.cpp.