Mull(ISASI)
Applicability
|
Product |
Supported |
|---|---|
|
Atlas 350 Accelerator Card |
√ |
|
|
x |
|
|
x |
|
|
x |
|
|
x |
|
|
x |
|
|
x |
Function Usage
Multiplies the first count data elements of src0 and src1 element-wise, and writes the result to dst0Local. If the result overflows, the overflow part is written to dst1Local. The formula is as follows:

Prototype
template <typename T> __aicore__ inline void Mull(const LocalTensor<T>& dst0, const LocalTensor<T>& dst1, const LocalTensor<T>& src0, const LocalTensor<T>& src1, const uint32_t count)
Parameters
|
Parameter |
Description |
|---|---|
|
T |
Operand data type. For the Atlas 350 Accelerator Card, the supported data types are int32_t and uint32_t. |
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
dst0 and dst1 |
Output |
Destination operand. The type is LocalTensor, and TPosition can be VECIN, VECCALC, or VECOUT. The start address of LocalTensor must be 32-byte aligned. |
|
src0 and src1 |
Input |
Source operand. The type is LocalTensor, and TPosition can be VECIN, VECCALC, or VECOUT. The start address of LocalTensor must be 32-byte aligned. Both source operands must have the same data type as the destination operand. |
|
count |
Input |
Number of elements involved in the computation. |
Returns
None
Restrictions
- For details about the operand address alignment requirements, see General Address Alignment Restrictions.
Examples
For more examples, see LINK.
1
|
AscendC::Mull(dst0Local, dst1Local, src0Local, src1Local, 512); |
Input (src0Local): [-2039520159 95829766 -1522913829 ... ] Input (src1Local): [-1791575569 -291976917 -1973597151 ... ] Output (dst0Local): [-1560359025 212356098 1219226939 ... ] Output (dst1Local): [850752575 -6514620 699800065 ... ]