SetSingleShape

Applicability

Product

Supported

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

x

Atlas inference product's AI Core

x

Atlas inference product's Vector Core

x

Atlas training products

x

Function

Sets the shape of Conv3DBackpropFilter computation on a single core and modifies the shape at runtime.

Prototype

1
__aicore__ inline void SetSingleShape(uint64_t singleCoreM, uint64_t singleCoreN, uint64_t singleCoreK)

Parameters

Table 1 API parameters

Parameter

Input/Output

Description

singleCoreM

Input

Size of M on a single core. The unit is element.

singleCoreN

Input

Size of N on a single core. The unit is element.

singleCoreK

Input

Size of K on a single core. The unit is element.

Returns

None

Restrictions

None

Example

1
2
3
4
5
6
7
8
9
const Conv3DBackpropFilterTilingData* tilingData;
//... Initialize tilingData.
ConvBackpropApi::Conv3DBackpropFilter <inputType, weightSizeType, gradOutputType, gradWeightType > gradWeight_;
....
gradWeight_.Init(&(tilingData->dwTiling));
gradWeight_.SetInput(inputGm_[offsetB_]);
gradWeight_.SetGradOutput(gradOutputGm_[offsetA_]);
gradWeight_.SetSingleShape(singleCoreM, singleCoreN, singleCoreK);// Set the single-core computation volume.
....