tensorstudio 1.0.0rc2__tar.gz → 1.1.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 (137) hide show
  1. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/.github/workflows/ci.yml +12 -0
  2. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/.github/workflows/publish-testpypi.yml +1 -0
  3. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/.github/workflows/publish.yml +16 -4
  4. tensorstudio-1.1.0/CHANGELOG.md +89 -0
  5. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/CMakeLists.txt +3 -1
  6. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/PKG-INFO +49 -32
  7. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/README.md +48 -31
  8. tensorstudio-1.1.0/benchmark_all.py +50 -0
  9. tensorstudio-1.1.0/benchmarks/__init__.py +2 -0
  10. tensorstudio-1.1.0/benchmarks/bench_conv2d.py +8 -0
  11. tensorstudio-1.1.0/benchmarks/bench_pooling.py +8 -0
  12. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/benchmarks/benchmark_report.py +307 -28
  13. tensorstudio-1.1.0/benchmarks/results.md +353 -0
  14. tensorstudio-1.1.0/benchmarks/results_conv2d.md +39 -0
  15. tensorstudio-1.1.0/benchmarks/results_matmul.md +45 -0
  16. tensorstudio-1.1.0/benchmarks/results_pooling.md +45 -0
  17. tensorstudio-1.1.0/benchmarks/results_reductions.md +75 -0
  18. tensorstudio-1.1.0/benchmarks/results_tensor_ops.md +309 -0
  19. {tensorstudio-1.0.0rc2/docs → tensorstudio-1.1.0/docs/Autograde}/autograd.md +1 -1
  20. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/docs/Autograde/index.md +1 -1
  21. tensorstudio-1.1.0/docs/Benchmarks/index.md +86 -0
  22. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/docs/Hardware/cpu-backend.md +4 -4
  23. {tensorstudio-1.0.0rc2/docs → tensorstudio-1.1.0/docs/Hardware}/windows.md +1 -1
  24. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/docs/Neural Networks/modules.md +40 -0
  25. tensorstudio-1.0.0rc2/docs/nn.md → tensorstudio-1.1.0/docs/Neural Networks/nn.md +45 -0
  26. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/docs/Neural Networks/training.md +1 -1
  27. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/docs/Roadmap/index.md +8 -7
  28. {tensorstudio-1.0.0rc2/docs → tensorstudio-1.1.0/docs/Usage}/api.md +77 -5
  29. {tensorstudio-1.0.0rc2/docs → tensorstudio-1.1.0/docs/Usage}/data.md +2 -2
  30. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/docs/Usage/serialization.md +1 -1
  31. {tensorstudio-1.0.0rc2/docs → tensorstudio-1.1.0/docs/Usage}/tensors.md +34 -3
  32. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/docs/development.md +11 -4
  33. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/docs/index.md +20 -19
  34. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/docs/publishing.md +33 -14
  35. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/docs/quickstart.md +43 -1
  36. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/docs/serialization.md +2 -2
  37. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/include/tensorstudio/ops.hpp +36 -0
  38. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/include/tensorstudio/version.hpp +1 -1
  39. tensorstudio-1.1.0/mkdocs.yml +44 -0
  40. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/pyproject.toml +1 -1
  41. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/python/tensorstudio/_C.pyi +45 -8
  42. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/python/tensorstudio/__init__.py +7 -0
  43. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/python/tensorstudio/_version.py +1 -1
  44. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/python/tensorstudio/nn/__init__.py +20 -1
  45. tensorstudio-1.1.0/python/tensorstudio/nn/functional.py +167 -0
  46. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/python/tensorstudio/nn/losses.py +14 -1
  47. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/python/tensorstudio/nn/modules.py +165 -0
  48. tensorstudio-1.1.0/python/tensorstudio/ops.py +262 -0
  49. tensorstudio-1.1.0/src/bindings/bind_ops.cpp +118 -0
  50. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/src/bindings/bind_tensor.cpp +44 -10
  51. tensorstudio-1.1.0/src/core/ops.cpp +2356 -0
  52. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/src/core/tensor.cpp +128 -6
  53. tensorstudio-1.1.0/test_all.py +102 -0
  54. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/tests/test_autograd.py +82 -0
  55. tensorstudio-1.1.0/tests/test_benchmark_report.py +71 -0
  56. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/tests/test_import.py +1 -1
  57. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/tests/test_nn.py +97 -0
  58. tensorstudio-1.1.0/tests/test_ops.py +314 -0
  59. tensorstudio-1.0.0rc2/CHANGELOG.md +0 -40
  60. tensorstudio-1.0.0rc2/benchmarks/results.md +0 -214
  61. tensorstudio-1.0.0rc2/benchmarks/results_matmul.md +0 -38
  62. tensorstudio-1.0.0rc2/docs/Benchmarks/index.md +0 -53
  63. tensorstudio-1.0.0rc2/docs/Usage/tensors.md +0 -139
  64. tensorstudio-1.0.0rc2/mkdocs.yml +0 -32
  65. tensorstudio-1.0.0rc2/python/tensorstudio/nn/functional.py +0 -75
  66. tensorstudio-1.0.0rc2/python/tensorstudio/ops.py +0 -157
  67. tensorstudio-1.0.0rc2/src/bindings/bind_ops.cpp +0 -40
  68. tensorstudio-1.0.0rc2/src/core/ops.cpp +0 -1093
  69. tensorstudio-1.0.0rc2/tests/test_ops.py +0 -63
  70. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/.github/workflows/wheels.yml +0 -0
  71. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/.gitignore +0 -0
  72. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/.pre-commit-config.yaml +0 -0
  73. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/CONTRIBUTING.md +0 -0
  74. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/LICENSE +0 -0
  75. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/SECURITY.md +0 -0
  76. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/benchmarks/bench_activations.py +0 -0
  77. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/benchmarks/bench_autograd.py +0 -0
  78. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/benchmarks/bench_elementwise.py +0 -0
  79. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/benchmarks/bench_matmul.py +0 -0
  80. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/benchmarks/bench_reductions.py +0 -0
  81. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/benchmarks/bench_tensor_ops.py +0 -0
  82. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/benchmarks/bench_training_loop.py +0 -0
  83. {tensorstudio-1.0.0rc2/docs → tensorstudio-1.1.0/docs/Hardware}/linux.md +0 -0
  84. {tensorstudio-1.0.0rc2/docs → tensorstudio-1.1.0/docs/Hardware}/macos.md +0 -0
  85. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/docs/Usage/numpy-interop.md +0 -0
  86. {tensorstudio-1.0.0rc2/docs → tensorstudio-1.1.0/docs/Usage}/optim.md +0 -0
  87. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/examples/basic_tensor_ops.py +0 -0
  88. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/examples/linear_regression.py +0 -0
  89. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/examples/save_load_model.py +0 -0
  90. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/examples/tiny_mlp.py +0 -0
  91. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/include/tensorstudio/autograd.hpp +0 -0
  92. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/include/tensorstudio/device.hpp +0 -0
  93. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/include/tensorstudio/dtype.hpp +0 -0
  94. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/include/tensorstudio/errors.hpp +0 -0
  95. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/include/tensorstudio/module.hpp +0 -0
  96. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/include/tensorstudio/optim.hpp +0 -0
  97. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/include/tensorstudio/random.hpp +0 -0
  98. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/include/tensorstudio/serialization.hpp +0 -0
  99. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/include/tensorstudio/shape.hpp +0 -0
  100. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/include/tensorstudio/storage.hpp +0 -0
  101. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/include/tensorstudio/tensor.hpp +0 -0
  102. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/python/tensorstudio/autograd.py +0 -0
  103. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/python/tensorstudio/data/__init__.py +0 -0
  104. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/python/tensorstudio/data/dataloader.py +0 -0
  105. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/python/tensorstudio/data/dataset.py +0 -0
  106. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/python/tensorstudio/errors.py +0 -0
  107. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/python/tensorstudio/grad_mode.py +0 -0
  108. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/python/tensorstudio/optim/__init__.py +0 -0
  109. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/python/tensorstudio/optim/adam.py +0 -0
  110. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/python/tensorstudio/optim/adamw.py +0 -0
  111. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/python/tensorstudio/optim/lr_scheduler.py +0 -0
  112. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/python/tensorstudio/optim/sgd.py +0 -0
  113. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/python/tensorstudio/optim/utils.py +0 -0
  114. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/python/tensorstudio/py.typed +0 -0
  115. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/python/tensorstudio/serialization.py +0 -0
  116. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/python/tensorstudio/tensor.py +0 -0
  117. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/python/tensorstudio/typing.py +0 -0
  118. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/src/bindings/bind_autograd.cpp +0 -0
  119. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/src/bindings/bind_nn.cpp +0 -0
  120. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/src/bindings/bind_optim.cpp +0 -0
  121. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/src/bindings/bindings.cpp +0 -0
  122. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/src/bindings/bindings.hpp +0 -0
  123. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/src/core/autograd.cpp +0 -0
  124. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/src/core/device.cpp +0 -0
  125. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/src/core/dtype.cpp +0 -0
  126. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/src/core/errors.cpp +0 -0
  127. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/src/core/module.cpp +0 -0
  128. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/src/core/optim.cpp +0 -0
  129. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/src/core/random.cpp +0 -0
  130. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/src/core/serialization.cpp +0 -0
  131. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/src/core/shape.cpp +0 -0
  132. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/src/core/storage.cpp +0 -0
  133. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/tests/test_data.py +0 -0
  134. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/tests/test_numpy_interop.py +0 -0
  135. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/tests/test_optim.py +0 -0
  136. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/tests/test_serialization.py +0 -0
  137. {tensorstudio-1.0.0rc2 → tensorstudio-1.1.0}/tests/test_tensor.py +0 -0
