tensorstudio 1.6.0__tar.gz → 1.8.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.8.0}/CHANGELOG.md +38 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/CMakeLists.txt +1 -1
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/PKG-INFO +47 -17
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/README.md +46 -16
- tensorstudio-1.8.0/benchmarks/results.md +347 -0
- tensorstudio-1.8.0/benchmarks/results_matmul.md +49 -0
- tensorstudio-1.8.0/docs/autograd/coverage.md +176 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/autograd/gradient-notes.md +28 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/autograd/overview.md +45 -9
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/core/api-reference.md +72 -1
- tensorstudio-1.8.0/docs/core/math-and-statistics.md +171 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/core/tensors.md +55 -4
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/getting-started/quickstart.md +29 -2
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/hardware/cpu-backend.md +1 -1
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/index.md +14 -8
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/interchange/onnx.md +1 -1
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/interchange/serialization.md +1 -1
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/nn/training.md +1 -1
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/performance/benchmarks.md +1 -1
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/performance/optimization.md +1 -1
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/release/publishing.md +4 -4
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/release/versioning.md +2 -2
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/roadmap/milestones.md +7 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/roadmap/roadmap.md +30 -17
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/include/tensorstudio/autograd.hpp +4 -1
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/include/tensorstudio/ops.hpp +13 -0
- tensorstudio-1.8.0/include/tensorstudio/random.hpp +36 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/include/tensorstudio/tensor.hpp +8 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/include/tensorstudio/version.hpp +1 -1
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/mkdocs.yml +1 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/pyproject.toml +1 -1
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/_C.pyi +65 -3
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/__init__.py +37 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/_version.py +1 -1
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/autograd.py +2 -2
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/math.py +87 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/nn/functional.py +4 -5
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/ops.py +60 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/tensor.py +120 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/src/bindings/bind_autograd.cpp +7 -4
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/src/bindings/bind_ops.cpp +51 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/src/bindings/bind_tensor.cpp +172 -14
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/src/core/autograd.cpp +38 -4
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/src/core/ops.cpp +263 -1
- tensorstudio-1.8.0/src/core/random.cpp +107 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/src/core/tensor.cpp +60 -0
- tensorstudio-1.8.0/tests/test_autograd_hardening.py +139 -0
- tensorstudio-1.8.0/tests/test_core_math_expansion.py +156 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.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/docs/autograd/coverage.md +0 -123
- 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.8.0}/.gitattributes +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/.github/workflows/ci.yml +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/.github/workflows/publish-testpypi.yml +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/.github/workflows/publish.yml +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/.github/workflows/wheels.yml +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/.gitignore +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/.pre-commit-config.yaml +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/CONTRIBUTING.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/LICENSE +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/SECURITY.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/benchmark_all.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/benchmarks/__init__.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/benchmarks/bench_activations.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/benchmarks/bench_autograd.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/benchmarks/bench_conv2d.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/benchmarks/bench_elementwise.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/benchmarks/bench_matmul.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/benchmarks/bench_pooling.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/benchmarks/bench_reductions.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/benchmarks/bench_tensor_ops.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/benchmarks/bench_training_loop.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/benchmarks/benchmark_report.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/benchmarks/results_conv2d.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/benchmarks/results_pooling.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/benchmarks/results_reductions.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/benchmarks/results_tensor_ops.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/benchmarks/thresholds.json +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/core/broadcasting.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/core/native-cpp-core.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/data/dataloader-patterns.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/data/datasets-and-dataloaders.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/data/tensor-datasets.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/development/contributing.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/development/cpp-first.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/getting-started/installation.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/getting-started/source-build.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/hardware/linux.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/hardware/macos.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/hardware/windows.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/interchange/model-formats.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/interchange/numpy-interop.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/interchange/trusted-serialization.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/nn/modules.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/nn/optimizers.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/nn/overview.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/performance/profiling.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/project/checkpoints.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/project/project-layout.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/project/workflows.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/release/checklist.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/roadmap/priorities.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/vision/dataset-creation.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/docs/vision/overview.md +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/examples/basic_tensor_ops.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/examples/export_onnx.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/examples/image_folder_classification.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/examples/linear_regression.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/examples/project_training.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/examples/save_load_model.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/examples/tiny_mlp.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/examples/vision_classifier.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/include/tensorstudio/device.hpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/include/tensorstudio/dtype.hpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/include/tensorstudio/errors.hpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/include/tensorstudio/module.hpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/include/tensorstudio/optim.hpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/include/tensorstudio/perf.hpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/include/tensorstudio/serialization.hpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/include/tensorstudio/shape.hpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/include/tensorstudio/storage.hpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/data/__init__.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/data/dataloader.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/data/dataset.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/dtypes.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/errors.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/grad_mode.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/interchange/__init__.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/interchange/onnx.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/nn/__init__.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/nn/losses.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/nn/modules.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/optim/__init__.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/optim/adam.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/optim/adamw.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/optim/lr_scheduler.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/optim/sgd.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/optim/utils.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/performance.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/project/__init__.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/project/checkpoint.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/project/config.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/project/trainer.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/py.typed +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/serialization.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/typing.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/vision/__init__.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/vision/datasets.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/vision/io.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/vision/metrics.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/vision/models.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/vision/transforms.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/python/tensorstudio/vision/visualization.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/src/bindings/bind_nn.cpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/src/bindings/bind_optim.cpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/src/bindings/bindings.cpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/src/bindings/bindings.hpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/src/core/device.cpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/src/core/dtype.cpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/src/core/errors.cpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/src/core/module.cpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/src/core/optim.cpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/src/core/perf.cpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/src/core/serialization.cpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/src/core/shape.cpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/src/core/storage.cpp +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/test_all.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/tests/test_autograd.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/tests/test_benchmark_report.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/tests/test_broadcasting.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/tests/test_data.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/tests/test_errors.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/tests/test_indexing.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/tests/test_interchange.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/tests/test_nn.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/tests/test_numpy_interop.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/tests/test_ops.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/tests/test_optim.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/tests/test_performance.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/tests/test_project.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/tests/test_serialization.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/tests/test_tensor.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/tests/test_views.py +0 -0
- {tensorstudio-1.6.0 → tensorstudio-1.8.0}/tests/test_vision.py +0 -0
|
@@ -2,6 +2,44 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 1.8.0 - 2026-07-07
|
|
6
|
+
|
|
7
|
+
- Completed the ordered Autograd Coverage And Hardening roadmap section as one
|
|
8
|
+
release batch.
|
|
9
|
+
- Added `retain_graph` support to `Tensor.backward()` and
|
|
10
|
+
`tensorstudio.autograd.backward()`.
|
|
11
|
+
- Added graph lifecycle hardening: normal backward frees non-leaf graph history,
|
|
12
|
+
repeated backward through a freed graph raises a clear error, and retained
|
|
13
|
+
graphs clear intermediate gradients between backward passes.
|
|
14
|
+
- Added Tensor `is_leaf`, `clear_history()`, and `detach_()` controls for
|
|
15
|
+
explicit graph lifecycle management.
|
|
16
|
+
- Added guarded public in-place methods `zero_()`, `fill_()`, and `add_()`.
|
|
17
|
+
They reject gradient-tracked mutation while grad mode is enabled and work
|
|
18
|
+
inside `tensorstudio.no_grad()`.
|
|
19
|
+
- Expanded non-scalar backward and finite-difference gradient tests for stable
|
|
20
|
+
probability ops, statistics, norms, and batched matrix multiplication.
|
|
21
|
+
- Expanded autograd documentation with a coverage matrix, lifecycle notes, and
|
|
22
|
+
explicit higher-order-gradient limitations.
|
|
23
|
+
|
|
24
|
+
## 1.7.0 - 2026-07-07
|
|
25
|
+
|
|
26
|
+
- Completed the ordered Core Math Expansion roadmap section as one release
|
|
27
|
+
batch.
|
|
28
|
+
- Added native C++ `logsumexp`, `softmax`, and `log_softmax` operations with
|
|
29
|
+
max-shifted stable numerics and autograd support.
|
|
30
|
+
- Added native C++ batched matrix multiplication through `bmm` and 3D `@`
|
|
31
|
+
dispatch, including reverse-mode gradients for both operands.
|
|
32
|
+
- Added native C++ `var`, `variance`, `std`, `all`, and `any` operations, plus
|
|
33
|
+
Tensor methods and top-level Python exports where appropriate.
|
|
34
|
+
- Added Tensor-level `norm()` and expanded `tensorstudio.math` with
|
|
35
|
+
`logsumexp`, `softmax`, `log_softmax`, boolean reductions, and a documented
|
|
36
|
+
practical `einsum` subset.
|
|
37
|
+
- Added seeded native random distributions: `uniform`, `normal`, `randint`,
|
|
38
|
+
and `bernoulli`, with Python `*_like` helpers where useful.
|
|
39
|
+
- Switched neural-network functional softmax/log-softmax and cross entropy to
|
|
40
|
+
the native stable kernels.
|
|
41
|
+
- Added NumPy parity and autograd tests for the expanded math surface.
|
|
42
|
+
|
|
5
43
|
## 1.6.0 - 2026-07-07
|
|
6
44
|
|
|
7
45
|
- 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.8.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,10 +71,13 @@ 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.8.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
|
|
77
|
-
|
|
76
|
+
CBLAS/Accelerate matrix multiplication when available. It adds native stable
|
|
77
|
+
softmax/logsumexp, batched matrix multiplication, statistical reductions,
|
|
78
|
+
boolean reductions, seeded random distributions, and a hardened eager autograd
|
|
79
|
+
lifecycle. It is eager-only, intentionally compact, and not a replacement for
|
|
80
|
+
mature ML frameworks.
|
|
78
81
|
|
|
79
82
|
## Install
|
|
80
83
|
|
|
@@ -165,12 +168,15 @@ a = ts.zeros((2, 3))
|
|
|
165
168
|
b = ts.rand((2, 3))
|
|
166
169
|
c = ts.eye(3)
|
|
167
170
|
d = ts.linspace(0.0, 1.0, 5)
|
|
171
|
+
labels = ts.randint((4,), low=0, high=3, seed=3)
|
|
172
|
+
mask = ts.bernoulli((2, 3), probability=0.25, seed=5)
|
|
168
173
|
|
|
169
174
|
print(a.shape, a.strides, a.device, a.is_contiguous)
|
|
170
175
|
print((b.clamp(0.2, 0.8) + 1).mean().item())
|
|
171
176
|
print(b.sum(axis=1).tolist())
|
|
172
177
|
print(ts.concat([b, b], axis=0).shape, b.astype("float64").dtype)
|
|
173
178
|
print(c.tolist(), d.tolist())
|
|
179
|
+
print(labels.tolist(), mask.any(axis=1).tolist())
|
|
174
180
|
print(ts.zeros_like(b).shape, ts.randn_like(b, seed=11).dtype)
|
|
175
181
|
```
|
|
176
182
|
|
|
@@ -199,14 +205,29 @@ print(loss.item())
|
|
|
199
205
|
print(x.grad.tolist())
|
|
200
206
|
```
|
|
201
207
|
|
|
202
|
-
|
|
208
|
+
Stable reductions and normalized probabilities are available as Tensor methods,
|
|
209
|
+
functional ops, and `tensorstudio.math` helpers:
|
|
203
210
|
|
|
204
211
|
```python
|
|
205
|
-
values = ts.tensor([[
|
|
212
|
+
values = ts.tensor([[1000.0, 1001.0, 999.0], [1.0, 2.0, 3.0]])
|
|
206
213
|
|
|
207
214
|
print(ts.math.variance(values).item())
|
|
208
215
|
print(ts.math.std(values, axis=0).tolist())
|
|
209
216
|
print(ts.math.norm(values, ord=2).item())
|
|
217
|
+
print(values.softmax(axis=1).tolist())
|
|
218
|
+
print(ts.logsumexp(values, axis=1).tolist())
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Batched matrix multiplication and a small documented `einsum` subset cover
|
|
222
|
+
common model and scientific-programming patterns:
|
|
223
|
+
|
|
224
|
+
```python
|
|
225
|
+
left = ts.randn((2, 3, 4), seed=1)
|
|
226
|
+
right = ts.randn((2, 4, 5), seed=2)
|
|
227
|
+
|
|
228
|
+
print((left @ right).shape)
|
|
229
|
+
print(ts.bmm(left, right).shape)
|
|
230
|
+
print(ts.einsum("bij,bjk->bik", left, right).shape)
|
|
210
231
|
```
|
|
211
232
|
|
|
212
233
|
## Autograd
|
|
@@ -221,11 +242,20 @@ loss.backward()
|
|
|
221
242
|
print(x.grad.tolist())
|
|
222
243
|
```
|
|
223
244
|
|
|
245
|
+
Reuse a graph explicitly when needed:
|
|
246
|
+
|
|
247
|
+
```python
|
|
248
|
+
loss = (x * x).sum()
|
|
249
|
+
loss.backward(retain_graph=True)
|
|
250
|
+
loss.backward()
|
|
251
|
+
```
|
|
252
|
+
|
|
224
253
|
Use `no_grad()` when you want eager computation without recording a graph:
|
|
225
254
|
|
|
226
255
|
```python
|
|
227
256
|
with ts.no_grad():
|
|
228
257
|
y = x * 2
|
|
258
|
+
x.zero_()
|
|
229
259
|
```
|
|
230
260
|
|
|
231
261
|
## Neural Networks
|
|
@@ -361,11 +391,11 @@ Run the loose local regression thresholds with:
|
|
|
361
391
|
python benchmark_all.py --check-thresholds
|
|
362
392
|
```
|
|
363
393
|
|
|
364
|
-
On one Windows CPython 3.10 development run reporting `1.
|
|
394
|
+
On one Windows CPython 3.10 development run reporting `1.8.0`, with
|
|
365
395
|
TensorStudio threads enabled, storage pooling enabled, SSE2 autovectorization
|
|
366
396
|
reported, and no BLAS provider found, TensorStudio beat NumPy on 7 local
|
|
367
397
|
benchmark cases and lost on 96 NumPy-comparable cases. JAX CPU dispatch was
|
|
368
|
-
available on that machine; TensorStudio won
|
|
398
|
+
available on that machine; TensorStudio won 47 local cases and lost 51. The
|
|
369
399
|
strongest local wins were the simple NumPy convolution/pooling reference loops
|
|
370
400
|
and some small JAX-dispatch-heavy eager cases. NumPy and JAX were faster for
|
|
371
401
|
many elementwise, reduction, matrix multiplication, larger activation, and
|
|
@@ -377,15 +407,15 @@ Snapshot from that local run:
|
|
|
377
407
|
|
|
378
408
|
| operation | shape | TensorStudio | NumPy | JAX CPU dispatch | TS vs NumPy | TS vs JAX |
|
|
379
409
|
|---|---:|---:|---:|---:|---:|---:|
|
|
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.0286 ms | 0.
|
|
387
|
-
| `avg_pool2d_2x2` | `(1, 1, 16, 16)` | 0.
|
|
388
|
-
| `elementwise_backward` | `(1024,)` | 2.
|
|
410
|
+
| `sigmoid` | `(32,)` | 0.0155 ms | 0.0044 ms | 0.0761 ms | 0.2860x | 4.9227x |
|
|
411
|
+
| `mean` | `(32,)` | 0.0158 ms | 0.0082 ms | 0.0126 ms | 0.5215x | 0.7968x |
|
|
412
|
+
| `sum_axis1` | `(16, 16)` | 0.0161 ms | 0.0028 ms | 0.0136 ms | 0.1714x | 0.8417x |
|
|
413
|
+
| `chain_relu` | `(128,)` | 0.0861 ms | 0.0056 ms | 0.0944 ms | 0.0646x | 1.0971x |
|
|
414
|
+
| `matmul` | `(256, 256)` | 2.1900 ms | 0.4380 ms | 0.2610 ms | 0.2000x | 0.1192x |
|
|
415
|
+
| `conv2d_3x3_padding1` | `(1, 1, 8, 8)` | 0.1995 ms | 1.2390 ms | 0.1086 ms | 6.2118x | 0.5443x |
|
|
416
|
+
| `max_pool2d_2x2` | `(1, 1, 16, 16)` | 0.0286 ms | 0.1684 ms | n/a | 5.8921x | n/a |
|
|
417
|
+
| `avg_pool2d_2x2` | `(1, 1, 16, 16)` | 0.0286 ms | 0.5569 ms | n/a | 19.4803x | n/a |
|
|
418
|
+
| `elementwise_backward` | `(1024,)` | 2.7758 ms | n/a | n/a | n/a | n/a |
|
|
389
419
|
|
|
390
420
|
Speedup is `competitor median / TensorStudio median`, so values above `1.0x`
|
|
391
421
|
favor TensorStudio.
|
|
@@ -7,10 +7,13 @@
|
|
|
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.8.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
|
|
13
|
-
|
|
12
|
+
CBLAS/Accelerate matrix multiplication when available. It adds native stable
|
|
13
|
+
softmax/logsumexp, batched matrix multiplication, statistical reductions,
|
|
14
|
+
boolean reductions, seeded random distributions, and a hardened eager autograd
|
|
15
|
+
lifecycle. It is eager-only, intentionally compact, and not a replacement for
|
|
16
|
+
mature ML frameworks.
|
|
14
17
|
|
|
15
18
|
## Install
|
|
16
19
|
|
|
@@ -101,12 +104,15 @@ a = ts.zeros((2, 3))
|
|
|
101
104
|
b = ts.rand((2, 3))
|
|
102
105
|
c = ts.eye(3)
|
|
103
106
|
d = ts.linspace(0.0, 1.0, 5)
|
|
107
|
+
labels = ts.randint((4,), low=0, high=3, seed=3)
|
|
108
|
+
mask = ts.bernoulli((2, 3), probability=0.25, seed=5)
|
|
104
109
|
|
|
105
110
|
print(a.shape, a.strides, a.device, a.is_contiguous)
|
|
106
111
|
print((b.clamp(0.2, 0.8) + 1).mean().item())
|
|
107
112
|
print(b.sum(axis=1).tolist())
|
|
108
113
|
print(ts.concat([b, b], axis=0).shape, b.astype("float64").dtype)
|
|
109
114
|
print(c.tolist(), d.tolist())
|
|
115
|
+
print(labels.tolist(), mask.any(axis=1).tolist())
|
|
110
116
|
print(ts.zeros_like(b).shape, ts.randn_like(b, seed=11).dtype)
|
|
111
117
|
```
|
|
112
118
|
|
|
@@ -135,14 +141,29 @@ print(loss.item())
|
|
|
135
141
|
print(x.grad.tolist())
|
|
136
142
|
```
|
|
137
143
|
|
|
138
|
-
|
|
144
|
+
Stable reductions and normalized probabilities are available as Tensor methods,
|
|
145
|
+
functional ops, and `tensorstudio.math` helpers:
|
|
139
146
|
|
|
140
147
|
```python
|
|
141
|
-
values = ts.tensor([[
|
|
148
|
+
values = ts.tensor([[1000.0, 1001.0, 999.0], [1.0, 2.0, 3.0]])
|
|
142
149
|
|
|
143
150
|
print(ts.math.variance(values).item())
|
|
144
151
|
print(ts.math.std(values, axis=0).tolist())
|
|
145
152
|
print(ts.math.norm(values, ord=2).item())
|
|
153
|
+
print(values.softmax(axis=1).tolist())
|
|
154
|
+
print(ts.logsumexp(values, axis=1).tolist())
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Batched matrix multiplication and a small documented `einsum` subset cover
|
|
158
|
+
common model and scientific-programming patterns:
|
|
159
|
+
|
|
160
|
+
```python
|
|
161
|
+
left = ts.randn((2, 3, 4), seed=1)
|
|
162
|
+
right = ts.randn((2, 4, 5), seed=2)
|
|
163
|
+
|
|
164
|
+
print((left @ right).shape)
|
|
165
|
+
print(ts.bmm(left, right).shape)
|
|
166
|
+
print(ts.einsum("bij,bjk->bik", left, right).shape)
|
|
146
167
|
```
|
|
147
168
|
|
|
148
169
|
## Autograd
|
|
@@ -157,11 +178,20 @@ loss.backward()
|
|
|
157
178
|
print(x.grad.tolist())
|
|
158
179
|
```
|
|
159
180
|
|
|
181
|
+
Reuse a graph explicitly when needed:
|
|
182
|
+
|
|
183
|
+
```python
|
|
184
|
+
loss = (x * x).sum()
|
|
185
|
+
loss.backward(retain_graph=True)
|
|
186
|
+
loss.backward()
|
|
187
|
+
```
|
|
188
|
+
|
|
160
189
|
Use `no_grad()` when you want eager computation without recording a graph:
|
|
161
190
|
|
|
162
191
|
```python
|
|
163
192
|
with ts.no_grad():
|
|
164
193
|
y = x * 2
|
|
194
|
+
x.zero_()
|
|
165
195
|
```
|
|
166
196
|
|
|
167
197
|
## Neural Networks
|
|
@@ -297,11 +327,11 @@ Run the loose local regression thresholds with:
|
|
|
297
327
|
python benchmark_all.py --check-thresholds
|
|
298
328
|
```
|
|
299
329
|
|
|
300
|
-
On one Windows CPython 3.10 development run reporting `1.
|
|
330
|
+
On one Windows CPython 3.10 development run reporting `1.8.0`, with
|
|
301
331
|
TensorStudio threads enabled, storage pooling enabled, SSE2 autovectorization
|
|
302
332
|
reported, and no BLAS provider found, TensorStudio beat NumPy on 7 local
|
|
303
333
|
benchmark cases and lost on 96 NumPy-comparable cases. JAX CPU dispatch was
|
|
304
|
-
available on that machine; TensorStudio won
|
|
334
|
+
available on that machine; TensorStudio won 47 local cases and lost 51. The
|
|
305
335
|
strongest local wins were the simple NumPy convolution/pooling reference loops
|
|
306
336
|
and some small JAX-dispatch-heavy eager cases. NumPy and JAX were faster for
|
|
307
337
|
many elementwise, reduction, matrix multiplication, larger activation, and
|
|
@@ -313,15 +343,15 @@ Snapshot from that local run:
|
|
|
313
343
|
|
|
314
344
|
| operation | shape | TensorStudio | NumPy | JAX CPU dispatch | TS vs NumPy | TS vs JAX |
|
|
315
345
|
|---|---:|---:|---:|---:|---:|---:|
|
|
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.0286 ms | 0.
|
|
323
|
-
| `avg_pool2d_2x2` | `(1, 1, 16, 16)` | 0.
|
|
324
|
-
| `elementwise_backward` | `(1024,)` | 2.
|
|
346
|
+
| `sigmoid` | `(32,)` | 0.0155 ms | 0.0044 ms | 0.0761 ms | 0.2860x | 4.9227x |
|
|
347
|
+
| `mean` | `(32,)` | 0.0158 ms | 0.0082 ms | 0.0126 ms | 0.5215x | 0.7968x |
|
|
348
|
+
| `sum_axis1` | `(16, 16)` | 0.0161 ms | 0.0028 ms | 0.0136 ms | 0.1714x | 0.8417x |
|
|
349
|
+
| `chain_relu` | `(128,)` | 0.0861 ms | 0.0056 ms | 0.0944 ms | 0.0646x | 1.0971x |
|
|
350
|
+
| `matmul` | `(256, 256)` | 2.1900 ms | 0.4380 ms | 0.2610 ms | 0.2000x | 0.1192x |
|
|
351
|
+
| `conv2d_3x3_padding1` | `(1, 1, 8, 8)` | 0.1995 ms | 1.2390 ms | 0.1086 ms | 6.2118x | 0.5443x |
|
|
352
|
+
| `max_pool2d_2x2` | `(1, 1, 16, 16)` | 0.0286 ms | 0.1684 ms | n/a | 5.8921x | n/a |
|
|
353
|
+
| `avg_pool2d_2x2` | `(1, 1, 16, 16)` | 0.0286 ms | 0.5569 ms | n/a | 19.4803x | n/a |
|
|
354
|
+
| `elementwise_backward` | `(1024,)` | 2.7758 ms | n/a | n/a | n/a | n/a |
|
|
325
355
|
|
|
326
356
|
Speedup is `competitor median / TensorStudio median`, so values above `1.0x`
|
|
327
357
|
favor TensorStudio.
|