A PyTorch backend for LNS experimentation
Project description
xlnstorch
XLNSTorch: a PyTorch addon python package for simulating Logarithmic Number System (LNS) arithmetic. You can find the docs at https://xlnsresearch.github.io/xlns/.
Getting Started
To install xlnstorch, you can run pip3 install xlnstorch. If you have a C++ compiler, this
will allow you to use more efficient operations and layers. Otherwise, xlnstorch will fallback
to pure python, slower implementations.
To learn more about LNS, see the LNS_Intro.md and src/xlnsconf/README.md files. For examples,
look at the documentation and the examples directory.
Dependencies
xlnstorch has several dependencies that are automatically installed when you install it:
- torch
- xlns
- numpy
xlnstorch also has several optional dependencies for additional features:
- matplotlib: For many of the
vizsubmodule's graphs - graphviz: For visualizing the computational graph
- torchvision: For tensor transforms and datasets
To Do list
- Implement more transformer layers.
- Improve support for saving and loading LNSTensor weights, and copying weights between torch and xlnstorch.
- Rework float64 storage to bitcast rather than reinterpret types.
- Implement more layers in the C++ backend.
- Implement positive and negative infinity sentinel values.
- Improve type and shape checks/error messages.
- Support LNSTensors and operations performed on the GPU.
- Add more implementations from
xlnsconf.
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
File details
Details for the file xlnstorch-1.0.0.tar.gz.
File metadata
- Download URL: xlnstorch-1.0.0.tar.gz
- Upload date:
- Size: 129.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73012bdc192217675a5794c0b6c8a58af548e6ed1a1084745a8cba75edb34d08
|
|
| MD5 |
b2a6af9569cb51b1327ada1b21a99fc4
|
|
| BLAKE2b-256 |
0d0cd061695eb3eca88147d2f4800e34937d9b5bb2397981d3abb1542794cbb7
|