MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
MyCaffe.common.GPUParams< T > Class Template Reference

The GPUParams contains the connection to the low-level Cuda, and the stream associated with this instance. More...

Inheritance diagram for MyCaffe.common.GPUParams< T >:
MyCaffe.common.Params< T > MyCaffe.common.NCCL< T >

Public Member Functions

 GPUParams (CudaDnn< T > cuda, Log log, Solver< T > root_solver, int nDeviceID)
 The GPUParams constructor. More...
 
void Dispose ()
 Release all GPU and Host resources used. More...
 
void SynchronizeStream ()
 Synchronize with the Cuda stream. More...
 
void Configure (Solver< T > solver)
 Configure the GPU Params by copying the Solver training Net parameters into the data and diff buffers. More...
 
void apply_buffers (BlobCollection< T > rgBlobs, long hBuffer, long lTotalSize, Op op)
 Transfer between the data/diff buffers and a collection of Blobs (e.g. the learnable parameters). More...
 
- Public Member Functions inherited from MyCaffe.common.Params< T >
 Params (Solver< T > root_solver)
 The Param constructor. More...
 

Protected Attributes

CudaDnn< T > m_cuda
 The instance of CudaDnn that provides the connection to Cuda. More...
 
Log m_log
 The Log used for output. More...
 
long m_hStream
 The handle to the Cuda stream used for synchronization. More...
 
- Protected Attributes inherited from MyCaffe.common.Params< T >
long m_lCount
 size of the buffers (in items). More...
 
long m_lExtra
 size of the padding added to the memory buffers. More...
 
long m_hData
 Handle to GPU memory containing the Net parameters. More...
 
long m_hDiff
 Handle to GPU memory containing the Net gradient. More...
 
int m_nDeviceID
 The Device ID. More...
 

Additional Inherited Members

- Properties inherited from MyCaffe.common.Params< T >
long count [get]
 Returns the size of the buffers (in items). More...
 
long data [get]
 Returns the handle to the GPU memory containing the Net parameters. More...
 
long diff [get]
 Returns the handle to the GPU memory containing the Net gradients. More...
 

Detailed Description

The GPUParams contains the connection to the low-level Cuda, and the stream associated with this instance.

Template Parameters
TSpecifies the base type float or double. Using float is recommended to conserve GPU memory.

Definition at line 103 of file Parallel.cs.

Constructor & Destructor Documentation

◆ GPUParams()

MyCaffe.common.GPUParams< T >.GPUParams ( CudaDnn< T >  cuda,
Log  log,
Solver< T >  root_solver,
int  nDeviceID 
)

The GPUParams constructor.

Parameters
cudaSpecifies the CudaDnn connection to Cuda.
logSpecifies the Log for output.
root_solverSpecifies the root Solver.
nDeviceIDSpecifies the device ID to use for this instance.

Definition at line 144 of file Parallel.cs.

Member Function Documentation

◆ apply_buffers()

void MyCaffe.common.GPUParams< T >.apply_buffers ( BlobCollection< T >  rgBlobs,
long  hBuffer,
long  lTotalSize,
Op  op 
)

Transfer between the data/diff buffers and a collection of Blobs (e.g. the learnable parameters).

Parameters
rgBlobsSpecifies the collection of Blobs to transfer data with.
hBufferSpecifies a handle to the memory on the GPU to transfer with the Blob collection.
lTotalSizeSpecifies the number of items to transfer.
opSpecifies the type of transfer to perform.

Definition at line 221 of file Parallel.cs.

◆ Configure()

void MyCaffe.common.GPUParams< T >.Configure ( Solver< T >  solver)

Configure the GPU Params by copying the Solver training Net parameters into the data and diff buffers.

Parameters
solver

Definition at line 207 of file Parallel.cs.

◆ Dispose()

void MyCaffe.common.GPUParams< T >.Dispose ( )

Release all GPU and Host resources used.

Definition at line 174 of file Parallel.cs.

◆ SynchronizeStream()

void MyCaffe.common.GPUParams< T >.SynchronizeStream ( )

Synchronize with the Cuda stream.

Definition at line 198 of file Parallel.cs.

Member Data Documentation

◆ m_cuda

CudaDnn<T> MyCaffe.common.GPUParams< T >.m_cuda
protected

The instance of CudaDnn that provides the connection to Cuda.

Definition at line 108 of file Parallel.cs.

◆ m_hStream

long MyCaffe.common.GPUParams< T >.m_hStream
protected

The handle to the Cuda stream used for synchronization.

Definition at line 116 of file Parallel.cs.

◆ m_log

Log MyCaffe.common.GPUParams< T >.m_log
protected

The Log used for output.

Definition at line 112 of file Parallel.cs.


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