Work in progress. This project is under development; expect missing features and breaking changes.
NumPy-like N-dimensional tensors for Common Lisp, built on
trivial-simd and trivial-simd/blas.
(ql:quickload :cl-tensor)
(cl-tensor:make-tensor '(2 3))
;; => #<TENSOR :F32 (2 3)>Construct, index and copy strided tensors; reshape and slice views; broadcast arithmetic, comparisons and selection; multiply matrices and batches; reduce and normalize axes; convert dtypes explicitly.
- Design
- Dtypes and strides
- Dtype and storage extensions
- Device tensors, including native f64
- API
- Constructors and access
- Elementwise operations
- Expression fusion
- External executors
- Reductions
- Normalization
- Matrix multiplication
- Shape operations
- Conversion
- Testing
Work is tracked at https://github.com/communal-software/cl-tensor/issues.
cl-tensor
Copyright (C) 2026 George Watson
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.