Overview
OpCheckContext is inherited from ExtendedKernelContext and is used to verify the operator parameters and shapes. Its key function is to verify the validity of the shapes, data types, and dimensions of the input and output tensors before the operator is registered or executed, ensuring that the operator can run safely and correctly.
The following figure shows the inheritance relationship of OpCheckContext.
Header Files to Be Included
1 | #include "exe_graph/runtime/exe_res_generation_context.h" |
Public Member Functions
const StorageShape* GetInputShape(int64_t index) const const StorageShape* GetOutputShape(int64_t index) const
Parent topic: OpCheckContext