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.
Files changed (185) hide show
  1. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/CHANGELOG.md +19 -0
  2. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/CMakeLists.txt +1 -1
  3. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/PKG-INFO +36 -16
  4. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/README.md +35 -15
  5. tensorstudio-1.7.0/benchmarks/results.md +347 -0
  6. tensorstudio-1.7.0/benchmarks/results_matmul.md +49 -0
  7. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/autograd/coverage.md +9 -1
  8. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/core/api-reference.md +65 -0
  9. tensorstudio-1.7.0/docs/core/math-and-statistics.md +171 -0
  10. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/core/tensors.md +33 -1
  11. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/getting-started/quickstart.md +29 -2
  12. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/hardware/cpu-backend.md +1 -1
  13. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/index.md +11 -8
  14. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/interchange/onnx.md +1 -1
  15. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/interchange/serialization.md +1 -1
  16. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/nn/training.md +1 -1
  17. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/performance/benchmarks.md +1 -1
  18. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/performance/optimization.md +1 -1
  19. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/release/publishing.md +4 -4
  20. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/release/versioning.md +2 -2
  21. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/roadmap/milestones.md +3 -0
  22. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/roadmap/roadmap.md +14 -9
  23. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/include/tensorstudio/ops.hpp +13 -0
  24. tensorstudio-1.7.0/include/tensorstudio/random.hpp +36 -0
  25. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/include/tensorstudio/version.hpp +1 -1
  26. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/mkdocs.yml +1 -0
  27. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/pyproject.toml +1 -1
  28. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/_C.pyi +53 -1
  29. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/__init__.py +37 -0
  30. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/_version.py +1 -1
  31. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/math.py +87 -0
  32. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/nn/functional.py +4 -5
  33. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/ops.py +60 -0
  34. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/tensor.py +120 -0
  35. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/bindings/bind_ops.cpp +51 -0
  36. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/bindings/bind_tensor.cpp +147 -10
  37. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/core/ops.cpp +263 -1
  38. tensorstudio-1.7.0/src/core/random.cpp +107 -0
  39. tensorstudio-1.7.0/tests/test_core_math_expansion.py +156 -0
  40. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_import.py +1 -1
  41. tensorstudio-1.6.0/benchmarks/results.md +0 -347
  42. tensorstudio-1.6.0/benchmarks/results_matmul.md +0 -45
  43. tensorstudio-1.6.0/include/tensorstudio/random.hpp +0 -13
  44. tensorstudio-1.6.0/src/core/random.cpp +0 -54
  45. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/.gitattributes +0 -0
  46. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/.github/workflows/ci.yml +0 -0
  47. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/.github/workflows/publish-testpypi.yml +0 -0
  48. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/.github/workflows/publish.yml +0 -0
  49. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/.github/workflows/wheels.yml +0 -0
  50. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/.gitignore +0 -0
  51. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/.pre-commit-config.yaml +0 -0
  52. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/CONTRIBUTING.md +0 -0
  53. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/LICENSE +0 -0
  54. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/SECURITY.md +0 -0
  55. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmark_all.py +0 -0
  56. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/__init__.py +0 -0
  57. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/bench_activations.py +0 -0
  58. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/bench_autograd.py +0 -0
  59. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/bench_conv2d.py +0 -0
  60. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/bench_elementwise.py +0 -0
  61. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/bench_matmul.py +0 -0
  62. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/bench_pooling.py +0 -0
  63. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/bench_reductions.py +0 -0
  64. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/bench_tensor_ops.py +0 -0
  65. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/bench_training_loop.py +0 -0
  66. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/benchmark_report.py +0 -0
  67. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/results_conv2d.md +0 -0
  68. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/results_pooling.md +0 -0
  69. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/results_reductions.md +0 -0
  70. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/results_tensor_ops.md +0 -0
  71. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/benchmarks/thresholds.json +0 -0
  72. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/autograd/gradient-notes.md +0 -0
  73. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/autograd/overview.md +0 -0
  74. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/core/broadcasting.md +0 -0
  75. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/core/native-cpp-core.md +0 -0
  76. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/data/dataloader-patterns.md +0 -0
  77. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/data/datasets-and-dataloaders.md +0 -0
  78. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/data/tensor-datasets.md +0 -0
  79. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/development/contributing.md +0 -0
  80. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/development/cpp-first.md +0 -0
  81. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/getting-started/installation.md +0 -0
  82. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/getting-started/source-build.md +0 -0
  83. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/hardware/linux.md +0 -0
  84. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/hardware/macos.md +0 -0
  85. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/hardware/windows.md +0 -0
  86. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/interchange/model-formats.md +0 -0
  87. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/interchange/numpy-interop.md +0 -0
  88. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/interchange/trusted-serialization.md +0 -0
  89. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/nn/modules.md +0 -0
  90. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/nn/optimizers.md +0 -0
  91. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/nn/overview.md +0 -0
  92. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/performance/profiling.md +0 -0
  93. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/project/checkpoints.md +0 -0
  94. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/project/project-layout.md +0 -0
  95. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/project/workflows.md +0 -0
  96. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/release/checklist.md +0 -0
  97. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/roadmap/priorities.md +0 -0
  98. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/vision/dataset-creation.md +0 -0
  99. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/docs/vision/overview.md +0 -0
  100. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/examples/basic_tensor_ops.py +0 -0
  101. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/examples/export_onnx.py +0 -0
  102. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/examples/image_folder_classification.py +0 -0
  103. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/examples/linear_regression.py +0 -0
  104. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/examples/project_training.py +0 -0
  105. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/examples/save_load_model.py +0 -0
  106. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/examples/tiny_mlp.py +0 -0
  107. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/examples/vision_classifier.py +0 -0
  108. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/include/tensorstudio/autograd.hpp +0 -0
  109. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/include/tensorstudio/device.hpp +0 -0
  110. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/include/tensorstudio/dtype.hpp +0 -0
  111. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/include/tensorstudio/errors.hpp +0 -0
  112. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/include/tensorstudio/module.hpp +0 -0
  113. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/include/tensorstudio/optim.hpp +0 -0
  114. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/include/tensorstudio/perf.hpp +0 -0
  115. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/include/tensorstudio/serialization.hpp +0 -0
  116. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/include/tensorstudio/shape.hpp +0 -0
  117. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/include/tensorstudio/storage.hpp +0 -0
  118. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/include/tensorstudio/tensor.hpp +0 -0
  119. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/autograd.py +0 -0
  120. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/data/__init__.py +0 -0
  121. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/data/dataloader.py +0 -0
  122. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/data/dataset.py +0 -0
  123. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/dtypes.py +0 -0
  124. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/errors.py +0 -0
  125. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/grad_mode.py +0 -0
  126. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/interchange/__init__.py +0 -0
  127. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/interchange/onnx.py +0 -0
  128. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/nn/__init__.py +0 -0
  129. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/nn/losses.py +0 -0
  130. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/nn/modules.py +0 -0
  131. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/optim/__init__.py +0 -0
  132. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/optim/adam.py +0 -0
  133. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/optim/adamw.py +0 -0
  134. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/optim/lr_scheduler.py +0 -0
  135. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/optim/sgd.py +0 -0
  136. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/optim/utils.py +0 -0
  137. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/performance.py +0 -0
  138. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/project/__init__.py +0 -0
  139. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/project/checkpoint.py +0 -0
  140. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/project/config.py +0 -0
  141. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/project/trainer.py +0 -0
  142. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/py.typed +0 -0
  143. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/serialization.py +0 -0
  144. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/typing.py +0 -0
  145. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/vision/__init__.py +0 -0
  146. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/vision/datasets.py +0 -0
  147. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/vision/io.py +0 -0
  148. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/vision/metrics.py +0 -0
  149. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/vision/models.py +0 -0
  150. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/vision/transforms.py +0 -0
  151. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/python/tensorstudio/vision/visualization.py +0 -0
  152. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/bindings/bind_autograd.cpp +0 -0
  153. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/bindings/bind_nn.cpp +0 -0
  154. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/bindings/bind_optim.cpp +0 -0
  155. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/bindings/bindings.cpp +0 -0
  156. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/bindings/bindings.hpp +0 -0
  157. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/core/autograd.cpp +0 -0
  158. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/core/device.cpp +0 -0
  159. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/core/dtype.cpp +0 -0
  160. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/core/errors.cpp +0 -0
  161. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/core/module.cpp +0 -0
  162. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/core/optim.cpp +0 -0
  163. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/core/perf.cpp +0 -0
  164. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/core/serialization.cpp +0 -0
  165. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/core/shape.cpp +0 -0
  166. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/core/storage.cpp +0 -0
  167. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/src/core/tensor.cpp +0 -0
  168. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/test_all.py +0 -0
  169. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_autograd.py +0 -0
  170. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_benchmark_report.py +0 -0
  171. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_broadcasting.py +0 -0
  172. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_data.py +0 -0
  173. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_errors.py +0 -0
  174. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_indexing.py +0 -0
  175. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_interchange.py +0 -0
  176. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_nn.py +0 -0
  177. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_numpy_interop.py +0 -0
  178. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_ops.py +0 -0
  179. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_optim.py +0 -0
  180. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_performance.py +0 -0
  181. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_project.py +0 -0
  182. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_serialization.py +0 -0
  183. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_tensor.py +0 -0
  184. {tensorstudio-1.6.0 → tensorstudio-1.7.0}/tests/test_views.py +0 -0
  185. {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
  cmake_minimum_required(VERSION 3.18)
2
2
 
3
- project(tensorstudio VERSION 1.6.0 LANGUAGES CXX)
3
+ project(tensorstudio VERSION 1.7.0 LANGUAGES CXX)
4
4
 
5
5
  find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)
