|
Uni20
Asynchronous tensor and runtime library.
|
This directory contains dense linear-algebra front ends and operation descriptors. It is the policy layer that selects or describes dense operations before they lower to backend wrappers and kernels.
linalg.hpp: public include point for the dense linalg layer.operation_tags.hpp: central catalogue of dispatchable operation values and their diagnostic names, including callable-carrying elementwise operation descriptors.elementwise_functions.hpp: named backend-neutral function objects that may have explicit precompiled backend lowerings.reduction_axes.hpp: normalized reduced/surviving axis descriptors shared by reduction front ends and backends.contraction_axes.hpp: normalized contracted/surviving axis descriptors for fixed-rank pairwise contractions.contraction_strides.hpp: jointly merged M/N/K stride metadata plus direct and one-residual-axis rank-two GEMM projections.backend_selector.hpp: ordered backend selector values, Uni20-owned operation/storage defaults, user selector overrides, and the stateless host backend entries shared with tensor storage.dispatch.hpp: operation-value backend-list dispatch helpers.dispatch_diagnostics.hpp: disabled-by-default structured observation of ordered backend walks.kernel_attempt.hpp, dispatch_error.hpp, dispatch_error_presentation.hpp: clean backend-decline results and terminal dispatch-failure diagnostics.async.hpp: opt-in include point for scheduled Async<Tensor> copies, transforms, reductions, contractions, dense solves and factorizations.krylov/.backends/ and call provider wrappers under backend/ where appropriate.operation_tags.hpp; do not redeclare operation identities locally.dispatch_kernel with their operation tag and an explicit selector. Tensor-view operands use the fixed-output gemm or gemv front end so it can derive their common storage selector, or they may supply an explicit selector override.async/ layer. They resolve the static storage selector before scheduling and await Tensor values. Fixed operands then lower to mdspecs for coroutine-aware operation dispatch; value-oriented wrappers may call the corresponding synchronous Tensor front end. Ordinary backends do not depend on the async runtime.copy_op is the semantic element-copy operation used by Tensor copy and make_tensor. Its CPU backend respects accessors. CudaReferenceBackend handles canonical contiguous host/device and device/device transfers plus registered same-device positive-strided accessor lowerings. Future BLAS matrix-copy extensions may accept representable rank-two layouts and conjugating views; strict BLAS/LAPACK compute wrappers still do not materialize implicitly.transform_op<F> and transform_inplace_op<F> carry a const-invoked callable through dispatch. The CPU reference backend supports arbitrary rank and input arity. The CUDA reference backend explicitly registers same-element-type unary and binary arithmetic function objects plus stateful linalg::scale<Factor>; other optimized callable/layout combinations belong in specialized backends.sum_reduction_op<R, N> carries normalized reduced and surviving axes. Tensor front ends remove the selected axes, preserve canonical result layout, and use the generic CPU reference executor when no earlier backend accepts.matrix_norm_op computes maximum-entry, induced one/infinity, or Frobenius norms. Complex norms use the mathematical complex magnitude; LAPACK handles complex Frobenius norms but declines its incompatible component-sum forms.linear_solve_op is the destructive general-system workspace operation. solve_inplace exposes that contract directly, while solve preserves its inputs by materializing column-major host work matrices. The recoverable solve_inplace_with_info frontend returns the kernel's SolveInfo output; numerical failure does not mean dispatch decline. See square solves for pivot policy and precision.qr_op and lq_op are destructive reduced real factorization operations. Their preserving value APIs materialize column-major host work and return owning reduced factors.kernel_accepts_types, and try_kernel; the former backend-tag selector hierarchy has been removed.backend_selector_override complete replacement priority over Uni20's backend_selector_default; absent either, it uses the storage policy's general selector.kernel_type_candidates(...) filters a selector to its ordered yes and maybe type candidates while preserving backend values, allowing shared conformance tests to exercise every compatible backend independently.core/.