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