获取指定索引的算子属性,返回指向此属性的指针。
template<typename T> const T *GetAttrPointer(size_t index) const
参数 |
输入/输出 |
说明 |
---|---|---|
T |
指定的输出类型 |
属性类型 |
index |
输入 |
属性在IR原型定义中以及在OP_IMPL注册中的索引。 |
指向属性的指针。
无。
const RuntimeAttrs * runtime_attrs = kernel_context->GetAttrs(); const gert::ContinuousVector attr0 = runtime_attrs->GetAttrPointer<gert::ContinuousVector>(0);