[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: Calculates the size of the weight to be allocated when the Matmul operator is in ND format. This API is used only to determine the size required for preprocessing the weight tensor to achieve optimal Matmul operator execution performance. For example, for performance optimization, when the input shape is [510, 510], the function reshapes it to [512, 512]. As a result, the input is interpreted as having 262,144 elements.

  • Formula:

    Float16/Bfloat16:result=i(0,3]Align(tensorShape[i],16)Float16/Bfloat16: result=\prod_{i \in(0, 3]}Align(tensorShape[i], 16) INT8:result=Align(Shapesize[0],16)Align(Shapesize[1],32)INT8: result = Align(Shapesize[0], 16) * Align(Shapesize[1], 32)
[object Object]

[object Object]

[object Object]
  • Parameters:

    • [object Object] (aclIntArray *, computation input): specifies the shape of the weight matrix for the Matmul operation. This parameter corresponds to [object Object] in the formula. It is represented as an aclIntArray on the host side. Only 2D shapes (n, k) are supported, where [object Object] is the size of the first dimension and [object Object] is the size of the second dimension. Empty arrays are not supported.
      • [object Object]Atlas inference products[object Object]: The data type can be FLOAT16.
      • [object Object]Atlas A2 training products/Atlas A2 inference products[object Object] and [object Object]Atlas A3 training products/Atlas A3 inference products[object Object]: The data type can be FLOAT16 or BFLOAT16.
    • [object Object] (uint64_t *, computation output): specifies the number of elements required for weight based on the internal processing logic of MatMul. This parameter corresponds to [object Object] in the formula.
  • Returns:

    [object Object]: status code. For details, see .

[object Object]
[object Object]
  • Deterministic computation:
    • [object Object] defaults to a deterministic implementation.
[object Object]

The following example is for reference only. For details, see .

[object Object]