meshd's CUDA: a primary or green context, eager module loading, the pinned mailbox, cubin modules, streams and resident-kernel launches
$ sexc add @ajax/mesh-cuda- total 3
- drwxr-xr-x-../
- drwxr-xr-x-Oct 27 02:56v/# 1 version
- drwxr-xr-x-Oct 27 02:56files/# the files of 0.1.0
- latest
- 0.1.0, published Oct 27 02:56 by ajax
- owners
- ajax
- license
- MIT
- dependencies
- @ajax/cuda-driver ^0.1.0, @ajax/mesh-text ^0.1.0, @ajax/mesh-abi-base ^0.1.0, @ajax/cuda-driver-fake ^0.1.0, @ajax/mesh-check ^0.1.0
- dependents
- @ajax/mesh-mps, @ajax/mesh-mps-worker, @ajax/meshd
- keywords
- mesh alphaos cuda gpu context kernel
- homepage
- https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/mesh-cuda
- repository
- https://github.com/thomasdavis/alpha-c-mesh
1# @ajax/mesh-cuda 2 3meshd's CUDA: `CUDA_MODULE_LOADING=EAGER` (refusing anything else), the per-machine libcuda override (`--cuda-lib` / `MESH_CUDA_LIB`, re-exec with `LD_LIBRARY_PATH`, checked in `/proc/self/maps`), device 0 with a primary or green context, the per-block limits and register caps of multi-warp nodes, the pinned mailbox (`cuMemHostRegister` DEVICEMAP), cubin modules with their launch shape, scratch memory zeroed on a stream of its own, module globals, occupancy, streams, launches, queries and unloads. 4 5## Ported from 6 7[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT): crates/mesh-host/src/cuda.rs. 8 9## Tests 10 11`tests/cuda.c`, against @ajax/cuda-driver-fake: eager-loading refusals, primary and green contexts, register caps, limit messages, a module's whole life (shape opt-in, zeroed scratch, `MESH_RT_ABI`, occupancy, a launch whose fake kernel writes the mailbox, query, unload) and the driver's error names. 12 13## Licence 14 15MIT. See the repository's LICENSE.