[object Object][object Object][object Object]undefined
[object Object]
  • This API is used to complete the matrix multiplication computation of level-2 quantization mxfp4. The parameter x2 must be in the NZ format. You can use or to convert the format of x2 from ND to NZ.
  • Formulaout=ilevel0GroupSizex1Level0Scale@x2Level0Scaleijlevel1GroupSize((x1Level1Scale@x1ij)@(x2Level1Scale@x2ij))+biasout =\sum_{i}^{level0GroupSize} x1Level0Scale @ x2Level0Scale \sum_{ij}^{level1GroupSize} ((x1Level1Scale @ x1_{ij})@ (x2Level1Scale @ x2_{ij})) + bias
    • x1 and x2 are the left and right matrices for matrix computation, respectively. The data type is FLOAT4_E2M1.
    • x1Level0Scale and x2Level0Scale are level-1 quantization parameters. The data type is FLOAT32.
    • x1Level1Scale and x2Level1Scale are level-2 quantization parameters. The data type is FLOAT8_E8M0.
    • (Optional) bias is the bias added after the matrix multiplication operation. The data type is FLOAT32.
    • level0GroupSize indicates the group size for level-1 quantization. Only 512 is supported.
    • level1GroupSize indicates the group size for level-1 quantization. Only 32 is supported.
[object Object]

Each operator has [object Object]two-phase API calls[object Object]. You must call the aclnnDualLevelQuantMatmulWeightNzGetWorkspaceSize API to obtain the workspace size required for computation and the executor that contains the operator computation process, and then call the aclnnDualLevelQuantMatmulWeightNz API to perform the computation.

[object Object]
[object Object]
[object Object]
  • Parameters

    [object Object]
  • Return Value

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

    The first-phase API implements input parameter validation. The following error codes may be returned.

    [object Object]
[object Object]
  • Parameters

    [object Object]
  • Return Value

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

[object Object]

Deterministic computing: The aclnnDualLevelQuantMatmulWeightNz function is implemented in deterministic mode by default.

[object Object]

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

[object Object]