GetAttrs

Function Usage

Obtains the attribute values of an operator. Only the attribute values in the operator IR prototype definition are returned, and other attribute values are deprecated.

Prototype

1
const RuntimeAttrs *GetAttrs() const

Parameters

None

Returns

All attribute values defined in the IR prototype are objects of the const type. The attribute values are saved in the sequence defined by the IR prototype.

Constraints

None

Examples

1
2
3
// Assume that KernelContext *context already exists.
auto extend_context = reinterpret_cast<ExtendedKernelContext *>(context);
auto rt_attrs = extend_context->GetAttrs();