PlatformInfo
函数功能
将指向fe::PlatFormInfos 的void* 指针传入TilingContext。
函数原型
ContextBuilder &PlatformInfo(void *platformInfo);
参数说明
参数 |
输入/输出 |
说明 |
|---|---|---|
platformInfo |
输入 |
指向fe::PlatFormInfos类型数据的void指针 |
返回值说明
当前ContextBuilder的对象。
约束说明
由于TilingContext与KernelContext,TilingParseContext内部数据排序不同,Platform()只支持以调用BuildTilingContext()为前提来使用;其他场景建议用Outputs接口,否则发生未定义行为。
调用示例
void AddPlatformInfo(fe::PlatFormInfos *platformInfo)
{
......
auto kernelContextHolder = context_ascendc::ContextBuilder()
...... // 增加算子输入输出接口的调用
.PlatformInfo(reinterpret_cast<void*>(platformInfo));
.BuildTilingContext();
......
}
父主题: ContextBuilder类