tensorstudio 1.7.0__tar.gz → 1.9.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 (193) hide show
  1. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/CHANGELOG.md +36 -0
  2. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/CMakeLists.txt +70 -70
  3. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/PKG-INFO +46 -16
  4. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/README.md +45 -15
  5. tensorstudio-1.9.0/benchmarks/results.md +347 -0
  6. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/benchmarks/results_matmul.md +13 -13
  7. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/autograd/coverage.md +50 -5
  8. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/autograd/gradient-notes.md +28 -0
  9. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/autograd/overview.md +45 -9
  10. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/core/api-reference.md +33 -6
  11. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/core/tensors.md +24 -3
  12. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/hardware/cpu-backend.md +1 -1
  13. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/index.md +6 -2
  14. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/interchange/onnx.md +1 -1
  15. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/interchange/serialization.md +1 -1
  16. tensorstudio-1.9.0/docs/nn/initializers.md +70 -0
  17. tensorstudio-1.9.0/docs/nn/losses-and-summary.md +79 -0
  18. tensorstudio-1.9.0/docs/nn/modules.md +213 -0
  19. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/nn/overview.md +42 -3
  20. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/nn/training.md +1 -1
  21. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/release/publishing.md +4 -4
  22. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/release/versioning.md +2 -2
  23. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/roadmap/milestones.md +8 -0
  24. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/roadmap/roadmap.md +31 -17
  25. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/include/tensorstudio/autograd.hpp +4 -1
  26. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/include/tensorstudio/ops.hpp +16 -1
  27. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/include/tensorstudio/tensor.hpp +8 -0
  28. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/include/tensorstudio/version.hpp +7 -7
  29. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/mkdocs.yml +2 -0
  30. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/pyproject.toml +95 -95
  31. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/_C.pyi +28 -2
  32. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/__init__.py +4 -0
  33. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/_version.py +5 -5
  34. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/autograd.py +2 -2
  35. tensorstudio-1.9.0/python/tensorstudio/nn/__init__.py +170 -0
  36. tensorstudio-1.9.0/python/tensorstudio/nn/functional.py +500 -0
  37. tensorstudio-1.9.0/python/tensorstudio/nn/init.py +118 -0
  38. tensorstudio-1.9.0/python/tensorstudio/nn/losses.py +169 -0
  39. tensorstudio-1.9.0/python/tensorstudio/nn/modules.py +999 -0
  40. tensorstudio-1.9.0/python/tensorstudio/nn/summary.py +109 -0
  41. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/ops.py +42 -0
  42. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/src/bindings/bind_autograd.cpp +7 -4
  43. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/src/bindings/bind_ops.cpp +50 -3
  44. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/src/bindings/bind_tensor.cpp +25 -4
  45. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/src/core/autograd.cpp +38 -4
  46. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/src/core/ops.cpp +502 -26
  47. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/src/core/tensor.cpp +60 -0
  48. tensorstudio-1.9.0/tests/test_autograd_hardening.py +139 -0
  49. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/tests/test_import.py +13 -13
  50. tensorstudio-1.9.0/tests/test_nn_building_blocks.py +205 -0
  51. tensorstudio-1.7.0/benchmarks/results.md +0 -347
  52. tensorstudio-1.7.0/docs/nn/modules.md +0 -141
  53. tensorstudio-1.7.0/python/tensorstudio/nn/__init__.py +0 -82
  54. tensorstudio-1.7.0/python/tensorstudio/nn/functional.py +0 -166
  55. tensorstudio-1.7.0/python/tensorstudio/nn/losses.py +0 -73
  56. tensorstudio-1.7.0/python/tensorstudio/nn/modules.py +0 -511
  57. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/.gitattributes +0 -0
  58. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/.github/workflows/ci.yml +0 -0
  59. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/.github/workflows/publish-testpypi.yml +0 -0
  60. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/.github/workflows/publish.yml +0 -0
  61. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/.github/workflows/wheels.yml +0 -0
  62. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/.gitignore +0 -0
  63. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/.pre-commit-config.yaml +0 -0
  64. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/CONTRIBUTING.md +0 -0
  65. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/LICENSE +0 -0
  66. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/SECURITY.md +0 -0
  67. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/benchmark_all.py +0 -0
  68. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/benchmarks/__init__.py +0 -0
  69. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/benchmarks/bench_activations.py +0 -0
  70. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/benchmarks/bench_autograd.py +0 -0
  71. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/benchmarks/bench_conv2d.py +0 -0
  72. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/benchmarks/bench_elementwise.py +0 -0
  73. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/benchmarks/bench_matmul.py +0 -0
  74. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/benchmarks/bench_pooling.py +0 -0
  75. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/benchmarks/bench_reductions.py +0 -0
  76. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/benchmarks/bench_tensor_ops.py +0 -0
  77. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/benchmarks/bench_training_loop.py +0 -0
  78. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/benchmarks/benchmark_report.py +0 -0
  79. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/benchmarks/results_conv2d.md +0 -0
  80. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/benchmarks/results_pooling.md +0 -0
  81. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/benchmarks/results_reductions.md +0 -0
  82. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/benchmarks/results_tensor_ops.md +0 -0
  83. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/benchmarks/thresholds.json +0 -0
  84. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/core/broadcasting.md +0 -0
  85. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/core/math-and-statistics.md +0 -0
  86. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/core/native-cpp-core.md +0 -0
  87. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/data/dataloader-patterns.md +0 -0
  88. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/data/datasets-and-dataloaders.md +0 -0
  89. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/data/tensor-datasets.md +0 -0
  90. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/development/contributing.md +0 -0
  91. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/development/cpp-first.md +0 -0
  92. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/getting-started/installation.md +0 -0
  93. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/getting-started/quickstart.md +0 -0
  94. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/getting-started/source-build.md +0 -0
  95. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/hardware/linux.md +0 -0
  96. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/hardware/macos.md +0 -0
  97. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/hardware/windows.md +0 -0
  98. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/interchange/model-formats.md +0 -0
  99. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/interchange/numpy-interop.md +0 -0
  100. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/interchange/trusted-serialization.md +0 -0
  101. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/nn/optimizers.md +0 -0
  102. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/performance/benchmarks.md +0 -0
  103. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/performance/optimization.md +0 -0
  104. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/performance/profiling.md +0 -0
  105. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/project/checkpoints.md +0 -0
  106. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/project/project-layout.md +0 -0
  107. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/project/workflows.md +0 -0
  108. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/release/checklist.md +0 -0
  109. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/roadmap/priorities.md +0 -0
  110. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/vision/dataset-creation.md +0 -0
  111. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/docs/vision/overview.md +0 -0
  112. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/examples/basic_tensor_ops.py +0 -0
  113. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/examples/export_onnx.py +0 -0
  114. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/examples/image_folder_classification.py +0 -0
  115. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/examples/linear_regression.py +0 -0
  116. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/examples/project_training.py +0 -0
  117. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/examples/save_load_model.py +0 -0
  118. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/examples/tiny_mlp.py +0 -0
  119. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/examples/vision_classifier.py +0 -0
  120. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/include/tensorstudio/device.hpp +0 -0
  121. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/include/tensorstudio/dtype.hpp +0 -0
  122. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/include/tensorstudio/errors.hpp +0 -0
  123. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/include/tensorstudio/module.hpp +0 -0
  124. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/include/tensorstudio/optim.hpp +0 -0
  125. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/include/tensorstudio/perf.hpp +0 -0
  126. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/include/tensorstudio/random.hpp +0 -0
  127. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/include/tensorstudio/serialization.hpp +0 -0
  128. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/include/tensorstudio/shape.hpp +0 -0
  129. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/include/tensorstudio/storage.hpp +0 -0
  130. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/data/__init__.py +0 -0
  131. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/data/dataloader.py +0 -0
  132. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/data/dataset.py +0 -0
  133. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/dtypes.py +0 -0
  134. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/errors.py +0 -0
  135. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/grad_mode.py +0 -0
  136. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/interchange/__init__.py +0 -0
  137. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/interchange/onnx.py +0 -0
  138. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/math.py +0 -0
  139. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/optim/__init__.py +0 -0
  140. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/optim/adam.py +0 -0
  141. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/optim/adamw.py +0 -0
  142. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/optim/lr_scheduler.py +0 -0
  143. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/optim/sgd.py +0 -0
  144. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/optim/utils.py +0 -0
  145. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/performance.py +0 -0
  146. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/project/__init__.py +0 -0
  147. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/project/checkpoint.py +0 -0
  148. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/project/config.py +0 -0
  149. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/project/trainer.py +0 -0
  150. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/py.typed +0 -0
  151. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/serialization.py +0 -0
  152. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/tensor.py +0 -0
  153. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/typing.py +0 -0
  154. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/vision/__init__.py +0 -0
  155. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/vision/datasets.py +0 -0
  156. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/vision/io.py +0 -0
  157. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/vision/metrics.py +0 -0
  158. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/vision/models.py +0 -0
  159. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/vision/transforms.py +0 -0
  160. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/python/tensorstudio/vision/visualization.py +0 -0
  161. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/src/bindings/bind_nn.cpp +0 -0
  162. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/src/bindings/bind_optim.cpp +0 -0
  163. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/src/bindings/bindings.cpp +0 -0
  164. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/src/bindings/bindings.hpp +0 -0
  165. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/src/core/device.cpp +0 -0
  166. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/src/core/dtype.cpp +0 -0
  167. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/src/core/errors.cpp +0 -0
  168. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/src/core/module.cpp +0 -0
  169. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/src/core/optim.cpp +0 -0
  170. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/src/core/perf.cpp +0 -0
  171. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/src/core/random.cpp +0 -0
  172. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/src/core/serialization.cpp +0 -0
  173. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/src/core/shape.cpp +0 -0
  174. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/src/core/storage.cpp +0 -0
  175. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/test_all.py +0 -0
  176. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/tests/test_autograd.py +0 -0
  177. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/tests/test_benchmark_report.py +0 -0
  178. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/tests/test_broadcasting.py +0 -0
  179. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/tests/test_core_math_expansion.py +0 -0
  180. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/tests/test_data.py +0 -0
  181. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/tests/test_errors.py +0 -0
  182. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/tests/test_indexing.py +0 -0
  183. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/tests/test_interchange.py +0 -0
  184. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/tests/test_nn.py +0 -0
  185. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/tests/test_numpy_interop.py +0 -0
  186. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/tests/test_ops.py +0 -0
  187. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/tests/test_optim.py +0 -0
  188. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/tests/test_performance.py +0 -0
  189. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/tests/test_project.py +0 -0
  190. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/tests/test_serialization.py +0 -0
  191. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/tests/test_tensor.py +0 -0
  192. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/tests/test_views.py +0 -0
  193. {tensorstudio-1.7.0 → tensorstudio-1.9.0}/tests/test_vision.py +0 -0
@@ -2,6 +2,42 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 1.9.0 - 2026-07-07
6
+
7
+ - Completed the ordered Neural Network Building Blocks roadmap section as one
8
+ release batch.
9
+ - Added native grouped `conv2d`, native `conv_transpose2d`, and native
10
+ embedding lookup with autograd support.
11
+ - Added Python-level `Conv1d`, `DepthwiseConv2d`, `ConvTranspose2d`,
12
+ `BatchNorm1d`, `BatchNorm2d`, `LayerNorm`, `Embedding`,
13
+ adaptive/global pooling, and additional activation modules.
14
+ - Added `tensorstudio.nn.init` with Xavier, Kaiming, normal, uniform, zero, and
15
+ one initializers.
16
+ - Added label-smoothing cross entropy, focal loss, KL divergence, negative log
17
+ likelihood, and cosine embedding loss modules and functional helpers.
18
+ - Added module buffers, buffer-aware `state_dict()` support, and model summary
19
+ utilities for parameters, shapes, and estimated tensor memory.
20
+ - Expanded tests and docs for the section-5 neural-network API surface.
21
+
22
+ ## 1.8.0 - 2026-07-07
23
+
24
+ - Completed the ordered Autograd Coverage And Hardening roadmap section as one
25
+ release batch.
26
+ - Added `retain_graph` support to `Tensor.backward()` and
27
+ `tensorstudio.autograd.backward()`.
28
+ - Added graph lifecycle hardening: normal backward frees non-leaf graph history,
29
+ repeated backward through a freed graph raises a clear error, and retained
30
+ graphs clear intermediate gradients between backward passes.
31
+ - Added Tensor `is_leaf`, `clear_history()`, and `detach_()` controls for
32
+ explicit graph lifecycle management.
33
+ - Added guarded public in-place methods `zero_()`, `fill_()`, and `add_()`.
34
+ They reject gradient-tracked mutation while grad mode is enabled and work
35
+ inside `tensorstudio.no_grad()`.
36
+ - Expanded non-scalar backward and finite-difference gradient tests for stable
37
+ probability ops, statistics, norms, and batched matrix multiplication.
38
+ - Expanded autograd documentation with a coverage matrix, lifecycle notes, and
39
+ explicit higher-order-gradient limitations.
40
+
5
41
  ## 1.7.0 - 2026-07-07
