NeuZephyr
Simple DL Framework
nz::cuStrm Namespace Reference

Provides core components for CUDA stream and event lifecycle management in GPU computing environments. More...

Classes

class  EventPool
 Internal event management system for CUDA stream synchronization (Part of StreamManager) More...
 
class  StreamManager
 Centralized CUDA stream and resource management system with automatic dependency tracking. More...
 

Detailed Description

Provides core components for CUDA stream and event lifecycle management in GPU computing environments.

The nz::cuStrm namespace implements advanced stream resource management and operation scheduling mechanisms for CUDA-enabled devices. It serves as the central coordination layer for GPU operation execution and synchronization in the nz project.

Key components within this namespace include:

  • StreamManager: Central controller class that:
    • Hosts all CUDA kernel executions through managed streams
    • Implements intelligent stream allocation policies (Round-Robin, Priority-based, etc.)
    • Maintains operation dependency graphs through event tracking
    • Provides automatic synchronization primitives
  • EventPool: Internal event management system (see EventPool.cuh documentation)

The architecture is designed to:

  • Guarantee CUDA stream usage safety in multi-threaded environments
  • Prevent resource contention through stream/event ownership management
  • Enable fine-grained operation sequencing via dependency tracking
Note
  1. All CUDA operations should be dispatched through StreamManager interfaces
  2. Manual stream creation/destruction is strictly prohibited in this paradigm
  3. Event synchronization must use the provided abstraction layers
Warning
Direct CUDA stream/event API calls outside this namespace may cause:
  • Undefined synchronization behavior
  • Resource ownership conflicts
  • Memory consistency issues
Author
Mgepahmge(https://github.com/Mgepahmge)
Date
2024/11/29