InferDataType
Description
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:
using InferDataTypeKernelFunc = UINT32 (*)(InferDataTypeContext *);
Prototype
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.
Restrictions
None
Parent topic: OpImplRegisterV2