PlatformInfo
Function
Passes the pointer pointing to fe::PlatFormInfos into TilingContext.
Prototype
1 | ContextBuilder &PlatformInfo(void *platformInfo) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
platformInfo |
Input |
void pointer pointing to fe::PlatFormInfos data. |
Returns
Object of the current ContextBuilder
Restrictions
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
1 2 3 4 5 6 7 8 9 10 | 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