tinysolve
torch.linalg.solve for tinygrad: solve A @ x = B for x.
from tinygrad import Tensor
from tinysolve import solve
A = Tensor.randn(2000, 16, 16) + 16 * Tensor.eye(16)
B = Tensor.randn(2000, 16, 4)
x = solve(A, B) # (2000, 16, 4)
# differentiable (higher-order too)
gA, gB = solve(A, B).sum().gradient(A, B)
Install
uv add tinysolve # or: pip install tinysolve
Development
uv run pytest # tests
uv run pytest tests/benchmark.py # benchmarks
uv run ruff check . && uv run ty check
License
MIT
Metadata
Release files for tinysolve 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tinysolve-0.2.1.tar.gz | 6.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tinysolve-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.6 kB
Release files / tinysolve-0.2.1.tar.gz
| Download URL | tinysolve-0.2.1.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
36f3f5feaef1ab1939af6c66d5f3cec1cc0c098107479c651b1a43070995f277
|
|
BLAKE2b-256 checksum How to use checksums |
2edfa07b78851d2e15abd39f7d3da6626f7da063ca53d5b95de5c1a1bf2e7db1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / tinysolve-0.2.1-py3-none-any.whl
| Download URL | tinysolve-0.2.1-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ba2e71dc8b50d4f621afabfb44f69cbcabbf569a1752a6a9c45637fb44dd5f2f
|
|
BLAKE2b-256 checksum How to use checksums |
6974bbb5c10e448ab7944cac083cb973156f661d00b132aa1eb1a5e5fd57fa73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|