IsConstInput

Function Usage

Checks whether an input tensor is constant data.

Prototype

1
bool IsConstInput(const ge::AscendString &name) const

Parameters

Parameter

Input/Output

Description

name

Input

Input tensor name

Returns

true indicates that the input is a constant. false indicates that the input is a dynamic input (such as input data and intermediate result).

Constraints

None

Examples

1
2
3
4
5
bool IsConstInput(ExeResGenerationContext *context) {
  ge::AscendString name = "XXX";
  bool status = *context->IsConstInput(name);
  ...
}