Overview
Provides a series of APIs for you to manually build the TilingContext class to verify the tiling functions and the KernelContext class to verify the TilingParse functions.
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
// Build KernelContext. auto kernelContextHolder = context_ascendc::ContextBuilder() .Inputs(...) .Outputs(...) .BuildKernelRunContext(); gert::KernelContext* tilingParseContext = kernelContextHolder->GetContext<gert::KernelContext>(); // Build TilingContext. auto tilingContextHolder = context_ascendc::ContextBuilder() .SetOpNameType(...,...) .NodeIoNum(...) .IrInstanceNum(...) .AddInputTd(...) .AddOutputTd(...) .AddAttr(...) .BuildTilingContext(...); gert::TilingContext* tilingContext = tilingContextHolder->GetContext<gert::TilingContext>(); |
Parent topic: ContextBuilder