ValueDepend
Function Usage
Indicates whether an input is a data-dependent input. Functions such as Tiling and InferShape depend on specific data of such inputs when implemented. The input data is on the host. You can obtain the input data by using GetInputTensor of the TilingContext class or GetInputTensor of the InferShapeContext class in the Tiling or InferShape function.
Prototype
1 2 |
OpParamDef &ValueDepend(Option value_depend) OpParamDef &ValueDepend(Option value_depend, DependScope scope) |
Parameters
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
value_depend |
Input |
The options of value_depend are as follows:
|
|
scope |
Input |
The scope type is the enumeration DependScope. The options are as follows:
|
Returns
OpParamDef operator definition. For details, see OpParamDef.
Restrictions
Only operator inputs can be configured. The input parameter data type can be set to DT_FLOAT, DT_BOOL, DT_INT64, DT_UINT64, DT_INT32, DT_UINT32, DT_INT16, DT_UINT16, DT_INT8, or DT_UINT8, and one of the following conditions must be met:
1. If the input parameter data type is set to DT_FLOAT, the generated output type is aclFloatArray (aclnn data type).
2. If the input parameter data type is set to DT_BOOL, the generated output type is aclBoolArray (aclnn data type).
3. If the input parameter data type is set to DT_INT64, DT_UINT64, DT_INT32, DT_UINT32, DT_INT16, DT_UINT16, DT_INT8, or DT_UINT8, the generated output type is aclIntArray (aclnn data type). If the data type configuration contains a data type other than DT_INT64, an additional set of input/output data type combinations corresponding to DT_INT64 must be added.