6
6
  set(PYBIND11_FINDPYTHON ON)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: tensorstudio
3
- Version: 1.6.0
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.6.0` is a CPU-only stable API foundation with native C++
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 is eager-only,
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
- Higher-level helpers live in `tensorstudio.math`:
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([[1.0, 2.0], [3.0, 4.0]])
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.6.0`, with
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 39 local cases and lost 59. The
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.0173 ms | 0.0047 ms | 0.0719 ms | 0.2724x | 4.1608x |
381
- | `mean` | `(32,)` | 0.0157 ms | 0.0082 ms | 0.0119 ms | 0.5208x | 0.7587x |
382
- | `sum_axis1` | `(16, 16)` | 0.0159 ms | 0.0031 ms | 0.0131 ms | 0.1924x | 0.8231x |
383
- | `chain_relu` | `(128,)` | 0.0992 ms | 0.0063 ms | 0.1113 ms | 0.0636x | 1.1219x |
384
- | `matmul` | `(256, 256)` | 2.5261 ms | 0.3848 ms | 0.2288 ms | 0.1524x | 0.0906x |
385
- | `conv2d_3x3_padding1` | `(1, 1, 8, 8)` | 0.2120 ms | 1.2975 ms | 0.0959 ms | 6.1191x | 0.4524x |
386
- | `max_pool2d_2x2` | `(1, 1, 16, 16)` | 0.0286 ms | 0.1613 ms | n/a | 5.6321x | n/a |
387
- | `avg_pool2d_2x2` | `(1, 1, 16, 16)` | 0.0304 ms | 0.5601 ms | n/a | 18.4457x | n/a |
388
- | `elementwise_backward` | `(1024,)` | 2.7150 ms | n/a | n/a | n/a | n/a |
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.6.0` is a CPU-only stable API foundation with native C++
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 is eager-only,
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
- Higher-level helpers live in `tensorstudio.math`:
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([[1.0, 2.0], [3.0, 4.0]])
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.6.0`, with
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 39 local cases and lost 59. The
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.0173 ms | 0.0047 ms | 0.0719 ms | 0.2724x | 4.1608x |
317
- | `mean` | `(32,)` | 0.0157 ms | 0.0082 ms | 0.0119 ms | 0.5208x | 0.7587x |
318
- | `sum_axis1` | `(16, 16)` | 0.0159 ms | 0.0031 ms | 0.0131 ms | 0.1924x | 0.8231x |
319
- | `chain_relu` | `(128,)` | 0.0992 ms | 0.0063 ms | 0.1113 ms | 0.0636x | 1.1219x |
320
- | `matmul` | `(256, 256)` | 2.5261 ms | 0.3848 ms | 0.2288 ms | 0.1524x | 0.0906x |
321
- | `conv2d_3x3_padding1` | `(1, 1, 8, 8)` | 0.2120 ms | 1.2975 ms | 0.0959 ms | 6.1191x | 0.4524x |
322
- | `max_pool2d_2x2` | `(1, 1, 16, 16)` | 0.0286 ms | 0.1613 ms | n/a | 5.6321x | n/a |
323
- | `avg_pool2d_2x2` | `(1, 1, 16, 16)` | 0.0304 ms | 0.5601 ms | n/a | 18.4457x | n/a |
324
- | `elementwise_backward` | `(1024,)` | 2.7150 ms | n/a | n/a | n/a | n/a |
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.