6
42
 
7
43
  - Completed the ordered Core Math Expansion roadmap section as one release
@@ -1,70 +1,70 @@
1
- cmake_minimum_required(VERSION 3.18)
2
-
3
- project(tensorstudio VERSION 1.7.0 LANGUAGES CXX)
4
-
5
- find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)
6
- set(PYBIND11_FINDPYTHON ON)
7
- find_package(pybind11 CONFIG REQUIRED)
8
-
9
- option(TENSORSTUDIO_ENABLE_BLAS "Enable optional CBLAS-backed matmul when available" ON)
10
-
11
- set(TENSORSTUDIO_CORE_SOURCES
12
- src/core/tensor.cpp
13
- src/core/dtype.cpp
14
- src/core/shape.cpp
15
- src/core/device.cpp
16
- src/core/storage.cpp
17
- src/core/ops.cpp
18
- src/core/autograd.cpp
19
- src/core/module.cpp
20
- src/core/optim.cpp
21
- src/core/random.cpp
22
- src/core/serialization.cpp
23
- src/core/errors.cpp
24
- src/core/perf.cpp
25
- )
26
-
27
- set(TENSORSTUDIO_BINDING_SOURCES
28
- src/bindings/bindings.cpp
29
- src/bindings/bind_tensor.cpp
30
- src/bindings/bind_ops.cpp
31
- src/bindings/bind_autograd.cpp
32
- src/bindings/bind_nn.cpp
33
- src/bindings/bind_optim.cpp
34
- )
35
-
36
- pybind11_add_module(_C MODULE
37
- ${TENSORSTUDIO_CORE_SOURCES}
38
- ${TENSORSTUDIO_BINDING_SOURCES}
39
- )
40
-
41
- target_include_directories(_C PRIVATE include src/bindings)
42
- target_compile_features(_C PRIVATE cxx_std_20)
43
-
44
- if(TENSORSTUDIO_ENABLE_BLAS)
45
- find_package(BLAS)
46
- if(BLAS_FOUND)
47
- include(CheckIncludeFileCXX)
48
- check_include_file_cxx(cblas.h TENSORSTUDIO_HAVE_CBLAS_H)
49
- target_link_libraries(_C PRIVATE ${BLAS_LIBRARIES})
50
- if(APPLE)
51
- target_compile_definitions(_C PRIVATE TENSORSTUDIO_HAS_ACCELERATE=1)
52
- elseif(TENSORSTUDIO_HAVE_CBLAS_H)
53
- target_compile_definitions(_C PRIVATE TENSORSTUDIO_HAS_CBLAS=1)
54
- endif()
55
- endif()
56
- endif()
57
-
58
- if(MSVC)
59
- target_compile_options(_C PRIVATE /W4 /permissive-)
60
- else()
61
- target_compile_options(_C PRIVATE -Wall -Wextra -Wpedantic)
62
- endif()
63
-
64
- target_compile_definitions(_C PRIVATE TENSORSTUDIO_VERSION="${PROJECT_VERSION}")
65
-
66
- install(TARGETS _C
67
- LIBRARY DESTINATION tensorstudio
68
- RUNTIME DESTINATION tensorstudio
69
- ARCHIVE DESTINATION tensorstudio
70
- )
1
+ cmake_minimum_required(VERSION 3.18)
2
+
3
+ project(tensorstudio VERSION 1.9.0 LANGUAGES CXX)
4
+
5
+ find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)
6
+ set(PYBIND11_FINDPYTHON ON)
7
+ find_package(pybind11 CONFIG REQUIRED)
8
+
9
+ option(TENSORSTUDIO_ENABLE_BLAS "Enable optional CBLAS-backed matmul when available" ON)
10
+
11
+ set(TENSORSTUDIO_CORE_SOURCES
12
+ src/core/tensor.cpp
13
+ src/core/dtype.cpp
14
+ src/core/shape.cpp
15
+ src/core/device.cpp
16
+ src/core/storage.cpp
17
+ src/core/ops.cpp
18
+ src/core/autograd.cpp
19
+ src/core/module.cpp
20
+ src/core/optim.cpp
21
+ src/core/random.cpp
22
+ src/core/serialization.cpp
23
+ src/core/errors.cpp
24
+ src/core/perf.cpp
25
+ )
26
+
27
+ set(TENSORSTUDIO_BINDING_SOURCES
28
+ src/bindings/bindings.cpp
29
+ src/bindings/bind_tensor.cpp
30
+ src/bindings/bind_ops.cpp
31
+ src/bindings/bind_autograd.cpp
32
+ src/bindings/bind_nn.cpp
33
+ src/bindings/bind_optim.cpp
34
+ )
35
+
36
+ pybind11_add_module(_C MODULE
37
+ ${TENSORSTUDIO_CORE_SOURCES}
38
+ ${TENSORSTUDIO_BINDING_SOURCES}
39
+ )
40
+
41
+ target_include_directories(_C PRIVATE include src/bindings)
42
+ target_compile_features(_C PRIVATE cxx_std_20)
43
+
44
+ if(TENSORSTUDIO_ENABLE_BLAS)
45
+ find_package(BLAS)
46
+ if(BLAS_FOUND)
47
+ include(CheckIncludeFileCXX)
48
+ check_include_file_cxx(cblas.h TENSORSTUDIO_HAVE_CBLAS_H)
49
+ target_link_libraries(_C PRIVATE ${BLAS_LIBRARIES})
50
+ if(APPLE)
51
+ target_compile_definitions(_C PRIVATE TENSORSTUDIO_HAS_ACCELERATE=1)
52
+ elseif(TENSORSTUDIO_HAVE_CBLAS_H)
53
+ target_compile_definitions(_C PRIVATE TENSORSTUDIO_HAS_CBLAS=1)
54
+ endif()
55
+ endif()
56
+ endif()
57
+
58
+ if(MSVC)
59
+ target_compile_options(_C PRIVATE /W4 /permissive-)
60
+ else()
61
+ target_compile_options(_C PRIVATE -Wall -Wextra -Wpedantic)
62
+ endif()
63
+
64
+ target_compile_definitions(_C PRIVATE TENSORSTUDIO_VERSION="${PROJECT_VERSION}")
65
+
66
+ install(TARGETS _C
67
+ LIBRARY DESTINATION tensorstudio
68
+ RUNTIME DESTINATION tensorstudio
69
+ ARCHIVE DESTINATION tensorstudio
70
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: tensorstudio
3
- Version: 1.7.0
3
+ Version: 1.9.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,11 +71,14 @@ 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.7.0` is a CPU-only stable API foundation with native C++
74
+ TensorStudio `1.9.0` is a CPU-only stable API foundation with native C++
75
75
  threading, storage reuse, SIMD-friendly typed kernels, and optional
76
76
  CBLAS/Accelerate matrix multiplication when available. It adds native stable
77
77
  softmax/logsumexp, batched matrix multiplication, statistical reductions,
78
- boolean reductions, and seeded random distributions. It is eager-only,
78
+ boolean reductions, seeded random distributions, and a hardened eager autograd
79
+ lifecycle. The neural-network layer now includes grouped/depthwise/1D/
80
+ transposed convolution, normalization layers, embeddings, richer activations,
81
+ initializers, additional losses, and model summaries. It is eager-only,
79
82
  intentionally compact, and not a replacement for mature ML frameworks.
80
83
 
81
84
  ## Install
@@ -241,11 +244,20 @@ loss.backward()
241
244
  print(x.grad.tolist())
242
245
  ```
243
246
 
247
+ Reuse a graph explicitly when needed:
248
+
249
+ ```python
250
+ loss = (x * x).sum()
251
+ loss.backward(retain_graph=True)
252
+ loss.backward()
253
+ ```
254
+
244
255
  Use `no_grad()` when you want eager computation without recording a graph:
245
256
 
246
257
  ```python
247
258
  with ts.no_grad():
248
259
  y = x * 2
260
+ x.zero_()
249
261
  ```
250
262
 
251
263
  ## Neural Networks
@@ -277,6 +289,23 @@ print(model.state_dict().keys())
277
289
  print(model.parameter_count())
278
290
  ```
279
291
 
292
+ The `1.9.0` neural-network surface also includes initialization helpers,
293
+ normalization layers, embeddings, grouped/depthwise/1D/transposed convolution,
294
+ adaptive/global pooling, richer activations, and model summaries:
295
+
296
+ ```python
297
+ model = nn.Sequential(
298
+ nn.Conv2d(1, 8, kernel_size=3, padding=1),
299
+ nn.BatchNorm2d(8),
300
+ nn.GELU(),
301
+ nn.GlobalAvgPool2d(),
302
+ nn.Flatten(),
303
+ nn.Linear(8, 10),
304
+ )
305
+ nn.init.kaiming_uniform_(model[0].weight, nonlinearity="relu", seed=7)
306
+ print(nn.summary(model, input_shape=(1, 1, 28, 28))["total_parameters"])
307
+ ```
308
+
280
309
  ## Vision
281
310
 
282
311
  TensorStudio includes a practical computer-vision namespace for local image
@@ -381,11 +410,11 @@ Run the loose local regression thresholds with:
381
410
  python benchmark_all.py --check-thresholds
382
411
  ```
383
412
 
384
- On one Windows CPython 3.10 development run reporting `1.7.0`, with
413
+ On one Windows CPython 3.10 development run reporting `1.9.0`, with
385
414
  TensorStudio threads enabled, storage pooling enabled, SSE2 autovectorization
386
415
  reported, and no BLAS provider found, TensorStudio beat NumPy on 7 local
387
416
  benchmark cases and lost on 96 NumPy-comparable cases. JAX CPU dispatch was
388
- available on that machine; TensorStudio won 45 local cases and lost 53. The
417
+ available on that machine; TensorStudio won 55 local cases and lost 43. The
389
418
  strongest local wins were the simple NumPy convolution/pooling reference loops
390
419
  and some small JAX-dispatch-heavy eager cases. NumPy and JAX were faster for
391
420
  many elementwise, reduction, matrix multiplication, larger activation, and
@@ -397,15 +426,15 @@ Snapshot from that local run:
397
426
 
398
427
  | operation | shape | TensorStudio | NumPy | JAX CPU dispatch | TS vs NumPy | TS vs JAX |
399
428
  |---|---:|---:|---:|---:|---:|---:|
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 |
429
+ | `sigmoid` | `(32,)` | 0.0154 ms | 0.0048 ms | 0.0855 ms | 0.3098x | 5.5404x |
430
+ | `mean` | `(32,)` | 0.0187 ms | 0.0104 ms | 0.0143 ms | 0.5575x | 0.7616x |
431
+ | `sum_axis1` | `(16, 16)` | 0.0172 ms | 0.0027 ms | 0.0136 ms | 0.1551x | 0.7942x |
432
+ | `chain_relu` | `(128,)` | 0.0957 ms | 0.0057 ms | 0.1030 ms | 0.0596x | 1.0768x |
433
+ | `matmul` | `(256, 256)` | 2.3777 ms | 0.4328 ms | 0.2489 ms | 0.1820x | 0.1047x |
434
+ | `conv2d_3x3_padding1` | `(1, 1, 8, 8)` | 0.2216 ms | 1.3908 ms | 0.1073 ms | 6.2770x | 0.4841x |
435
+ | `max_pool2d_2x2` | `(1, 1, 16, 16)` | 0.0280 ms | 0.1846 ms | n/a | 6.5816x | n/a |
436
+ | `avg_pool2d_2x2` | `(1, 1, 16, 16)` | 0.0281 ms | 0.5595 ms | n/a | 19.8874x | n/a |
437
+ | `elementwise_backward` | `(1024,)` | 2.8255 ms | n/a | n/a | n/a | n/a |
409
438
 
410
439
  Speedup is `competitor median / TensorStudio median`, so values above `1.0x`
411
440
  favor TensorStudio.
@@ -506,8 +535,9 @@ tokens or print secrets.
506
535
  exposing a compatible CBLAS/Accelerate interface; otherwise TensorStudio uses
507
536
  a portable C++ fallback.
508
537
  - No graph compiler or distributed runtime.
509
- - Convolution and pooling support are currently limited to CPU NCHW
510
- `conv2d`, `max_pool2d`, and `avg_pool2d` style workloads.
538
+ - Convolution and pooling support are CPU-only. Native kernels include NCHW
539
+ `conv2d`, grouped/depthwise convolution, `conv_transpose2d`, `max_pool2d`,
540
+ `avg_pool2d`, and embedding lookup; they are not CUDA/cuDNN replacements.
511
541
  - Vision covers local image-classification utilities, metrics, visualization,
512
542
  and compact CNNs. It is not an OpenCV replacement and does not include
513
543
  pretrained model zoos, detection/segmentation training stacks, video IO, or
@@ -7,11 +7,14 @@
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.7.0` is a CPU-only stable API foundation with native C++
10
+ TensorStudio `1.9.0` is a CPU-only stable API foundation with native C++
11
11
  threading, storage reuse, SIMD-friendly typed kernels, and optional
12
12
  CBLAS/Accelerate matrix multiplication when available. It adds native stable
13
13
  softmax/logsumexp, batched matrix multiplication, statistical reductions,
14
- boolean reductions, and seeded random distributions. It is eager-only,
14
+ boolean reductions, seeded random distributions, and a hardened eager autograd
15
+ lifecycle. The neural-network layer now includes grouped/depthwise/1D/
16
+ transposed convolution, normalization layers, embeddings, richer activations,
17
+ initializers, additional losses, and model summaries. It is eager-only,
15
18
  intentionally compact, and not a replacement for mature ML frameworks.
16
19
 
17
20
  ## Install
@@ -177,11 +180,20 @@ loss.backward()
177
180
  print(x.grad.tolist())
178
181
  ```
179
182
 
183
+ Reuse a graph explicitly when needed:
184
+
185
+ ```python
186
+ loss = (x * x).sum()
187
+ loss.backward(retain_graph=True)
188
+ loss.backward()
189
+ ```
190
+
180
191
  Use `no_grad()` when you want eager computation without recording a graph:
181
192
 
182
193
  ```python
183
194
  with ts.no_grad():
184
195
  y = x * 2
196
+ x.zero_()
185
197
  ```
186
198
 
187
199
  ## Neural Networks
@@ -213,6 +225,23 @@ print(model.state_dict().keys())
213
225
  print(model.parameter_count())
214
226
  ```
215
227
 
228
+ The `1.9.0` neural-network surface also includes initialization helpers,
229
+ normalization layers, embeddings, grouped/depthwise/1D/transposed convolution,
230
+ adaptive/global pooling, richer activations, and model summaries:
231
+
232
+ ```python
233
+ model = nn.Sequential(
234
+ nn.Conv2d(1, 8, kernel_size=3, padding=1),
235
+ nn.BatchNorm2d(8),
236
+ nn.GELU(),
237
+ nn.GlobalAvgPool2d(),
238
+ nn.Flatten(),
239
+ nn.Linear(8, 10),
240
+ )
241
+ nn.init.kaiming_uniform_(model[0].weight, nonlinearity="relu", seed=7)
242
+ print(nn.summary(model, input_shape=(1, 1, 28, 28))["total_parameters"])
243
+ ```
244
+
216
245
  ## Vision
217
246
 
218
247
  TensorStudio includes a practical computer-vision namespace for local image
@@ -317,11 +346,11 @@ Run the loose local regression thresholds with:
317
346
  python benchmark_all.py --check-thresholds
318
347
  ```
319
348
 
320
- On one Windows CPython 3.10 development run reporting `1.7.0`, with
349
+ On one Windows CPython 3.10 development run reporting `1.9.0`, with
321
350
  TensorStudio threads enabled, storage pooling enabled, SSE2 autovectorization
322
351
  reported, and no BLAS provider found, TensorStudio beat NumPy on 7 local
323
352
  benchmark cases and lost on 96 NumPy-comparable cases. JAX CPU dispatch was
324
- available on that machine; TensorStudio won 45 local cases and lost 53. The
353
+ available on that machine; TensorStudio won 55 local cases and lost 43. The
325
354
  strongest local wins were the simple NumPy convolution/pooling reference loops
326
355
  and some small JAX-dispatch-heavy eager cases. NumPy and JAX were faster for
327
356
  many elementwise, reduction, matrix multiplication, larger activation, and
@@ -333,15 +362,15 @@ Snapshot from that local run:
333
362
 
334
363
  | operation | shape | TensorStudio | NumPy | JAX CPU dispatch | TS vs NumPy | TS vs JAX |
335
364
  |---|---:|---:|---:|---:|---:|---:|
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 |
365
+ | `sigmoid` | `(32,)` | 0.0154 ms | 0.0048 ms | 0.0855 ms | 0.3098x | 5.5404x |
366
+ | `mean` | `(32,)` | 0.0187 ms | 0.0104 ms | 0.0143 ms | 0.5575x | 0.7616x |
367
+ | `sum_axis1` | `(16, 16)` | 0.0172 ms | 0.0027 ms | 0.0136 ms | 0.1551x | 0.7942x |
368
+ | `chain_relu` | `(128,)` | 0.0957 ms | 0.0057 ms | 0.1030 ms | 0.0596x | 1.0768x |
369
+ | `matmul` | `(256, 256)` | 2.3777 ms | 0.4328 ms | 0.2489 ms | 0.1820x | 0.1047x |
370
+ | `conv2d_3x3_padding1` | `(1, 1, 8, 8)` | 0.2216 ms | 1.3908 ms | 0.1073 ms | 6.2770x | 0.4841x |
371
+ | `max_pool2d_2x2` | `(1, 1, 16, 16)` | 0.0280 ms | 0.1846 ms | n/a | 6.5816x | n/a |
372
+ | `avg_pool2d_2x2` | `(1, 1, 16, 16)` | 0.0281 ms | 0.5595 ms | n/a | 19.8874x | n/a |
373
+ | `elementwise_backward` | `(1024,)` | 2.8255 ms | n/a | n/a | n/a | n/a |
345
374
 
346
375
  Speedup is `competitor median / TensorStudio median`, so values above `1.0x`
347
376
  favor TensorStudio.
@@ -442,8 +471,9 @@ tokens or print secrets.
442
471
  exposing a compatible CBLAS/Accelerate interface; otherwise TensorStudio uses
443
472
  a portable C++ fallback.
444
473
  - No graph compiler or distributed runtime.
445
- - Convolution and pooling support are currently limited to CPU NCHW
446
- `conv2d`, `max_pool2d`, and `avg_pool2d` style workloads.
474
+ - Convolution and pooling support are CPU-only. Native kernels include NCHW
475
+ `conv2d`, grouped/depthwise convolution, `conv_transpose2d`, `max_pool2d`,
476
+ `avg_pool2d`, and embedding lookup; they are not CUDA/cuDNN replacements.
447
477
  - Vision covers local image-classification utilities, metrics, visualization,
448
478
  and compact CNNs. It is not an OpenCV replacement and does not include
449
479
  pretrained model zoos, detection/segmentation training stacks, video IO, or