mmaemu
Copyright 2026 Xun Ding and the mmaemu contributors

mmaemu emulates the numerics of NVIDIA tensor-core FP8 GEMMs (cuBLAS FP8 GEMM / torch._scaled_mm).
It is licensed under the Apache License, Version 2.0 (see LICENSE).

Third-party material
--------------------

Parts of mmaemu are translated and adapted from the MATLAB Tensor Core toolbox
(https://github.com/north-numerical-computing/MATLAB-tensor-core), Copyright (c) 2025, Faizan A. Khattak
and Mantas Mikaitis, distributed under the BSD 2-Clause License. That licence is reproduced below and in
LICENSES/BSD-2-Clause-MATLAB-tensor-core.txt. Reference: F. A. Khattak, M. Mikaitis, "Accurate Models of
NVIDIA Tensor Cores", ACM Transactions on Architecture and Code Optimization 23(3), 2026,
doi:10.1145/3830409 (arXiv:2512.07004).

Files derived from the toolbox:
- mmaemu/model/chain.py: the tensor-core block multiply-accumulate model (block alignment, truncation and
  normalisation of the inner product), translated from the toolbox's MATLAB models; the preset parameters in
  mmaemu/model/presets.py come from the same models.
- mmaemu/backends/cuda/csrc/ (the CUDA kernels, *.cu and *.cuh): GPU implementations of the same model.
- tests/data/toolbox/: validation vectors from the toolbox (converted to .npz; SOURCES.json lists the original
  files), with the toolbox licence next to them.
- tools/bringup/kits/ (repository only, not part of the wheel or the sdist): probe sets built from the toolbox
  validation vectors.

Data derived from Evo 2 (not part of the wheel): the Arc Institute's evo2
(https://github.com/ArcInstitute/evo2) and its checkpoint arcinstitute/evo2_1b_base are licensed under the
Apache License, Version 2.0.
- tests/data/hw_mini/evo2.npz (also in the sdist): the E4M3 operands of three Evo 2 1B projections on the RTX
  4060 (32 x 1920 activations and 128 x 1920 quantised weight values each) and the hardware's outputs.
- examples/data/ (repository only): outputs of the official Evo 2 1B path on the RTX 4060 for the four prompts
  of evo2's test/data/prompts.csv (stored as token ids) and two windows of their concatenation, and for 500
  BRCA1 variants (positions, alleles and classes) from Findlay et al., Nature 562, 217-222 (2018),
  Supplementary Table, as used by evo2's BRCA1 notebook.

The wheel and the sdist carry this NOTICE and LICENSES/BSD-2-Clause-MATLAB-tensor-core.txt.

BSD 2-Clause License

Copyright (c) 2025, Faizan A. Khattak and Mantas Mikaitis
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
   list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
