mxnet
Public Member Functions | List of all members
mxnet::SyncedGPUAuxStream Class Reference

Provides automatic coordination of an auxilary stream with a primary one. This object, upon construction, prepares an aux stream for use by syncing it with enqueued primary-stream work. Object destruction will sync again so future primary-stream work will wait on enqueued aux-stream work. If MXNET_GPU_WORKER_NSTREAMS == 1, then this defaults simply: the primary stream will equal the aux stream and the syncs will be executed as nops. See ./src/operator/cudnn/cudnn_convolution-inl.h for a usage example. More...

#include <base.h>

Collaboration diagram for mxnet::SyncedGPUAuxStream:
Collaboration graph

Public Member Functions

 SyncedGPUAuxStream (GPUAuxStream *gpu_aux_stream)
 constructor. More...
 
 ~SyncedGPUAuxStream ()
 destructor More...
 
 SyncedGPUAuxStream (const SyncedGPUAuxStream &)=delete
 copy constructor deleted to prevent unexpected synchronizations. More...
 
void operator= (const SyncedGPUAuxStream &)=delete
 copy assignment operator deleted to prevent unexpected synchronizations. More...
 
 SyncedGPUAuxStream (SyncedGPUAuxStream &&)=default
 move constructor permitted as alternative to copying. More...
 
SyncedGPUAuxStreamoperator= (SyncedGPUAuxStream &&)=default
 move assignment operator permitted as alternative to copy assignment. More...
 
mshadow::Stream< gpu > * GetStream () const
 Getter for underlying mshadow::Stream<gpu>. More...
 

Detailed Description

Provides automatic coordination of an auxilary stream with a primary one. This object, upon construction, prepares an aux stream for use by syncing it with enqueued primary-stream work. Object destruction will sync again so future primary-stream work will wait on enqueued aux-stream work. If MXNET_GPU_WORKER_NSTREAMS == 1, then this defaults simply: the primary stream will equal the aux stream and the syncs will be executed as nops. See ./src/operator/cudnn/cudnn_convolution-inl.h for a usage example.

Constructor & Destructor Documentation

mxnet::SyncedGPUAuxStream::SyncedGPUAuxStream ( GPUAuxStream gpu_aux_stream)
inlineexplicit

constructor.

Parameters
gpu_aux_streamauxilary gpu stream that is managed by this RAII object.
mxnet::SyncedGPUAuxStream::~SyncedGPUAuxStream ( )
inline

destructor

mxnet::SyncedGPUAuxStream::SyncedGPUAuxStream ( const SyncedGPUAuxStream )
delete

copy constructor deleted to prevent unexpected synchronizations.

mxnet::SyncedGPUAuxStream::SyncedGPUAuxStream ( SyncedGPUAuxStream &&  )
default

move constructor permitted as alternative to copying.

Member Function Documentation

mshadow::Stream<gpu>* mxnet::SyncedGPUAuxStream::GetStream ( ) const
inline

Getter for underlying mshadow::Stream<gpu>.

void mxnet::SyncedGPUAuxStream::operator= ( const SyncedGPUAuxStream )
delete

copy assignment operator deleted to prevent unexpected synchronizations.

SyncedGPUAuxStream& mxnet::SyncedGPUAuxStream::operator= ( SyncedGPUAuxStream &&  )
default

move assignment operator permitted as alternative to copy assignment.


The documentation for this class was generated from the following file: