PlatformInfo
Function Usage
Passes the pointer pointing to fe::PlatFormInfos into TilingContext.
Prototype
ContextBuilder &PlatformInfo(void *platformInfo);
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
platformInfo |
Input |
void pointer pointing to fe::PlatFormInfos data. |
Returns
Object of the current ContextBuilder
Constraints
Due to the different internal data sorting of TilingContext, KernelContext, and TilingParseContext, Platform() can be used only when BuildTilingContext() is called. For other scenarios, the Outputs API is recommended. Otherwise, undefined behavior occurs.
Example
void AddPlatformInfo(fe::PlatFormInfos *platformInfo)
{
......
auto kernelContextHolder = context_ascendc::ContextBuilder()
...... // Add calls to operator input and output APIs.
.PlatformInfo(reinterpret_cast<void*>(platformInfo));
.BuildTilingContext();
......
}
Parent topic: ContextBuilder