Every operator family, one line each. Every name links into the
API Reference for its signature — see Operations for why
this page does not repeat them.
Reading the tables: the Reach column gives the shortest spelling that works.
pl. means the name is available unqualified; pl.tile. / pl.tensor. mean the
operator is level-specific. Names marked (t) are tile-only operators re-exported at
top level for convenience — pl.loadispl.tile.load, not a dispatcher.
Binary arithmetic; a Python number on the right selects the scalar-operand form. For Tensor/Tensor and Tile/Tile div, high_precision=True selects the slower, higher-precision PTO path on A5; on A2/A3 PTO-ISA ignores it and returns the default result, which compilation warns about
Unary negate, absolute value, reciprocal. For FP16/FP32 reciprocal, high_precision=True selects the slower, higher-precision PTO path on A5; on A2/A3 PTO-ISA ignores it and returns the default result, which compilation warns about
Floor (rem*) and truncating (fmod*) remainder. Tensor operands must match shape and dtype; tile-tile operands must match physical and valid shapes. A2/A3 supports FP32/INT32 for rem* and FP32 for fmod*; every A2/A3 INT32 rem* source/scalar value must be in the inclusive PTO-ISA domain [-2^24, 2^24]. A2/A3 scalar forms require provably positive valid extents. Tile rem / rems scratch must have provably sufficient physical and valid capacity (two / one rows and all source columns) and must not overlap a live source on A2/A3. A5 accepts the wider frontend dtype union. high_precision=True is FP32 tile-tile only (defined on A5; accepted but ignored on A2/A3, where compilation warns)
Exponential, natural logarithm. For log, high_precision=True selects the slower, higher-precision PTO path on A5; on A2/A3 PTO-ISA ignores it and returns the default result, which compilation warns about
Square root; reciprocal square root. high_precision= is tensor-only and raises on a Tile — at tile level precision is selected by passing the scratch tile to pl.tile.rsqrt(src, tmp)
out[i] = cond[i] ? a[i] : b[i]. The condition is a cmp / cmps mask (for a 0/1 value, compare it first: cmps(v, 0, cmp_type=1)); either branch may be a constant scalar. No scratch tile — it is filled in during lowering. Two tile branches must share shape, valid extents, and dtype
Several reductions accept a tmp_tile argument. Passing one changes the reduction
strategy (binary tree versus sequential), which changes floating-point association — the
results differ within tolerance rather than being wrong. Reductions over a partially valid
tile depend on the pad value; see
Memory § valid shape.
Tensor pl.col_sum(x, is_binary=True) selects binary-tree reduction with compiler-managed scratch of shape [ceil(M/2), N] for static 2D inputs (full input shape otherwise). The default False preserves sequential reduction. This changes floating-point summation order and can increase UB usage. Tile callers continue to select the tree by passing tmp_tile.
Ascend950 block-32 dynamic quantization to FP8E4M3FN or packed fp4e2m1x2 data plus FP8E8M0 scales. FP4 requires FP16/BF16 input; axis1 returns [M,K/2], axis0 transposes [N,K] to [K,N/2]. quant_scale_alg="ocp" is the default; "nv" supports FP4 axis0. Tensor calls materialize GM data and MX-layout scales; tile calls stay on-chip. FP8 results can feed matmul_mx; native FP4 matmul is blocked by PTOAS v0.67 geometry (see types).
quant_mx_raw
pl.tile. (t)
Direct Ascend950 TQUANT with explicit max/scaling workspaces. Returns native FP4E2M1X2 or INT8 data and raw UINT8 exponent codes, without blocked MX scale packing. Axis1 accepts any positive row count and K divisible by 32 (64 for native FP4); source valid rows may be smaller than physical rows. Axis0 consumes source orientation directly and groups 32 valid rows; interleave=True interleaves exponent pairs for FP16/BF16 with rows divisible by 64.
tmov_x2zz
pl. (t)
Ascend950 exponent X-to-ZZ layout conversion (UINT8). Workspace tmp is write-only; axis1 needs dst_rows/dst_cols for ZZ [M,G] over flat TQUANT exp. Typically used via quant_mx lowering rather than directly
A5 MX block-scale multiply. Tensor matmul_mx consumes oriented 2D data/scale tensors and returns FP32; _acc / _bias remain tile-only. Data reaching the op must be FP8E4M3FN; native FP4×FP4 is unsupported
For phased GEMV accumulation, select producer phases with pl.AccPhase. A producer
ending with pl.AccPhase.Final must be paired with a store using pl.STPhase.Final:
Here lhs0, rhs0, lhs1, and rhs1 are preloaded tiles, and output is the
destination tensor.
Push and pop must be paired, and each pop must be matched by a tfree. The tutorial covering this is
Mixed kernels; the machine-level mechanics are in
TPUSH/TPOP and
ExpandMixedKernel.
FP16, FP32 (mesh; hard compile-time check); HOST ring: FP32 only (4-byte)
Mesh: O(N) remote traffic per step. Ring: O(N/P) remote traffic per step, 2(P-1) steps.
AllGather
pld.tensor.allgather
—
—
—
FP32 only (HOST builtin); any GM dtype (InCore)
Push-based. Input and target must be different buffers.
ReduceScatter
pld.tensor.reduce_scatter
—
Sum, Max, Min, Prod (InCore); Sum only (HOST builtin)
—
FP32 only (HOST builtin); any GM dtype (InCore)
Every rank stages all NR chunks before the call.
Broadcast
pld.tensor.broadcast
—
—
—
FP32 only (HOST builtin); any GM dtype (InCore)
Root stages data before the call.
All-to-All
pld.tensor.all_to_all
—
—
—
FP32 only (HOST builtin); any GM dtype (InCore)
Personalized exchange. Input and target must be different buffers.
Barrier
pld.tensor.barrier
—
—
—
—
Signal is INT32, single-shot per call.
Put
pld.tensor.put
—
—
None_ / Add
All GM dtypes
dst must be window-bound. Supports chunked + pipelined staging.
Get
pld.tensor.get
—
—
—
All GM dtypes
src must be window-bound. Supports chunked + pipelined staging.
Notify
pld.system.notify
AtomicAdd / Set
—
—
—
Side-effect-only signal deposit.
Wait
pld.system.wait
Eq / Ge
—
—
—
Side-effect-only signal block.
Deferred Wait
pld.system.defer_wait
Ge only
—
—
INT32 signal
Register a monotonic counter condition without spinning the AIV; Simpler keeps the ordinary waiter TaskId incomplete and later work uses ordinary deps=[wait_tid].