CuAllocatorOptions Struct Reference

#include <cu-allocator.h>

Collaboration diagram for CuAllocatorOptions:

Public Member Functions

 CuAllocatorOptions ()
 
void Register (OptionsItf *po)
 
void Check ()
 

Public Attributes

bool cache_memory
 
BaseFloat memory_proportion
 
int32 num_subregions
 

Detailed Description

Definition at line 48 of file cu-allocator.h.

Constructor & Destructor Documentation

◆ CuAllocatorOptions()

CuAllocatorOptions ( )
inline

Definition at line 67 of file cu-allocator.h.

Member Function Documentation

◆ Check()

void Check ( )
inline

Definition at line 79 of file cu-allocator.h.

References kaldi::g_allocator_options, and KALDI_ASSERT.

79  {
80  // don't let it get too close to 1;
82  }
#define KALDI_ASSERT(cond)
Definition: kaldi-error.h:185

◆ Register()

void Register ( OptionsItf po)
inline

Definition at line 70 of file cu-allocator.h.

References OptionsItf::Register().

Referenced by kaldi::RegisterCuAllocatorOptions().

70  {
71  po->Register("cuda-cache-memory", &cache_memory, "True if you want "
72  "to use the caching allocator. Set this to false only if you "
73  "want to use cuda-memcheck or cuda-gdb; it will be slower.");
74  po->Register("cuda-memory-proportion", &memory_proportion,
75  "Proportion of the GPU device memory that the allocator "
76  "should allocate at the start");
77  }

Member Data Documentation

◆ cache_memory

bool cache_memory

Definition at line 54 of file cu-allocator.h.

◆ memory_proportion

BaseFloat memory_proportion

Definition at line 59 of file cu-allocator.h.

◆ num_subregions

int32 num_subregions

Definition at line 65 of file cu-allocator.h.


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