MutableAttrs

Function

Obtains the attribute values of an operator. Only the attribute values registered in the operator IR prototype definition and the IMPL_OP macro are returned; other attribute values are discarded.

The difference between this method and GetAttrs is that it can return a non-const attribute object.

Function Prototype

RuntimeAttrs *MutableAttrs() const

Parameters

None

Return Value

All attribute values defined in the IR prototype and those registered through the IMPL_OP macro. The attribute values are stored in the order defined by the IR prototype. The returned object is non-const.

Constraints

None

Example

auto compute_node_info = extend_kernel_context->GetComputeNodeInfo();
auto attrs = compute_node_info->MutableAttrs();