Download the PHP package php-io-extensions/cuda without Composer
On this page you can find all versions of the php package php-io-extensions/cuda. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download php-io-extensions/cuda
More information about php-io-extensions/cuda
Files in php-io-extensions/cuda
Package cuda
Short Description PHP-Controllable CUDA Runtime + OpenGL interop extension
License MIT
Informations about the package cuda
php-cuda
PHP extension for the CUDA Runtime API plus CUDA–OpenGL interop — built with Zephir, installable via PHP PIE.
cuda exposes CUDA Runtime device, memory, stream, and event APIs to PHP 8.2+
as namespaced static methods under Cuda\Cuda\Cuda, plus thin data objects
(CudaDevicePtr, CudaHostPtr, CudaStream, CudaEvent, CudaGraphicsResource)
that store opaque native pointers in public fd.
Cuda\Cuda\CudaGL adds in-package CUDA–GL interop (PBO/texture register/map),
an embedded plasma PTX kernel (no nvcc for consumers), and minimal present
helpers. Windowing stays in peer extensions (sdl3 / glfw).
This is not CudaGraphics-PHP
(custom draw/particle kernels). Token constants (cudaSuccess, memcpy kinds, …)
belong in a companion microscrap package, not in this extension.
Requirements
| Component | Minimum version | Notes |
|---|---|---|
| PHP | 8.2 | ZTS and NTS builds both supported. |
| CUDA Toolkit | 12.0+ | Runtime + Driver + cuda_gl_interop.h (Jetson CUDA 13.2 OK). |
| OpenGL | desktop GL | Linked as -lGL for interop/present. |
| OS | Linux / Jetson | aarch64 + x86_64 Linux. Darwin/Windows not supported. |
| Compiler | C11 toolchain | gcc or clang. |
php-dev / phpize |
matches PHP | Required for any build path that is not PIE. |
nvcc |
maintainers only | Regenerating embedded PTX — not required for PIE installs. |
Installation
Via PHP PIE (recommended)
PIE builds the committed ext/ tree with --enable-cuda. No Zephir. No nvcc.
Platform installer (Jetson / JetPack)
Manual build with Zephir (maintainers)
Verifying the install
Quick start
Examples
API surface
| Class | Namespace | Role |
|---|---|---|
Cuda |
Cuda\Cuda |
Static Runtime API (device, error, memory, stream, event) |
CudaGL |
Cuda\Cuda |
CUDA–GL interop, embedded plasma launch, present helpers |
CudaDevicePtr |
Cuda\Cuda |
Device allocation DTO (fd, size) |
CudaHostPtr |
Cuda\Cuda |
Pinned host allocation DTO (fd, size) |
CudaStream |
Cuda\Cuda |
Stream DTO (fd, flags) |
CudaEvent |
Cuda\Cuda |
Event DTO (fd, flags) |
CudaGraphicsResource |
Cuda\Cuda |
Interop resource DTO (fd, glBuffer, size) |
fd === 0 means none / freed. Callers own allocations until cudaFree /
cudaFreeHost / cudaStreamDestroy / cudaEventDestroy / CudaGL::unregister.
Do not cudaFree a device pointer obtained from CudaGL::map.
IDE stubs: ide/0.7.4/Cuda/.
License
MIT © Project Saturn Studios, LLC.