昇腾社区首页
中文
注册

ComplexMatDot

功能描述

  • asdBlasMakeComplexMatDotPlan

    接口功能:初始化该句柄对应的ComplexMatDot算子配置。

  • asdBlasComplexMatDot

    接口功能:实现两个复数矩阵对应位置逐点乘,返回一个和输入矩阵同样形状大小的复数矩阵。

计算公式

asdBlasComplexMatDot
  • 计算公式:

  • 示例:

    输入“matx”为:

      [   [ 1 +  i, 1 + 2i, 1 + 3i ],
          [ 1 + 4i, 1 + 5i, 1 + 6i ]   ]

    输入“maty”为:

      [   [ 2 +  i, 2 + 2i, 2 + 3i ],
          [ 2 + 4i, 2 + 5i, 2 + 6i ]   ]

    调用“ComplexMatDot”算子后,

    输出“result”为:

      [   [   1 +  3i,  -2 +  6i, -7 + 9i ],
          [ -14 + 12i, -23 + 15i, -34 + 18i ]   ]

接口原型

  • AspbStatus asdBlasMakeComplexMatDotPlan(asdBlasHandle handle)
  • AspbStatus asdBlasComplexMatDot(asdBlasHandle handle, const int64_t m, const int64_t n, aclTensor *matx, aclTensor *maty,aclTensor *result);

参数列表

  • asdBlasMakeComplexMatDotPlan

    参数名称

    Input/Output

    类型

    描述

    handle

    Input

    asdBlasHandle

    ComplexMatDot算子的句柄。

  • asdBlasComplexMatDot

规格约束

  • asdBlasMakeComplexMatDotPlan:无。
  • asdBlasComplexMatDot
    • 非原地更新情况下,输入和输出占用的内存大小应不超过NPU的GM大小;
    • 原地更新情况下,输入占用的内存大小应不超过NPU的GM大小;
    • 算子输入shape为[m,n]、[m,n],输出shape为[m,n];
    • 算子实际计算时,不支持ND高维度运算(不支持维度≥3的运算)。