Metadata-Version: 2.4
Name: trnsci
Version: 0.1.0
Summary: Scientific computing suite for AWS Trainium via NKI (FFT, BLAS, RAND, SOLVER, SPARSE, TENSOR)
Author-email: Scott Friedman <scttfrdmn@gmail.com>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/trnsci/trnsci
Project-URL: Documentation, https://trnsci.dev/
Project-URL: Repository, https://github.com/trnsci/trnsci
Project-URL: Issues, https://github.com/trnsci/trnsci/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: fft
Requires-Dist: trnfft>=0.7; extra == "fft"
Provides-Extra: blas
Requires-Dist: trnblas>=0.3; extra == "blas"
Provides-Extra: rand
Requires-Dist: trnrand>=0.1; extra == "rand"
Provides-Extra: solver
Requires-Dist: trnsolver>=0.1; extra == "solver"
Provides-Extra: sparse
Requires-Dist: trnsparse>=0.1; extra == "sparse"
Provides-Extra: tensor
Requires-Dist: trntensor>=0.1; extra == "tensor"
Provides-Extra: all
Requires-Dist: trnfft>=0.7; extra == "all"
Requires-Dist: trnblas>=0.3; extra == "all"
Requires-Dist: trnrand>=0.1; extra == "all"
Requires-Dist: trnsolver>=0.1; extra == "all"
Requires-Dist: trnsparse>=0.1; extra == "all"
Requires-Dist: trntensor>=0.1; extra == "all"
Provides-Extra: neuron
Requires-Dist: neuronxcc>=2.24; extra == "neuron"
Requires-Dist: torch-neuronx>=2.9; extra == "neuron"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-benchmark>=4.0; extra == "dev"
Requires-Dist: mkdocs>=1.5; extra == "dev"
Requires-Dist: mkdocs-material>=9.0; extra == "dev"
Requires-Dist: mkdocs-monorepo-plugin>=1.1; extra == "dev"
Dynamic: license-file

# trnsci

[![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE)
[![Docs](https://img.shields.io/badge/docs-trnsci.dev-blue)](https://trnsci.dev/)

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 |
|---|---|---|
| [trnfft](trnfft/) | cuFFT | FFT, complex tensors, complex NN layers |
| [trnblas](trnblas/) | cuBLAS | Level 1–3 BLAS, batched GEMM |
| [trnrand](trnrand/) | cuRAND | Philox PRNG, Sobol/Halton QMC, LHS |
| [trnsolver](trnsolve/) | cuSOLVER | Cholesky/LU/QR, Jacobi eigh, CG/GMRES |
| [trnsparse](trnsparse/) | cuSPARSE | CSR/COO, SpMV/SpMM, Schwarz screening |
| [trntensor](trntensor/) | cuTENSOR | einsum with contraction planning, CP/Tucker |

## Install

```bash
# 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 Neuron hardware
pip install trnsci[all,neuron]
```

## Development install

```bash
git clone git@github.com:trnsci/trnsci.git
cd trnsci
make install-dev   # pip install -e on each sub-project + umbrella
make test-all      # run pytest across all sub-projects
```

## Cross-project example

```bash
python examples/quantum_chemistry/df_mp2_synthetic.py --demo
```

DF-MP2 energy evaluation composing `trnblas` (half-transforms), `trnsolver` (Cholesky of DF metric), and `trntensor` (einsum contraction). 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. NKI kernels are scaffolded across the suite; on-hardware validation is the next milestone.

## Community

- Site: [trnsci.dev](https://trnsci.dev/)
- [Contributing guidelines](CONTRIBUTING.md)
- [Code of Conduct](CODE_OF_CONDUCT.md)

## License

Apache 2.0 — Copyright 2026 Scott Friedman
