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

The CudaDnnMemoryTracker is used for diagnostics in that it helps estimate the amount of memory that a Net will use. More...

Public Member Functions

 CudaDnnMemoryTracker (bool bEnableMemoryTrace=false)
 The CudaDnnMemoryTracker constructor. More...
 
long AllocMemory (long hKernel, int nDeviceID, long hMemory, ulong lSize, bool bHalf)
 Simulate a memory allocation. More...
 
void FreeMemory (long hKernel, int nDeviceID, long hMemory)
 Simulate a memory free. More...
 

Properties

bool EnableMemoryTrace [getset]
 Enable/disable the memory trace - this feature is only available in debug builds. More...
 
ulong? TotalItemsAllocated [get]
 Returns the total number of items allocated. More...
 
ulong TotalMemoryUsed [get]
 Returns the total amount of memory used (in bytes). More...
 
string TotalMemoryUsedText [get]
 Returns a text string describing the total amount of memory used (in bytes). More...
 

Detailed Description

The CudaDnnMemoryTracker is used for diagnostics in that it helps estimate the amount of memory that a Net will use.

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

Definition at line 14 of file CudaDnnMemoryTracker.cs.

Constructor & Destructor Documentation

◆ CudaDnnMemoryTracker()

MyCaffe.common.CudaDnnMemoryTracker< T >.CudaDnnMemoryTracker ( bool  bEnableMemoryTrace = false)

The CudaDnnMemoryTracker constructor.

Parameters
bEnableMemoryTraceOptionally, specifies to enable the memory trace (only supported in debug builds).

Definition at line 23 of file CudaDnnMemoryTracker.cs.

Member Function Documentation

◆ AllocMemory()

long MyCaffe.common.CudaDnnMemoryTracker< T >.AllocMemory ( long  hKernel,
int  nDeviceID,
long  hMemory,
ulong  lSize,
bool  bHalf 
)

Simulate a memory allocation.

Parameters
hKernelSpecifies the CudaDnn kernel that holds the allocated memory.
nDeviceIDSpecifies the CudaDnn device ID on which the memory was allocated.
hMemorySpecifies the CudaDnn handle to the memory.
lSizeSpecifies the size of the memory (in items).
bHalfSpecifies whether or not half memory is used.
Returns

Definition at line 37 of file CudaDnnMemoryTracker.cs.

◆ FreeMemory()

void MyCaffe.common.CudaDnnMemoryTracker< T >.FreeMemory ( long  hKernel,
int  nDeviceID,
long  hMemory 
)

Simulate a memory free.

Parameters
hKernelSpecifies the CudaDnn kernel that holds the allocated memory.
nDeviceIDSpecifies the CudaDnn device ID on which the memory was allocated.
hMemorySpecifies the CudaDnn handle to the memory.

Definition at line 62 of file CudaDnnMemoryTracker.cs.

Property Documentation

◆ EnableMemoryTrace

bool MyCaffe.common.CudaDnnMemoryTracker< T >.EnableMemoryTrace
getset

Enable/disable the memory trace - this feature is only available in debug builds.

Definition at line 81 of file CudaDnnMemoryTracker.cs.

◆ TotalItemsAllocated

ulong? MyCaffe.common.CudaDnnMemoryTracker< T >.TotalItemsAllocated
get

Returns the total number of items allocated.

Definition at line 90 of file CudaDnnMemoryTracker.cs.

◆ TotalMemoryUsed

ulong MyCaffe.common.CudaDnnMemoryTracker< T >.TotalMemoryUsed
get

Returns the total amount of memory used (in bytes).

Definition at line 112 of file CudaDnnMemoryTracker.cs.

◆ TotalMemoryUsedText

string MyCaffe.common.CudaDnnMemoryTracker< T >.TotalMemoryUsedText
get

Returns a text string describing the total amount of memory used (in bytes).

Definition at line 123 of file CudaDnnMemoryTracker.cs.


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