CompileInfo
Function Usage
Passes the pointer pointing to CompileInfo into TilingContext.
Prototype
ContextBuilder &CompileInfo(void *compileInfo);
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
compileInfo |
Input |
void pointer pointing to CompileInfo. |
Returns
Object of the current ContextBuilder
Constraints
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
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