tensorstudio 1.6.0__tar.gz → 1.7.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/CHANGELOG.md +19 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/CMakeLists.txt +1 -1
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/PKG-INFO +36 -16
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/README.md +35 -15
- tensorstudio-1.7.0/benchmarks/results.md +347 -0
- tensorstudio-1.7.0/benchmarks/results_matmul.md +49 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/autograd/coverage.md +9 -1
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/core/api-reference.md +65 -0
- tensorstudio-1.7.0/docs/core/math-and-statistics.md +171 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/core/tensors.md +33 -1
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/getting-started/quickstart.md +29 -2
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/hardware/cpu-backend.md +1 -1
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/index.md +11 -8
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/interchange/onnx.md +1 -1
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/interchange/serialization.md +1 -1
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/nn/training.md +1 -1
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/performance/benchmarks.md +1 -1
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/performance/optimization.md +1 -1
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/release/publishing.md +4 -4
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/release/versioning.md +2 -2
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/roadmap/milestones.md +3 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/roadmap/roadmap.md +14 -9
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/include/tensorstudio/ops.hpp +13 -0
- tensorstudio-1.7.0/include/tensorstudio/random.hpp +36 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/include/tensorstudio/version.hpp +1 -1
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/mkdocs.yml +1 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/pyproject.toml +1 -1
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/_C.pyi +53 -1
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/__init__.py +37 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/_version.py +1 -1
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/math.py +87 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/nn/functional.py +4 -5
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/ops.py +60 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/tensor.py +120 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/bindings/bind_ops.cpp +51 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/bindings/bind_tensor.cpp +147 -10
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/core/ops.cpp +263 -1
- tensorstudio-1.7.0/src/core/random.cpp +107 -0
- tensorstudio-1.7.0/tests/test_core_math_expansion.py +156 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_import.py +1 -1
- tensorstudio-1.6.0/benchmarks/results.md +0 -347
- tensorstudio-1.6.0/benchmarks/results_matmul.md +0 -45
- tensorstudio-1.6.0/include/tensorstudio/random.hpp +0 -13
- tensorstudio-1.6.0/src/core/random.cpp +0 -54
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/.gitattributes +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/.github/workflows/ci.yml +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/.github/workflows/publish-testpypi.yml +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/.github/workflows/publish.yml +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/.github/workflows/wheels.yml +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/.gitignore +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/.pre-commit-config.yaml +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/CONTRIBUTING.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/LICENSE +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/SECURITY.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmark_all.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/__init__.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/bench_activations.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/bench_autograd.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/bench_conv2d.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/bench_elementwise.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/bench_matmul.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/bench_pooling.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/bench_reductions.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/bench_tensor_ops.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/bench_training_loop.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/benchmark_report.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/results_conv2d.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/results_pooling.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/results_reductions.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/results_tensor_ops.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/thresholds.json +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/autograd/gradient-notes.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/autograd/overview.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/core/broadcasting.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/core/native-cpp-core.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/data/dataloader-patterns.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/data/datasets-and-dataloaders.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/data/tensor-datasets.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/development/contributing.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/development/cpp-first.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/getting-started/installation.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/getting-started/source-build.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/hardware/linux.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/hardware/macos.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/hardware/windows.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/interchange/model-formats.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/interchange/numpy-interop.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/interchange/trusted-serialization.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/nn/modules.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/nn/optimizers.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/nn/overview.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/performance/profiling.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/project/checkpoints.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/project/project-layout.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/project/workflows.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/release/checklist.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/roadmap/priorities.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/vision/dataset-creation.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/vision/overview.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/examples/basic_tensor_ops.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/examples/export_onnx.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/examples/image_folder_classification.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/examples/linear_regression.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/examples/project_training.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/examples/save_load_model.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/examples/tiny_mlp.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/examples/vision_classifier.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/include/tensorstudio/autograd.hpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/include/tensorstudio/device.hpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/include/tensorstudio/dtype.hpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/include/tensorstudio/errors.hpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/include/tensorstudio/module.hpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/include/tensorstudio/optim.hpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/include/tensorstudio/perf.hpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/include/tensorstudio/serialization.hpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/include/tensorstudio/shape.hpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/include/tensorstudio/storage.hpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/include/tensorstudio/tensor.hpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/autograd.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/data/__init__.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/data/dataloader.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/data/dataset.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/dtypes.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/errors.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/grad_mode.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/interchange/__init__.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/interchange/onnx.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/nn/__init__.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/nn/losses.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/nn/modules.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/optim/__init__.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/optim/adam.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/optim/adamw.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/optim/lr_scheduler.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/optim/sgd.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/optim/utils.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/performance.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/project/__init__.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/project/checkpoint.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/project/config.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/project/trainer.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/py.typed +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/serialization.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/typing.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/vision/__init__.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/vision/datasets.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/vision/io.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/vision/metrics.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/vision/models.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/vision/transforms.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/vision/visualization.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/bindings/bind_autograd.cpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/bindings/bind_nn.cpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/bindings/bind_optim.cpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/bindings/bindings.cpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/bindings/bindings.hpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/core/autograd.cpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/core/device.cpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/core/dtype.cpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/core/errors.cpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/core/module.cpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/core/optim.cpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/core/perf.cpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/core/serialization.cpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/core/shape.cpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/core/storage.cpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/core/tensor.cpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/test_all.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_autograd.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_benchmark_report.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_broadcasting.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_data.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_errors.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_indexing.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_interchange.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_nn.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_numpy_interop.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_ops.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_optim.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_performance.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_project.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_serialization.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_tensor.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_views.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_vision.py +0 -0
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 1.7.0 - 2026-07-07
|
|
6
|
+
|
|
7
|
+
- Completed the ordered Core Math Expansion roadmap section as one release
|
|
8
|
+
batch.
|
|
9
|
+
- Added native C++ `logsumexp`, `softmax`, and `log_softmax` operations with
|
|
10
|
+
max-shifted stable numerics and autograd support.
|
|
11
|
+
- Added native C++ batched matrix multiplication through `bmm` and 3D `@`
|
|
12
|
+
dispatch, including reverse-mode gradients for both operands.
|
|
13
|
+
- Added native C++ `var`, `variance`, `std`, `all`, and `any` operations, plus
|
|
14
|
+
Tensor methods and top-level Python exports where appropriate.
|
|
15
|
+
- Added Tensor-level `norm()` and expanded `tensorstudio.math` with
|
|
16
|
+
`logsumexp`, `softmax`, `log_softmax`, boolean reductions, and a documented
|
|
17
|
+
practical `einsum` subset.
|
|
18
|
+
- Added seeded native random distributions: `uniform`, `normal`, `randint`,
|
|
19
|
+
and `bernoulli`, with Python `*_like` helpers where useful.
|
|
20
|
+
- Switched neural-network functional softmax/log-softmax and cross entropy to
|
|
21
|
+
the native stable kernels.
|
|
22
|
+
- Added NumPy parity and autograd tests for the expanded math surface.
|
|
23
|
+
|
|
5
24
|
## 1.6.0 - 2026-07-07
|
|
6
25
|
|
|
7
26
|
- Completed the ordered CPU Performance Core roadmap section as one release
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: tensorstudio
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.7.0
|
|
4
4
|
Summary: TensorStudio is a compact C++ tensor and autograd engine with a Python API for learning, experimentation, and lightweight ML workloads.
|
|
5
5
|
Keywords: tensor,autograd,machine-learning,cpp,pybind11
|
|
6
6
|
Author: TensorStudio contributors
|
|
@@ -71,9 +71,11 @@ Description-Content-Type: text/markdown
|
|
|
71
71
|
TensorStudio is a compact C++ tensor and autograd engine with a Python API for
|
|
72
72
|
learning, experimentation, and lightweight ML workloads.
|
|
73
73
|
|
|
74
|
-
TensorStudio `1.
|
|
74
|
+
TensorStudio `1.7.0` is a CPU-only stable API foundation with native C++
|
|
75
75
|
threading, storage reuse, SIMD-friendly typed kernels, and optional
|
|
76
|
-
CBLAS/Accelerate matrix multiplication when available. It
|
|
76
|
+
CBLAS/Accelerate matrix multiplication when available. It adds native stable
|
|
77
|
+
softmax/logsumexp, batched matrix multiplication, statistical reductions,
|
|
78
|
+
boolean reductions, and seeded random distributions. It is eager-only,
|
|
77
79
|
intentionally compact, and not a replacement for mature ML frameworks.
|
|
78
80
|
|
|
79
81
|
## Install
|
|
@@ -165,12 +167,15 @@ a = ts.zeros((2, 3))
|
|
|
165
167
|
b = ts.rand((2, 3))
|
|
166
168
|
c = ts.eye(3)
|
|
167
169
|
d = ts.linspace(0.0, 1.0, 5)
|
|
170
|
+
labels = ts.randint((4,), low=0, high=3, seed=3)
|
|
171
|
+
mask = ts.bernoulli((2, 3), probability=0.25, seed=5)
|
|
168
172
|
|
|
169
173
|
print(a.shape, a.strides, a.device, a.is_contiguous)
|
|
170
174
|
print((b.clamp(0.2, 0.8) + 1).mean().item())
|
|
171
175
|
print(b.sum(axis=1).tolist())
|
|
172
176
|
print(ts.concat([b, b], axis=0).shape, b.astype("float64").dtype)
|
|
173
177
|
print(c.tolist(), d.tolist())
|
|
178
|
+
print(labels.tolist(), mask.any(axis=1).tolist())
|
|
174
179
|
print(ts.zeros_like(b).shape, ts.randn_like(b, seed=11).dtype)
|
|
175
180
|
```
|
|
176
181
|
|
|
@@ -199,14 +204,29 @@ print(loss.item())
|
|
|
199
204
|
print(x.grad.tolist())
|
|
200
205
|
```
|
|
201
206
|
|
|
202
|
-
|
|
207
|
+
Stable reductions and normalized probabilities are available as Tensor methods,
|
|
208
|
+
functional ops, and `tensorstudio.math` helpers:
|
|
203
209
|
|
|
204
210
|
```python
|
|
205
|
-
values = ts.tensor([[
|
|
211
|
+
values = ts.tensor([[1000.0, 1001.0, 999.0], [1.0, 2.0, 3.0]])
|
|
206
212
|
|
|
207
213
|
print(ts.math.variance(values).item())
|
|
208
214
|
print(ts.math.std(values, axis=0).tolist())
|
|
209
215
|
print(ts.math.norm(values, ord=2).item())
|
|
216
|
+
print(values.softmax(axis=1).tolist())
|
|
217
|
+
print(ts.logsumexp(values, axis=1).tolist())
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Batched matrix multiplication and a small documented `einsum` subset cover
|
|
221
|
+
common model and scientific-programming patterns:
|
|
222
|
+
|
|
223
|
+
```python
|
|
224
|
+
left = ts.randn((2, 3, 4), seed=1)
|
|
225
|
+
right = ts.randn((2, 4, 5), seed=2)
|
|
226
|
+
|
|
227
|
+
print((left @ right).shape)
|
|
228
|
+
print(ts.bmm(left, right).shape)
|
|
229
|
+
print(ts.einsum("bij,bjk->bik", left, right).shape)
|
|
210
230
|
```
|
|
211
231
|
|
|
212
232
|
## Autograd
|
|
@@ -361,11 +381,11 @@ Run the loose local regression thresholds with:
|
|
|
361
381
|
python benchmark_all.py --check-thresholds
|
|
362
382
|
```
|
|
363
383
|
|
|
364
|
-
On one Windows CPython 3.10 development run reporting `1.
|
|
384
|
+
On one Windows CPython 3.10 development run reporting `1.7.0`, with
|
|
365
385
|
TensorStudio threads enabled, storage pooling enabled, SSE2 autovectorization
|
|
366
386
|
reported, and no BLAS provider found, TensorStudio beat NumPy on 7 local
|
|
367
387
|
benchmark cases and lost on 96 NumPy-comparable cases. JAX CPU dispatch was
|
|
368
|
-
available on that machine; TensorStudio won
|
|
388
|
+
available on that machine; TensorStudio won 45 local cases and lost 53. The
|
|
369
389
|
strongest local wins were the simple NumPy convolution/pooling reference loops
|
|
370
390
|
and some small JAX-dispatch-heavy eager cases. NumPy and JAX were faster for
|
|
371
391
|
many elementwise, reduction, matrix multiplication, larger activation, and
|
|
@@ -377,15 +397,15 @@ Snapshot from that local run:
|
|
|
377
397
|
|
|
378
398
|
| operation | shape | TensorStudio | NumPy | JAX CPU dispatch | TS vs NumPy | TS vs JAX |
|
|
379
399
|
|---|---:|---:|---:|---:|---:|---:|
|
|
380
|
-
| `sigmoid` | `(32,)` | 0.
|
|
381
|
-
| `mean` | `(32,)` | 0.
|
|
382
|
-
| `sum_axis1` | `(16, 16)` | 0.
|
|
383
|
-
| `chain_relu` | `(128,)` | 0.
|
|
384
|
-
| `matmul` | `(256, 256)` | 2.
|
|
385
|
-
| `conv2d_3x3_padding1` | `(1, 1, 8, 8)` | 0.
|
|
386
|
-
| `max_pool2d_2x2` | `(1, 1, 16, 16)` | 0.
|
|
387
|
-
| `avg_pool2d_2x2` | `(1, 1, 16, 16)` | 0.
|
|
388
|
-
| `elementwise_backward` | `(1024,)` | 2.
|
|
400
|
+
| `sigmoid` | `(32,)` | 0.0152 ms | 0.0044 ms | 0.0727 ms | 0.2909x | 4.7701x |
|
|
401
|
+
| `mean` | `(32,)` | 0.0177 ms | 0.0083 ms | 0.0113 ms | 0.4715x | 0.6400x |
|
|
402
|
+
| `sum_axis1` | `(16, 16)` | 0.0163 ms | 0.0031 ms | 0.0123 ms | 0.1901x | 0.7536x |
|
|
403
|
+
| `chain_relu` | `(128,)` | 0.0867 ms | 0.0062 ms | 0.0923 ms | 0.0721x | 1.0641x |
|
|
404
|
+
| `matmul` | `(256, 256)` | 2.2252 ms | 0.4754 ms | 0.2750 ms | 0.2136x | 0.1236x |
|
|
405
|
+
| `conv2d_3x3_padding1` | `(1, 1, 8, 8)` | 0.1915 ms | 1.2845 ms | 0.1081 ms | 6.7064x | 0.5646x |
|
|
406
|
+
| `max_pool2d_2x2` | `(1, 1, 16, 16)` | 0.0277 ms | 0.1577 ms | n/a | 5.7024x | n/a |
|
|
407
|
+
| `avg_pool2d_2x2` | `(1, 1, 16, 16)` | 0.0278 ms | 0.5538 ms | n/a | 19.8919x | n/a |
|
|
408
|
+
| `elementwise_backward` | `(1024,)` | 2.7344 ms | n/a | n/a | n/a | n/a |
|
|
389
409
|
|
|
390
410
|
Speedup is `competitor median / TensorStudio median`, so values above `1.0x`
|
|
391
411
|
favor TensorStudio.
|
|
@@ -7,9 +7,11 @@
|
|
|
7
7
|
TensorStudio is a compact C++ tensor and autograd engine with a Python API for
|
|
8
8
|
learning, experimentation, and lightweight ML workloads.
|
|
9
9
|
|
|
10
|
-
TensorStudio `1.
|
|
10
|
+
TensorStudio `1.7.0` is a CPU-only stable API foundation with native C++
|
|
11
11
|
threading, storage reuse, SIMD-friendly typed kernels, and optional
|
|
12
|
-
CBLAS/Accelerate matrix multiplication when available. It
|
|
12
|
+
CBLAS/Accelerate matrix multiplication when available. It adds native stable
|
|
13
|
+
softmax/logsumexp, batched matrix multiplication, statistical reductions,
|
|
14
|
+
boolean reductions, and seeded random distributions. It is eager-only,
|
|
13
15
|
intentionally compact, and not a replacement for mature ML frameworks.
|
|
14
16
|
|
|
15
17
|
## Install
|
|
@@ -101,12 +103,15 @@ a = ts.zeros((2, 3))
|
|
|
101
103
|
b = ts.rand((2, 3))
|
|
102
104
|
c = ts.eye(3)
|
|
103
105
|
d = ts.linspace(0.0, 1.0, 5)
|
|
106
|
+
labels = ts.randint((4,), low=0, high=3, seed=3)
|
|
107
|
+
mask = ts.bernoulli((2, 3), probability=0.25, seed=5)
|
|
104
108
|
|
|
105
109
|
print(a.shape, a.strides, a.device, a.is_contiguous)
|
|
106
110
|
print((b.clamp(0.2, 0.8) + 1).mean().item())
|
|
107
111
|
print(b.sum(axis=1).tolist())
|
|
108
112
|
print(ts.concat([b, b], axis=0).shape, b.astype("float64").dtype)
|
|
109
113
|
print(c.tolist(), d.tolist())
|
|
114
|
+
print(labels.tolist(), mask.any(axis=1).tolist())
|
|
110
115
|
print(ts.zeros_like(b).shape, ts.randn_like(b, seed=11).dtype)
|
|
111
116
|
```
|
|
112
117
|
|
|
@@ -135,14 +140,29 @@ print(loss.item())
|
|
|
135
140
|
print(x.grad.tolist())
|
|
136
141
|
```
|
|
137
142
|
|
|
138
|
-
|
|
143
|
+
Stable reductions and normalized probabilities are available as Tensor methods,
|
|
144
|
+
functional ops, and `tensorstudio.math` helpers:
|
|
139
145
|
|
|
140
146
|
```python
|
|
141
|
-
values = ts.tensor([[
|
|
147
|
+
values = ts.tensor([[1000.0, 1001.0, 999.0], [1.0, 2.0, 3.0]])
|
|
142
148
|
|
|
143
149
|
print(ts.math.variance(values).item())
|
|
144
150
|
print(ts.math.std(values, axis=0).tolist())
|
|
145
151
|
print(ts.math.norm(values, ord=2).item())
|
|
152
|
+
print(values.softmax(axis=1).tolist())
|
|
153
|
+
print(ts.logsumexp(values, axis=1).tolist())
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Batched matrix multiplication and a small documented `einsum` subset cover
|
|
157
|
+
common model and scientific-programming patterns:
|
|
158
|
+
|
|
159
|
+
```python
|
|
160
|
+
left = ts.randn((2, 3, 4), seed=1)
|
|
161
|
+
right = ts.randn((2, 4, 5), seed=2)
|
|
162
|
+
|
|
163
|
+
print((left @ right).shape)
|
|
164
|
+
print(ts.bmm(left, right).shape)
|
|
165
|
+
print(ts.einsum("bij,bjk->bik", left, right).shape)
|
|
146
166
|
```
|
|
147
167
|
|
|
148
168
|
## Autograd
|
|
@@ -297,11 +317,11 @@ Run the loose local regression thresholds with:
|
|
|
297
317
|
python benchmark_all.py --check-thresholds
|
|
298
318
|
```
|
|
299
319
|
|
|
300
|
-
On one Windows CPython 3.10 development run reporting `1.
|
|
320
|
+
On one Windows CPython 3.10 development run reporting `1.7.0`, with
|
|
301
321
|
TensorStudio threads enabled, storage pooling enabled, SSE2 autovectorization
|
|
302
322
|
reported, and no BLAS provider found, TensorStudio beat NumPy on 7 local
|
|
303
323
|
benchmark cases and lost on 96 NumPy-comparable cases. JAX CPU dispatch was
|
|
304
|
-
available on that machine; TensorStudio won
|
|
324
|
+
available on that machine; TensorStudio won 45 local cases and lost 53. The
|
|
305
325
|
strongest local wins were the simple NumPy convolution/pooling reference loops
|
|
306
326
|
and some small JAX-dispatch-heavy eager cases. NumPy and JAX were faster for
|
|
307
327
|
many elementwise, reduction, matrix multiplication, larger activation, and
|
|
@@ -313,15 +333,15 @@ Snapshot from that local run:
|
|
|
313
333
|
|
|
314
334
|
| operation | shape | TensorStudio | NumPy | JAX CPU dispatch | TS vs NumPy | TS vs JAX |
|
|
315
335
|
|---|---:|---:|---:|---:|---:|---:|
|
|
316
|
-
| `sigmoid` | `(32,)` | 0.
|
|
317
|
-
| `mean` | `(32,)` | 0.
|
|
318
|
-
| `sum_axis1` | `(16, 16)` | 0.
|
|
319
|
-
| `chain_relu` | `(128,)` | 0.
|
|
320
|
-
| `matmul` | `(256, 256)` | 2.
|
|
321
|
-
| `conv2d_3x3_padding1` | `(1, 1, 8, 8)` | 0.
|
|
322
|
-
| `max_pool2d_2x2` | `(1, 1, 16, 16)` | 0.
|
|
323
|
-
| `avg_pool2d_2x2` | `(1, 1, 16, 16)` | 0.
|
|
324
|
-
| `elementwise_backward` | `(1024,)` | 2.
|
|
336
|
+
| `sigmoid` | `(32,)` | 0.0152 ms | 0.0044 ms | 0.0727 ms | 0.2909x | 4.7701x |
|
|
337
|
+
| `mean` | `(32,)` | 0.0177 ms | 0.0083 ms | 0.0113 ms | 0.4715x | 0.6400x |
|
|
338
|
+
| `sum_axis1` | `(16, 16)` | 0.0163 ms | 0.0031 ms | 0.0123 ms | 0.1901x | 0.7536x |
|
|
339
|
+
| `chain_relu` | `(128,)` | 0.0867 ms | 0.0062 ms | 0.0923 ms | 0.0721x | 1.0641x |
|
|
340
|
+
| `matmul` | `(256, 256)` | 2.2252 ms | 0.4754 ms | 0.2750 ms | 0.2136x | 0.1236x |
|
|
341
|
+
| `conv2d_3x3_padding1` | `(1, 1, 8, 8)` | 0.1915 ms | 1.2845 ms | 0.1081 ms | 6.7064x | 0.5646x |
|
|
342
|
+
| `max_pool2d_2x2` | `(1, 1, 16, 16)` | 0.0277 ms | 0.1577 ms | n/a | 5.7024x | n/a |
|
|
343
|
+
| `avg_pool2d_2x2` | `(1, 1, 16, 16)` | 0.0278 ms | 0.5538 ms | n/a | 19.8919x | n/a |
|
|
344
|
+
| `elementwise_backward` | `(1024,)` | 2.7344 ms | n/a | n/a | n/a | n/a |
|
|
325
345
|
|
|
326
346
|
Speedup is `competitor median / TensorStudio median`, so values above `1.0x`
|
|
327
347
|
favor TensorStudio.
|