昇腾社区首页
中文
注册
开发者
下载

GetInferenceContext

产品支持情况

产品

是否支持

Atlas A3 训练系列产品 / Atlas A3 推理系列产品

Atlas A2 训练系列产品 / Atlas A2 推理系列产品

Atlas 200I/500 A2 推理产品

Atlas 推理系列产品

Atlas 训练系列产品

头文件

/include/graph/ct_infer_shape_range_context.h

功能说明

获取InferenceContext指针。

函数原型

1
ge::InferenceContext *GetInferenceContext() const

参数说明

返回值说明

输出InferenceContext指针。

关于InferenceContext类型的定义,请参见4.7-InferenceContext

约束说明

调用示例

1
2
3
4
ge::graphStatus InferShapeForXXX(CtInferShapeRangeContext *context) {
  const auto &read_inference_context = ct_context->GetInferenceContext();
  // ...
}