Element-wise Multiply
L1 · MathWHAT IT ISThe element-wise product of two length-N vectors: c_i = a_i * b_i.
ARITHMETICVECTORREFERENCECPU
SIGNATURE
kernel multiply<type T: Numeric, N: u32>(
%a: tensor<N x T>,
%b: tensor<N x T>,
) -> %c: tensor<N x T>
SPECIFICATIONS1publishedIMPLEMENTATIONS54 measured
BENCHMARKS6across 2 machines
FASTEST3.71 µsN70 on fairmath-general-runner
CHALLENGES0none openedDESCRIPTION
Definition
Given over a ring , compute with
Each output element depends on exactly one element of each input. There is no summation and no interaction between positions: this is neither an inner product () nor a convolution (position of a convolution sums over ). Both are separate kernels.
Complexity
ring multiplications, reads, writes. No algorithm improves on this bound. Performance differences between implementations at a fixed point reflect memory traffic and vectorisation, not arithmetic.
Role in the catalogue
The correct answer is inexpensive to compute independently, so the kernel is also used to validate the measurement pipeline itself — generator, oracle, verifier and runner.
MAINTAINER
FM
fairmathreviews specifications · resolves disputes
USED BY · 0 KERNELS
Kernels above this one. If this kernel is wrong, or slow, they are wrong or slow with it.Nothing depends on this kernel yet.BUILDS ON · 0 KERNELS
Kernels this one is stated in terms of. Not a call graph — a statement of dependence between problems.Nothing. This kernel sits at the bottom of the graph.RECENT ACTIVITYNothing yet.