InferDataType
Function Usage
Registers the InferDataType function of an operator.
You need to write a function of the InferDataTypeKernelFunc type for the operator and use this API to register the function.
The InferDataTypeKernelFunc type is defined as follows:
1 | using InferDataTypeKernelFunc = UINT32 (*)(InferDataTypeContext *); |
Prototype
1 | OpImplRegisterV2 &InferDataType(InferDataTypeKernelFunc infer_datatype_func) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
infer_datatype_func |
Input |
User-defined InferDataType function to be registered, which is of the InferDataTypeKernelFunc type. |
Returns
OpImplRegisterV2 object of the operator, where the InferDataType function infer_datatype_func is registered.
Constraints
None
Parent topic: OpImplRegisterV2