@@ -30,6 +30,10 @@ jobs:
30
30
  run: mypy --python-version ${{ matrix.python-version }} python/tensorstudio
31
31
  - name: Tests
32
32
  run: pytest -q
33
+ - name: Runner scripts
34
+ run: |
35
+ python test_all.py --help
36
+ python benchmark_all.py --help
33
37
  - name: Example
34
38
  run: python examples/basic_tensor_ops.py
35
39
 
@@ -59,6 +63,10 @@ jobs:
59
63
  run: mypy --python-version ${{ matrix.python-version }} python/tensorstudio
60
64
  - name: Tests
61
65
  run: pytest -q
66
+ - name: Runner scripts
67
+ run: |
68
+ python test_all.py --help
69
+ python benchmark_all.py --help
62
70
  - name: Example
63
71
  run: python examples/basic_tensor_ops.py
64
72
 
@@ -88,5 +96,9 @@ jobs:
88
96
  run: mypy --python-version ${{ matrix.python-version }} python/tensorstudio
89
97
  - name: Tests
90
98
  run: pytest -q
99
+ - name: Runner scripts
100
+ run: |
101
+ python test_all.py --help
102
+ python benchmark_all.py --help
91
103
  - name: Example
92
104
  run: python examples/basic_tensor_ops.py
