latest (dev)
Copy
Latest development documentation · Updated 2026-10-08
tensorplay.accelerator
TensorPlay can run on CPUs and on accelerators such as GPUs. The
tensorplay.accelerator module exposes a small, device-agnostic surface for
asking which accelerator is currently active, so code that needs to know where
tensors live does not have to special-case each backend.
import tensorplay as tp
dev = tp.accelerator.current_accelerator()
print(dev) # e.g. 'cuda:0', or None on a CPU-only machine
Functions
The accelerator device selected at build time, if any. |
|
Number of devices for the current accelerator, or zero without one. |
|
Whether an accelerator was built and at least one device is visible. |
|
Index of the currently selected accelerator device. |
|
Select the accelerator device by index; negative indices are no-ops. |
|
Capability map for an accelerator device. |
|
Wait for all work on an accelerator device to complete. |
|
Capture/replay graph on the current accelerator device. |
Submodules
Device-agnostic memory queries for the current accelerator. |
|
Device-agnostic random-number helpers for the current accelerator. |
|
Device-agnostic capture/replay graphs for the current accelerator. |
Where to go next
CUDA semantics — the CUDA backend the accelerator is most often backed by, and its device-management functions.
Device concepts — how device objects are spelled and compared.
Help improve this page
Found an error, an unclear step, or a missing example?
tensorplay._stax
tensorplay._stax is TensorPlay’s private compilation package. It owns capture orchestration, specialization guards, backend registration, code caching, and the native Stax and TVM lowering implementations.
tensorplay.audio
tensorplay.audio is the audio I/O and processing toolkit of TensorPlay. The listing below is a static overview; backend availability depends on installed optional dependencies, so this page intentionally does not use aut

