trnsci
Scientific computing suite for AWS Trainium via NKI. Six focused libraries providing the cu* equivalents the Neuron SDK doesn't ship.
Suite
| Project | NVIDIA analog | Scope | PyPI |
|---|---|---|---|
| trnfft | cuFFT | FFT, complex tensors, STFT, spherical harmonic transforms, complex NN layers | |
| trnblas | cuBLAS | BLAS Levels 1–3, batched GEMM, DF-MP2 energy | |
| trnrand | cuRAND | Threefry/Philox PRNG, Sobol/Halton QMC | |
| trnsolver | cuSOLVER | Cholesky/LU/QR/SVD, Jacobi eigh, CG/GMRES and block CG, SCF eigensolvers | |
| trnsparse | cuSPARSE | BSR-128 SpMM, Schwarz screening, block-sparse attention, fused kernel-matrix operator | |
| trntensor | cuTENSOR | Einstein summation with path planning, CP/Tucker/TT, streamed DF integrals, multi-chip sharding |
Install
# Meta-package with all six sub-projects
pip install "trnsci[all]"
# Individual components
pip install "trnsci[fft]" # just trnfft
pip install "trnsci[blas]" # just trnblas
# ... etc
On Trn2/Trn3, start from the Neuron SDK 2.33 Deep Learning AMI (PyTorch 2.14 environment), which already has torch-neuronx and NKI, or add them with pip install "trnsci[all,torchneuron]" --extra-index-url https://pip.repos.neuron.amazonaws.com (Python ≥ 3.12). On Trn1/Inf2, pip install "trnsci[all,neuron]" --extra-index-url https://pip.repos.neuron.amazonaws.com adds the PyTorch/XLA-lineage packages. Details and the current trnsci[all] minimums: installation.
Development install
git clone git@github.com:trnsci/trnsci.git
cd trnsci
for p in trnfft trnblas trnrand trnsparse trntensor; do
[ -d "$p" ] || git clone "git@github.com:trnsci/$p.git"
done
[ -d trnsolve ] || git clone git@github.com:trnsci/trnsolver.git trnsolve
make install-dev # pip install -e on each sub-project + umbrella
make test-all # run pytest across all sub-projects
Cross-project example
python examples/quantum_chemistry/df_mp2_synthetic.py --demo
python examples/quantum_chemistry/df_mp2_synthetic.py --demo --device neuron # Trn2/Trn3
Closed-shell DF-MP2 energy evaluation composing trnrand (synthetic inputs), trnsparse (Schwarz screening report), trnsolver (Cholesky of the DF metric), trnblas (half-transforms) and trntensor (mp2_energy), checked against a float64 reference. examples/quantum_chemistry/df_mp2_profile.py profiles the same pipeline across a ladder of sizes. See also examples/nvidia_samples/ for direct ports of canonical NVIDIA CUDA samples.
Status
All sub-projects are Alpha. CPU/PyTorch fallback is functional end-to-end. All six libraries ship NKI kernels with native TorchNeuron dispatch on Trn2/Trn3 (Neuron SDK 2.33), every library runs a conformance suite against independent references, and their current releases are validated on Trn2 (validation status). The PyTorch/XLA path on Trn1 is in maintenance. On the native device, auto dispatch uses an NKI kernel only where it measured faster than aten, and float64 follows one suite policy: the device has no float64 arithmetic, so auto computes it on the host.
Workload-level results on one Trn2 chip — a 10⁶-point Gaussian process, spherical harmonic transforms, DF-RHF/MP2 to 3508 basis functions and DeepVariant call_variants — are on exemplars.
Roadmap
Five-phase plan from current alpha to generation-tuned stable release, tracked in the GitHub milestones and on the project board. See the reader-oriented version on trnsci.dev and the phase definitions in ROADMAP.md.
Community
License
Apache 2.0 — Copyright 2026 Scott Friedman.
Disclaimer
trnsci is an independent open-source project. It is not sponsored by, endorsed by, or affiliated with Amazon.com, Inc., Amazon Web Services, Inc., or Annapurna Labs Ltd.
"AWS", "Amazon", "Trainium", "Inferentia", "NeuronCore", "Neuron SDK", and related identifiers are trademarks of their respective owners and are used here solely for descriptive and interoperability purposes. Use does not imply endorsement, partnership, or any other relationship.
All work, opinions, analyses, benchmark results, architectural commentary, and editorial judgments in this repository and on trnsci.dev are those of the project's contributors. They do not represent the views, positions, or commitments of Amazon, AWS, or Annapurna Labs.
Feedback directed at the Neuron SDK or Trainium hardware is good-faith ecosystem commentary from independent users. It is not privileged information, is not pre-reviewed by AWS, and should not be read as authoritative about product roadmap, behavior, or quality.
For official AWS guidance, see aws-neuron documentation and the AWS Trainium product page.
Metadata
Release files for trnsci 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| trnsci-0.2.4.tar.gz | 796.7 kB | With provenance | Details for trnsci-0.2.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| trnsci-0.2.4-py3-none-any.whl | Python 3 | none | any | Details for trnsci-0.2.4-py3-none-any.whl |
Total release size: 805.2 kB
Release files / trnsci-0.2.4.tar.gz
| Download URL | trnsci-0.2.4.tar.gz |
|---|---|
| Size | 796.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
527d63b3eae1ad5731cb32e3aa6920b7ec70a33e00c68b80154346f8028ded3c
|
|
BLAKE2b-256 checksum How to use checksums |
d7b8af0b7c041b0694db147ed2b6c432bc70895f65c963f9bbd6fd549ba4ae05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logRelease files / trnsci-0.2.4-py3-none-any.whl
| Download URL | trnsci-0.2.4-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc44623d7fbfbb531f45bf38812f7e7e41417b8f7802feda76609d62be9ddc79
|
|
BLAKE2b-256 checksum How to use checksums |
885a7d9f9d1451e324bcbd33e8320221a9860af56c0d8bcd65377fcc27f1460a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logSecurity for trnsci 0.2.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for trnsci-0.2.4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.