CompileInfo
Function
Passes the pointer pointing to CompileInfo into TilingContext.
Prototype
1 | ContextBuilder &CompileInfo(void *compileInfo) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
compileInfo |
Input |
void pointer pointing to CompileInfo. |
Returns
Object of the current ContextBuilder
Restrictions
Due to the different internal data sorting of TilingContext, KernelContext, and TilingParseContext, CompileInfo() can be used only when BuildTilingContext() is called. For other scenarios, the Outputs API is recommended. Otherwise, undefined behavior occurs.
Example
1 2 3 4 5 6 7 8 9 10 | void AddCompileInfo(TilingParseContext *tilingParseContext) { ...... void *compilerInfo = *tilingParseContext->GetOutputPointer<void **>(0); auto kernelContextHolder = context_ascendc::ContextBuilder() ...... // Add calls to operator input and output APIs. .CompileInfo(compileInfo) .BuildTilingContext(); ...... } |
Parent topic: ContextBuilder