BuildTilingContext
Function
Constructs the KernelRunContextHolder object, which can be used to obtain the object of the TilingContext type using the GetContext API.
Prototype
1 | std::shared_ptr<KernelRunContextHolder> BuildTilingContext() |
Parameters
None
Returns
Shared pointer pointing to KernelRunContextHolder.
Constraints
None
Examples
1 2 3 4 5 6 7 8 9 | auto tilingContextHolder = context_ascendc::ContextBuilder(). .SetOpNameType(...,...) .NodeIoNum(...) .IrInstanceNum(...) .AddInputTd(...) .AddOutputTd(...) .AddAttr(...) .BuildTilingContext(...); gert::TilingContext *tilingContext = tilingContextHolder->GetContext<gert::TilingContext>(); |
Parent topic: ContextBuilder