A flexible linear operator abstraction in pytorch.
Project description
torch-named-linops
A flexible linear operator abstraction implemented in PyTorch.
Heavily inspired by einops.
Unrelated to the (also good) torch_linops
Selected Feature List
- Dedicated abstraction for naming linear operator dimensions.
- A set of core linops, including:
DenseDiagonalFFTArrayToBlocks[^1] (similar to PyTorch's unfold but in 1D/2D/3D/arbitrary dimensions)- Useful for local patch extraction
Interpolate[^1] (similar to SigPy's interpolate/gridding)- Comes with
kaiser_besseland (1D)splinekernels.
- Comes with
.Hand.Nproperties for adjoint $A^H$ and normal $A^HA$ linop creation.ChainandAddfor composing linops together.BatchandDistributedBatchwrappers for splitting linops temporally on a single GPU, or across multiple GPUs (viatorch.multiprocessing).- Full support for complex numbers. Adjoint takes the conjugate transpose.
- Full support for
autograd-based automatic differentiation.
[^1]: Includes a functional interface and triton backend for 1D/2D/3D.
Installation
Via pip
$ pip install torch-named-linops
From source (recommended for developers)
- Clone the repo with
git clone - Run
pip install -e .from the root directory.
- Or
uv add path/to/cloned/repo
- Pull upstream changes as required.
Via pip's git integration (deprecated)
Run the following, replacing <TAG> with the appropriate version (e.g. `0.3.7``)
- http version:
$ pip install git+https://github.com/nishi951/torch-named-linops.git@<TAG>
- ssh version:
$ pip install git+ssh://git@github.com/nishi951/torch-named-linops.git@<TAG>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file torch_named_linops-0.3.19.tar.gz.
File metadata
- Download URL: torch_named_linops-0.3.19.tar.gz
- Upload date:
- Size: 166.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf3fb5054be01f27b7a37bf6b1fa1a6e8317998dd809b3f863f24428c21bda5b
|
|
| MD5 |
1c27df889d00d075d2085be6ff9d3bf5
|
|
| BLAKE2b-256 |
410a6a89222c3fbb0ca5f4cff11874ed6ae3e93265db73ec71ff21b0eec45d22
|
Provenance
The following attestation bundles were made for torch_named_linops-0.3.19.tar.gz:
Publisher:
release.yml on nishi951/torch-named-linops
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
torch_named_linops-0.3.19.tar.gz -
Subject digest:
bf3fb5054be01f27b7a37bf6b1fa1a6e8317998dd809b3f863f24428c21bda5b - Sigstore transparency entry: 175239198
- Sigstore integration time:
-
Permalink:
nishi951/torch-named-linops@2d2dc063b7f337e525d5375d6d6c7e8a8afc1e65 -
Branch / Tag:
refs/tags/0.3.19 - Owner: https://github.com/nishi951
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2d2dc063b7f337e525d5375d6d6c7e8a8afc1e65 -
Trigger Event:
push
-
Statement type:
File details
Details for the file torch_named_linops-0.3.19-py3-none-any.whl.
File metadata
- Download URL: torch_named_linops-0.3.19-py3-none-any.whl
- Upload date:
- Size: 130.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2014eb6edcbace524268a41df9f4495fc5914517f49c6b6eef6611886611d61
|
|
| MD5 |
48d0db20e4a4842f1b601f5fbc3ddac6
|
|
| BLAKE2b-256 |
a2e4c4d127042f8a82364b1664f4b6987d1bc6f8405276054cedc148474af8ba
|
Provenance
The following attestation bundles were made for torch_named_linops-0.3.19-py3-none-any.whl:
Publisher:
release.yml on nishi951/torch-named-linops
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
torch_named_linops-0.3.19-py3-none-any.whl -
Subject digest:
f2014eb6edcbace524268a41df9f4495fc5914517f49c6b6eef6611886611d61 - Sigstore transparency entry: 175239199
- Sigstore integration time:
-
Permalink:
nishi951/torch-named-linops@2d2dc063b7f337e525d5375d6d6c7e8a8afc1e65 -
Branch / Tag:
refs/tags/0.3.19 - Owner: https://github.com/nishi951
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2d2dc063b7f337e525d5375d6d6c7e8a8afc1e65 -
Trigger Event:
push
-
Statement type: