InferFormat
Function Usage
Registers the InferFormat function of an operator.
For some format-sensitive Cube operators, using the internal format that better adapts to the underlying hardware can bring great performance benefits. Therefore, you need to implement and register the InferFormat function.
Prototype
OpImplRegisterV2 &InferFormat(InferFormatFunc infer_format_func)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
infer_format_func |
Input |
User-defined InferFormat function to be registered. It is of the InferFormatFunc type. The InferFormatFunc type is defined as follows: using InferFormatFunc = UINT32 (*)(InferFormatContext *context); |
Returns
OpImplRegisterV2 object of the operator, where the InferFormat function infer_format_func is registered.
Constraints
None
Parent topic: OpImplRegisterV2