docsapi referencedarkforest-cuda-stream-cuda_synchronize
API Referencecrate: darkforest-cudasince v0.1.0-alpha

cuda_synchronize

Blocks host thread until stream completes all enqueued operations.

cuda_synchronize

darkforest-cuda module: stream since v0.1.0-alpha

Signature

rust
pub fn cuda_synchronize(stream: &CudaStream) -> Result<(), CudaError>

Overview

Blocks host thread until stream completes all enqueued operations.

Invariants & Design Principles

  • Invariant: Adheres strictly to Dark Forest 64-byte alignment and strided memory invariants.
  • Invariant: Verified via unit tests, Miri memory model, and PyTorch cross-checks.

Usage Example

rust
// Example calling cuda_synchronize
let _res = darkforest_cuda::stream::cuda_synchronize();

Related Components