Repository navigation
FAQ
Answers to the questions that come up most often, from the project docs and issue tracker. For anything not covered here, try Discussions or the Discord.
If you see cuda runtime error(2): out of memory, check these common causes:
-
Accumulating autograd history in the training loop. Keep a running scalar instead of a graph-backed tensor:
total_loss += float(loss) # good: detaches from the graph
-
Holding references you no longer need.
deltensors as soon as they are not required. - Overly long RNN sequences. Use truncated backpropagation through time.
-
Oversized Linear layers. A
Linear(n, m)weight costs O(nm) memory — large hidden sizes add up fast.
Windows: A single input file is required during compilation. On Windows the build forces the Ninja generator; other generators feed source groups to the compiler in a form it cannot parse. Use the default configuration rather than overriding the generator.
Editable install re-runs on every import. Editable installs use redirect mode with rebuild disabled — a rebuild on every import would stall import tensorplay. Rebuild explicitly when you change C++ code:
pip install -e . --no-build-isolationCUDA or ROCm? The two GPU backends are mutually exclusive — pick one per build. Set USE_CUDA=OFF for a CPU-only build or USE_ROCM=ON for AMD/HIP. CUDA is auto-detected when nvcc is on the PATH.
Compile is too slow / machine runs out of memory. Cap parallelism with MAX_JOBS, especially when building CUDA kernels.
Run the Python test suite against an installed (or in-place built) package:
pytest test/ # full suite
pytest test/test_tensor_basic.py # single file
pytest --reruns 2 test/test_something.py # flaky testsThe C++ test suite is built with BUILD_TESTS=ON and lives under test/cpp/.
- The package version lives in
version.txt(single source of truth); development installs carry a+git<sha>suffix. - Stable releases are tagged
vMAJOR.MINOR.0; release candidates useX.Y.0rcN; nightlies useX.Y.0.dev<UTC date>with+cpu/+cuXXXlocal tags. - CPU wheels publish to PyPI; CUDA wheels publish to the TensorPlay wheel index with a PEP 503 layout.
- Issue tracker — bug reports, feature requests, RFCs
- Discussions — usage questions and ideas
- Discord — real-time community help
- Email: feedback@tensorplay.cn
A learner-friendly, DIY-ready deep learning framework.
Documentation · Getting Started · Issues · Discussions · Discord · Releases
© 2026 TensorPlay contributors · Licensed under Apache 2.0
Getting started
Project
Deep dives
Community
Core components
-
tensorplay— Python API -
p10— C++ core -
tpx— autograd -
stax— JIT compiler