@@ -106,3 +106,4 @@ jobs:
106
106
  uses: pypa/gh-action-pypi-publish@release/v1
107
107
  with:
108
108
  repository-url: https://test.pypi.org/legacy/
109
+ skip-existing: true
@@ -4,9 +4,6 @@ on:
4
4
  workflow_dispatch:
5
5
  release:
6
6
  types: [published]
7
- push:
8
- tags:
9
- - "v1.0.0"
10
7
 
11
8
  permissions:
12
9
  contents: read
@@ -97,11 +94,26 @@ jobs:
97
94
  needs: [windows_wheels, linux_wheels, macos_wheels, build_sdist]
98
95
  runs-on: ubuntu-latest
99
96
  environment: pypi
97
+ env:
98
+ HAS_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN != '' }}
100
99
  steps:
101
100
  - uses: actions/download-artifact@v4
102
101
  with:
103
102
  pattern: dist-*
104
103
  path: dist
105
104
  merge-multiple: true
106
- - name: Publish to PyPI
105
+ - name: Verify artifacts
106
+ run: |
107
+ python -m pip install -U twine
108
+ python -m twine check dist/*
109
+ - name: Publish to PyPI with configured API token
110
+ if: env.HAS_PYPI_TOKEN == 'true'
107
111
  uses: pypa/gh-action-pypi-publish@release/v1
112
+ with:
113
+ password: ${{ secrets.PYPI_TOKEN }}
114
+ skip-existing: true
115
+ - name: Publish to PyPI with Trusted Publishing
116
+ if: env.HAS_PYPI_TOKEN != 'true'
117
+ uses: pypa/gh-action-pypi-publish@release/v1
118
+ with:
119
+ skip-existing: true
@@ -0,0 +1,89 @@
1
+ # Changelog
2
+
3
+ ## Unreleased
4
+
5
+ ## 1.1.0 - 2026-07-07
6
+
7
+ - Added native CPU NCHW `conv2d` with stride, padding, dilation, optional bias,
8
+ and reverse-mode gradients for input, weight, and bias.
9
+ - Added `tensorstudio.conv2d`, `tensorstudio.ops.conv2d`,
10
+ `tensorstudio.nn.functional.conv2d`, and `tensorstudio.nn.Conv2d`.
11
+ - Added convolution tests, finite-difference autograd coverage, and a
12
+ standalone convolution benchmark script.
13
+ - Added convolution rows to the full benchmark report and updated docs to mark
14
+ convolution as partially implemented rather than missing.
15
+ - Added native CPU NCHW `max_pool2d` and `avg_pool2d` operations with autograd,
16
+ Python top-level and functional APIs, `nn.MaxPool2d`, `nn.AvgPool2d`, tests,
17
+ docs, and benchmark coverage.
18
+ - Added native single-axis `sum`, `mean`, `max`, and `min` reductions with
19
+ `keepdims` and reverse-mode gradients.
20
+ - Added a typed contiguous 2D fast path for common axis `sum`/`mean`
21
+ reductions.
22
+ - Added `nn.softmax`, `nn.log_softmax`, `nn.cross_entropy`, and
23
+ `nn.CrossEntropyLoss` for small multiclass classification workloads.
24
+ - Added native `astype`, `concat`, and `stack` operations with Python wrappers,
25
+ Tensor methods for casting, and autograd support for floating tensors.
26
+
27
+ ## 1.0.1
28
+
29
+ - Added `test_all.py` for one-command local release checks covering lint,
30
+ typing, tests, examples, docs, build, and package metadata validation.
31
+ - Added `benchmark_all.py` for one-command full benchmark report generation.
32
+ - Added explicit benchmark win columns for NumPy, TensorFlow, PyTorch, and JAX,
33
+ plus fastest-library reporting for each benchmark case.
34
+ - Hardened release publishing triggers so future `v*` tags are eligible for
35
+ the publish workflow instead of only `v1.0.0`.
36
+ - Updated docs to describe benchmark interpretation, local release checks, and
37
+ site navigation for benchmark, hardware, roadmap, and usage pages.
38
+
39
+ ## 1.0.0
40
+
41
+ - Promoted the CPU-only stable API foundation from release candidate status.
42
+ - Added direct C++ buffer copies for NumPy import/export paths.
43
+ - Added faster typed tensor construction, flat-vector export, contiguous tensor
44
+ copy, and floating-point optimizer update paths.
45
+ - Added a `float32` contiguous matmul fast path that avoids double accumulation
46
+ and per-element dtype conversion for the common training dtype.
47
+ - Added typed contiguous reduction kernels for `sum` and `mean`.
48
+ - Expanded benchmark reports with framework version metadata and PyTorch
49
+ win/loss summaries.
50
+ - Updated documentation to describe honest `1.0.0` performance boundaries.
51
+
52
+ ## 1.0.0rc2
53
+
54
+ - Added `*_like` tensor creation helpers for zero, one, full, empty, uniform
55
+ random, and normal random tensors.
56
+ - Added `nn.Identity`, `nn.LeakyReLU`, `nn.Softplus`,
57
+ `nn.BCEWithLogitsLoss`, `nn.HuberLoss`, and matching functional helpers.
58
+ - Expanded `nn.Module` with child/module introspection, trainable parameter
59
+ filtering, freeze/unfreeze helpers, parameter counting, recursive `apply`,
60
+ and richer `repr` details.
61
+ - Added optimizer utilities for gradient clipping and lightweight
62
+ `StepLR`/`ExponentialLR` learning-rate schedulers.
63
+ - Added `len(DataLoader)` batch counting with `drop_last` support.
64
+ - Added typed C++ fast paths for contiguous elementwise/unary kernels and a
65
+ contiguous matmul kernel that avoids per-element Tensor method dispatch.
66
+ - Bumped the next release candidate after public `1.0.0rc1` artifacts.
67
+
68
+ ## 1.0.0rc1
69
+
70
+ - Release-candidate hardening toward a CPU-only v1.0.0 API foundation.
71
+ - Added additional tensor creation helpers, math operations, comparisons,
72
+ no-grad mode, state APIs, data utilities, and Windows-first CI/release docs.
73
+ - This is not final v1.0.0; remaining platform checklist items must pass before
74
+ a stable release.
75
+
76
+ ## 0.1.1
77
+
78
+ - Publishable wheel release for CPython 3.10-3.13.
79
+ - Fixed MSVC build portability by removing non-portable `ssize_t` usage.
80
+ - Updated wheel CI to build 64-bit Windows wheels and modern Linux wheels.
81
+ - Expanded documentation with MkDocs navigation and detailed usage guides.
82
+
83
+ ## 0.1.0
84
+
85
+ - Initial experimental release.
86
+ - C++20 CPU tensor core with Python bindings.
87
+ - Basic broadcasting, matrix multiplication, reductions, activations, and views.
88
+ - Reverse-mode autograd for the initial operation set.
89
+ - Python `nn`, `optim`, serialization, examples, tests, docs, and CI workflows.
@@ -1,7 +1,9 @@
1
1
  cmake_minimum_required(VERSION 3.18)
2
2
 
3
- project(tensorstudio VERSION 1.0.0 LANGUAGES CXX)
3
+ project(tensorstudio VERSION 1.0.1 LANGUAGES CXX)
4
4
 
5
+ find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)
6
+ set(PYBIND11_FINDPYTHON ON)
5
7
  find_package(pybind11 CONFIG REQUIRED)
6
8
 
7
9
  set(TENSORSTUDIO_CORE_SOURCES
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: tensorstudio
3
- Version: 1.0.0rc2
3
+ Version: 1.1.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
@@ -65,14 +65,12 @@ Description-Content-Type: text/markdown
65
65
  TensorStudio is a compact C++ tensor and autograd engine with a Python API for
66
66
  learning, experimentation, and lightweight ML workloads.
67
67
 
68
- TensorStudio `1.0.0rc2` is a release candidate for a CPU-only stable API
69
- foundation. It is eager-only, intentionally small, and not a replacement for
70
- mature ML frameworks. The final `1.0.0` version should only be tagged after the
71
- Windows, Linux, and macOS release checklist passes.
68
+ TensorStudio `1.1.0` is a CPU-only stable API foundation. It is eager-only,
69
+ intentionally small, and not a replacement for mature ML frameworks.
72
70
 
73
71
  ## Install
74
72
 
75
- From PyPI, once release-candidate wheels are published:
73
+ From PyPI:
76
74
 
77
75
  ```bash
78
76
  python -m pip install tensorstudio
@@ -154,6 +152,8 @@ d = ts.linspace(0.0, 1.0, 5)
154
152
 
155
153
  print(a.shape, a.strides, a.device, a.is_contiguous)
156
154
  print((b.clamp(0.2, 0.8) + 1).mean().item())
155
+ print(b.sum(axis=1).tolist())
156
+ print(ts.concat([b, b], axis=0).shape, b.astype("float64").dtype)
157
157
  print(c.tolist(), d.tolist())
158
158
  print(ts.zeros_like(b).shape, ts.randn_like(b, seed=11).dtype)
159
159
  ```
@@ -219,8 +219,8 @@ for features, targets in loader:
219
219
  print(features.shape, targets.shape)
220
220
  ```
221
221
 
222
- The v1 release candidate DataLoader is intentionally single-process so it works
223
- cleanly on Windows without multiprocessing setup.
222
+ The v1 DataLoader is intentionally single-process so it works cleanly on
223
+ Windows without multiprocessing setup.
224
224
 
225
225
  ## Performance
226
226
 
@@ -229,34 +229,45 @@ performance is still experimental. Benchmarks live in `benchmarks/` and can be
229
229
  run locally:
230
230
 
231
231
  ```bash
232
+ python benchmark_all.py
232
233
  python benchmarks/benchmark_report.py
233
234
  ```
234
235
 
235
- On one Windows CPython 3.10 run for `1.0.0rc2`, TensorStudio beat NumPy on 11
236
- small activation/reduction benchmark cases and lost on 78 NumPy-comparable
237
- cases. The strongest local wins were small `sigmoid`, `sum`, and `mean` cases;
238
- medium elementwise operations and matrix multiplication remain slower than
239
- NumPy. The C++ contiguous matmul fast path is much faster than the original
240
- naive storage-access loop, but it is not a BLAS replacement. See
241
- `benchmarks/results.md` for the full table, platform details, and exact timings.
236
+ `benchmark_all.py` writes `benchmarks/results.md` and includes explicit win
237
+ columns for NumPy, TensorFlow, PyTorch, and JAX when those libraries are
238
+ available locally.
239
+
240
+ On one Windows CPython 3.10 development run reporting `1.1.0`, TensorStudio
241
+ beat NumPy on 23 small operation benchmark cases and lost on 80
242
+ NumPy-comparable cases. Against PyTorch CPU `2.12.1+cpu`, TensorStudio won 74
243
+ local cases and lost 34. The strongest local wins were small eager operations,
244
+ small contiguous axis reductions, and the simple NumPy convolution/pooling
245
+ references where framework dispatch or Python loops dominate; larger matrix
246
+ multiplication, PyTorch convolution and pooling, larger axis reductions, larger
247
+ transcendental activations, and larger autograd workloads remain faster in
248
+ PyTorch and NumPy.
249
+ See `benchmarks/results.md` for the full table, platform details, and exact
250
+ timings.
242
251
 
243
252
  Snapshot from that local run:
244
253
 
245
- | operation | shape | TensorStudio median | NumPy median | speedup | result |
246
- |---|---:|---:|---:|---:|---|
247
- | `sigmoid` | `(1,)` | 0.0016 ms | 0.0036 ms | 2.2170x | win |
248
- | `mean` | `(1,)` | 0.0014 ms | 0.0081 ms | 5.8562x | win |
249
- | `mean` | `(8,)` | 0.0016 ms | 0.0079 ms | 5.0005x | win |
250
- | `add` | `(16384,)` | 0.0100 ms | 0.0037 ms | 0.3682x | loss |
251
- | `matmul` | `(256, 256)` | 4.1393 ms | 0.4222 ms | 0.1020x | loss |
254
+ | operation | shape | TensorStudio | NumPy | PyTorch CPU | TS vs NumPy | TS vs PyTorch |
255
+ |---|---:|---:|---:|---:|---:|---:|
256
+ | `sigmoid` | `(32,)` | 0.0017 ms | 0.0036 ms | 0.0580 ms | 2.1201x | 33.8536x |
257
+ | `mean` | `(32,)` | 0.0018 ms | 0.0078 ms | 0.0127 ms | 4.2927x | 7.0047x |
258
+ | `sum_axis1` | `(16, 16)` | 0.0021 ms | 0.0029 ms | 0.0068 ms | 1.3727x | 3.2193x |
259
+ | `chain_relu` | `(128,)` | 0.0086 ms | 0.0039 ms | 0.0559 ms | 0.4478x | 6.5042x |
260
+ | `matmul` | `(256, 256)` | 4.1154 ms | 0.3679 ms | 0.0931 ms | 0.0894x | 0.0226x |
261
+ | `conv2d_3x3_padding1` | `(1, 1, 8, 8)` | 0.1788 ms | 1.2241 ms | 0.0131 ms | 6.8478x | 0.0731x |
262
+ | `max_pool2d_2x2` | `(1, 1, 16, 16)` | 0.0146 ms | 0.2649 ms | 0.0062 ms | 18.1659x | 0.4242x |
263
+ | `avg_pool2d_2x2` | `(1, 1, 16, 16)` | 0.0139 ms | 0.5486 ms | 0.0052 ms | 39.5974x | 0.3748x |
264
+ | `elementwise_backward` | `(1024,)` | 2.3885 ms | n/a | 0.1947 ms | n/a | 0.0815x |
252
265
 
253
- Speedup is `NumPy median / TensorStudio median`, so values above `1.0x` favor
254
- TensorStudio. The matmul result is from the optimized C++ contiguous path; a
255
- pre-optimization run was about 259 ms for the same `(256, 256)` case on this
256
- machine.
266
+ Speedup is `competitor median / TensorStudio median`, so values above `1.0x`
267
+ favor TensorStudio.
257
268
 
258
- Do not treat these results as universal. TensorStudio does not currently claim
259
- to be faster than NumPy, TensorFlow, PyTorch, or JAX overall.
269
+ Do not treat these results as universal. TensorStudio does not claim to be
270
+ faster than NumPy, TensorFlow, PyTorch, or JAX overall.
260
271
 
261
272
  ## Save And Load
262
273
 
@@ -276,6 +287,7 @@ unsafe because pickle can execute arbitrary code.
276
287
 
277
288
  ```bash
278
289
  python -m pip install -e ".[dev,docs]"
290
+ python test_all.py --skip-build
279
291
  ruff check .
280
292
  mypy python/tensorstudio
281
293
  pytest -q
@@ -288,6 +300,7 @@ scikit-build-core, and C++20.
288
300
 
289
301
  ## Release Checklist
290
302
 
303
+ - `python test_all.py` passes locally.
291
304
  - `ruff check .` passes.
292
305
  - `mypy python/tensorstudio` passes.
293
306
  - `pytest -q` passes on Windows, Linux, and macOS.
@@ -312,10 +325,14 @@ tokens or print secrets.
312
325
  - CPU backend only.
313
326
  - Eager execution only.
314
327
  - No CUDA or Metal backend yet.
328
+ - No BLAS-backed matrix multiplication yet.
315
329
  - No graph compiler or distributed runtime.
316
- - No convolution layers yet.
330
+ - Convolution and pooling support are currently limited to CPU NCHW
331
+ `conv2d`, `max_pool2d`, and `avg_pool2d` style workloads.
332
+ - Reductions support all-element or single-axis reductions, not tuple-axis
333
+ reductions yet.
317
334
  - No sparse tensors or advanced indexing.
318
- - Limited dtype casting.
335
+ - Dtype casting is basic and does not include a full promotion/casting policy.
319
336
  - Experimental performance; benchmarks are local references only.
320
337
  - Pickle serialization is for trusted TensorStudio objects only.
321
338
 
@@ -323,8 +340,8 @@ tokens or print secrets.
323
340
 
324
341
  - CUDA backend
325
342
  - Graph/JIT mode
326
- - Convolution ops
327
- - Dataset utilities
343
+ - Broader convolution ops, adaptive/global pooling, and image-model examples
344
+ - Richer dataset utilities
328
345
  - Model zoo examples
329
346
  - ONNX import/export
330
347
  - Improved memory allocator
@@ -7,14 +7,12 @@
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.0.0rc2` is a release candidate for a CPU-only stable API
11
- foundation. It is eager-only, intentionally small, and not a replacement for
12
- mature ML frameworks. The final `1.0.0` version should only be tagged after the
13
- Windows, Linux, and macOS release checklist passes.
10
+ TensorStudio `1.1.0` is a CPU-only stable API foundation. It is eager-only,
11
+ intentionally small, and not a replacement for mature ML frameworks.
14
12
 
15
13
  ## Install
16
14
 
17
- From PyPI, once release-candidate wheels are published:
15
+ From PyPI:
18
16
 
19
17
  ```bash
20
18
  python -m pip install tensorstudio
@@ -96,6 +94,8 @@ d = ts.linspace(0.0, 1.0, 5)
96
94
 
97
95
  print(a.shape, a.strides, a.device, a.is_contiguous)
98
96
  print((b.clamp(0.2, 0.8) + 1).mean().item())
97
+ print(b.sum(axis=1).tolist())
98
+ print(ts.concat([b, b], axis=0).shape, b.astype("float64").dtype)
99
99
  print(c.tolist(), d.tolist())
100
100
  print(ts.zeros_like(b).shape, ts.randn_like(b, seed=11).dtype)
101
101
  ```
@@ -161,8 +161,8 @@ for features, targets in loader:
161
161
  print(features.shape, targets.shape)
162
162
  ```
163
163
 
164
- The v1 release candidate DataLoader is intentionally single-process so it works
165
- cleanly on Windows without multiprocessing setup.
164
+ The v1 DataLoader is intentionally single-process so it works cleanly on
165
+ Windows without multiprocessing setup.
166
166
 
167
167
  ## Performance
168
168
 
@@ -171,34 +171,45 @@ performance is still experimental. Benchmarks live in `benchmarks/` and can be
171
171
  run locally:
172
172
 
173
173
  ```bash
174
+ python benchmark_all.py
174
175
  python benchmarks/benchmark_report.py
175
176
  ```
176
177
 
177
- On one Windows CPython 3.10 run for `1.0.0rc2`, TensorStudio beat NumPy on 11
178
- small activation/reduction benchmark cases and lost on 78 NumPy-comparable
179
- cases. The strongest local wins were small `sigmoid`, `sum`, and `mean` cases;
180
- medium elementwise operations and matrix multiplication remain slower than
181
- NumPy. The C++ contiguous matmul fast path is much faster than the original
182
- naive storage-access loop, but it is not a BLAS replacement. See
183
- `benchmarks/results.md` for the full table, platform details, and exact timings.
178
+ `benchmark_all.py` writes `benchmarks/results.md` and includes explicit win
179
+ columns for NumPy, TensorFlow, PyTorch, and JAX when those libraries are
180
+ available locally.
181
+
182
+ On one Windows CPython 3.10 development run reporting `1.1.0`, TensorStudio
183
+ beat NumPy on 23 small operation benchmark cases and lost on 80
184
+ NumPy-comparable cases. Against PyTorch CPU `2.12.1+cpu`, TensorStudio won 74
185
+ local cases and lost 34. The strongest local wins were small eager operations,
186
+ small contiguous axis reductions, and the simple NumPy convolution/pooling
187
+ references where framework dispatch or Python loops dominate; larger matrix
188
+ multiplication, PyTorch convolution and pooling, larger axis reductions, larger
189
+ transcendental activations, and larger autograd workloads remain faster in
190
+ PyTorch and NumPy.
191
+ See `benchmarks/results.md` for the full table, platform details, and exact
192
+ timings.
184
193
 
185
194
  Snapshot from that local run:
186
195
 
187
- | operation | shape | TensorStudio median | NumPy median | speedup | result |
188
- |---|---:|---:|---:|---:|---|
189
- | `sigmoid` | `(1,)` | 0.0016 ms | 0.0036 ms | 2.2170x | win |
190
- | `mean` | `(1,)` | 0.0014 ms | 0.0081 ms | 5.8562x | win |
191
- | `mean` | `(8,)` | 0.0016 ms | 0.0079 ms | 5.0005x | win |
192
- | `add` | `(16384,)` | 0.0100 ms | 0.0037 ms | 0.3682x | loss |
193
- | `matmul` | `(256, 256)` | 4.1393 ms | 0.4222 ms | 0.1020x | loss |
196
+ | operation | shape | TensorStudio | NumPy | PyTorch CPU | TS vs NumPy | TS vs PyTorch |
197
+ |---|---:|---:|---:|---:|---:|---:|
198
+ | `sigmoid` | `(32,)` | 0.0017 ms | 0.0036 ms | 0.0580 ms | 2.1201x | 33.8536x |
199
+ | `mean` | `(32,)` | 0.0018 ms | 0.0078 ms | 0.0127 ms | 4.2927x | 7.0047x |
200
+ | `sum_axis1` | `(16, 16)` | 0.0021 ms | 0.0029 ms | 0.0068 ms | 1.3727x | 3.2193x |
201
+ | `chain_relu` | `(128,)` | 0.0086 ms | 0.0039 ms | 0.0559 ms | 0.4478x | 6.5042x |
202
+ | `matmul` | `(256, 256)` | 4.1154 ms | 0.3679 ms | 0.0931 ms | 0.0894x | 0.0226x |
203
+ | `conv2d_3x3_padding1` | `(1, 1, 8, 8)` | 0.1788 ms | 1.2241 ms | 0.0131 ms | 6.8478x | 0.0731x |
204
+ | `max_pool2d_2x2` | `(1, 1, 16, 16)` | 0.0146 ms | 0.2649 ms | 0.0062 ms | 18.1659x | 0.4242x |
205
+ | `avg_pool2d_2x2` | `(1, 1, 16, 16)` | 0.0139 ms | 0.5486 ms | 0.0052 ms | 39.5974x | 0.3748x |
206
+ | `elementwise_backward` | `(1024,)` | 2.3885 ms | n/a | 0.1947 ms | n/a | 0.0815x |
194
207
 
195
- Speedup is `NumPy median / TensorStudio median`, so values above `1.0x` favor
196
- TensorStudio. The matmul result is from the optimized C++ contiguous path; a
197
- pre-optimization run was about 259 ms for the same `(256, 256)` case on this
198
- machine.
208
+ Speedup is `competitor median / TensorStudio median`, so values above `1.0x`
209
+ favor TensorStudio.
199
210
 
200
- Do not treat these results as universal. TensorStudio does not currently claim
201
- to be faster than NumPy, TensorFlow, PyTorch, or JAX overall.
211
+ Do not treat these results as universal. TensorStudio does not claim to be
212
+ faster than NumPy, TensorFlow, PyTorch, or JAX overall.
202
213
 
203
214
  ## Save And Load
204
215
 
@@ -218,6 +229,7 @@ unsafe because pickle can execute arbitrary code.
218
229
 
219
230
  ```bash
220
231
  python -m pip install -e ".[dev,docs]"
232
+ python test_all.py --skip-build
221
233
  ruff check .
222
234
  mypy python/tensorstudio
223
235
  pytest -q
@@ -230,6 +242,7 @@ scikit-build-core, and C++20.
230
242
 
231
243
  ## Release Checklist
232
244
 
245
+ - `python test_all.py` passes locally.
233
246
  - `ruff check .` passes.
234
247
  - `mypy python/tensorstudio` passes.
235
248
  - `pytest -q` passes on Windows, Linux, and macOS.
@@ -254,10 +267,14 @@ tokens or print secrets.
254
267
  - CPU backend only.
255
268
  - Eager execution only.
256
269
  - No CUDA or Metal backend yet.
270
+ - No BLAS-backed matrix multiplication yet.
257
271
  - No graph compiler or distributed runtime.
258
- - No convolution layers yet.
272
+ - Convolution and pooling support are currently limited to CPU NCHW
273
+ `conv2d`, `max_pool2d`, and `avg_pool2d` style workloads.
274
+ - Reductions support all-element or single-axis reductions, not tuple-axis
275
+ reductions yet.
259
276
  - No sparse tensors or advanced indexing.
260
- - Limited dtype casting.
277
+ - Dtype casting is basic and does not include a full promotion/casting policy.
261
278
  - Experimental performance; benchmarks are local references only.
262
279
  - Pickle serialization is for trusted TensorStudio objects only.
263
280
 
@@ -265,8 +282,8 @@ tokens or print secrets.
265
282
 
266
283
  - CUDA backend
267
284
  - Graph/JIT mode
268
- - Convolution ops
269
- - Dataset utilities
285
+ - Broader convolution ops, adaptive/global pooling, and image-model examples
286
+ - Richer dataset utilities
270
287
  - Model zoo examples
271
288
  - ONNX import/export
272
289
  - Improved memory allocator
@@ -0,0 +1,50 @@
1
+ from __future__ import annotations
2
+
3
+ import argparse
4
+ from pathlib import Path
5
+
6
+ from benchmarks.benchmark_report import run_benchmarks
7
+
8
+ ALL_SECTIONS = {
9
+ "elementwise",
10
+ "matmul",
11
+ "conv2d",
12
+ "pooling",
13
+ "reductions",
14
+ "activations",
15
+ "autograd",
16
+ "training_loop",
17
+ }
18
+
19
+
20
+ def main() -> None:
21
+ parser = argparse.ArgumentParser(description="Run every TensorStudio benchmark section.")
22
+ parser.add_argument(
23
+ "--section",
24
+ action="append",
25
+ choices=sorted(ALL_SECTIONS),
26
+ help="Run only the selected section. Repeat for multiple sections.",
27
+ )
28
+ parser.add_argument(
29
+ "--output",
30
+ type=Path,
31
+ default=Path("benchmarks") / "results.md",
32
+ help="Markdown report path. Defaults to benchmarks/results.md.",
33
+ )
34
+ parser.add_argument(
35
+ "--print",
36
+ action="store_true",
37
+ help="Print the full Markdown report after writing it.",
38
+ )
39
+ args = parser.parse_args()
40
+
41
+ selected_sections = set(args.section or ALL_SECTIONS)
42
+ report = run_benchmarks(selected_sections, args.output)
43
+ if args.print:
44
+ print(report)
45
+ else:
46
+ print(f"Wrote benchmark report to {args.output}")
47
+
48
+
49
+ if __name__ == "__main__":
50
+ main()
@@ -0,0 +1,2 @@
1
+ """Local TensorStudio benchmark helpers."""
2
+
@@ -0,0 +1,8 @@
1
+ from __future__ import annotations
2
+
3
+ from pathlib import Path
4
+
5
+ from benchmark_report import run_benchmarks
6
+
7
+ if __name__ == "__main__":
8
+ print(run_benchmarks({"conv2d"}, Path(__file__).with_name("results_conv2d.md")))
@@ -0,0 +1,8 @@
1
+ from __future__ import annotations
2
+
3
+ from pathlib import Path
4
+
5
+ from benchmark_report import run_benchmarks
6
+
7
+ if __name__ == "__main__":
8
+ print(run_benchmarks({"pooling"}, Path(__file__).with_name("results_pooling.md")))