OmniSciDB  c07336695a
LowGpuBufferMemory Class Reference
+ Inheritance diagram for LowGpuBufferMemory:
+ Collaboration diagram for LowGpuBufferMemory:

Public Member Functions

void SetUp () override
 
void TearDown () override
 

Private Attributes

size_t min_mem_allocation_state_
 
bool allow_cpu_retry_state_
 

Detailed Description

Definition at line 95 of file BumpAllocatorTest.cpp.

Member Function Documentation

◆ SetUp()

void LowGpuBufferMemory::SetUp ( )
inlineoverride

Definition at line 97 of file BumpAllocatorTest.cpp.

References CPU, g_allow_cpu_retry, g_min_memory_allocation_size, anonymous_namespace{BumpAllocatorTest.cpp}::g_num_gpus, QueryRunner::QueryRunner::get(), run_multiple_agg(), QueryRunner::QueryRunner::runDDLStatement(), and to_string().

97  {
98  const std::string drop_table_stmt{"DROP TABLE IF EXISTS test;"};
99  QR::get()->runDDLStatement(drop_table_stmt);
100  const std::string create_table_stmt{
101  "CREATE TABLE test (x INT, y BIGINT) WITH (FRAGMENT_SIZE=32);"};
102  QR::get()->runDDLStatement(create_table_stmt);
103 
104  // Insert enough data to just barely overflow
105  for (size_t i = 0; i < 64 * g_num_gpus; i++) {
106  const std::string insert_stmt{"INSERT INTO test VALUES (" + std::to_string(i) +
107  ", " + std::to_string(i) + ");"};
109  }
110 
111  // Min memory allocation size set to 2GB to guarantee OOM during allocation
113  g_min_memory_allocation_size = 2000000000;
114 
115  // CPU retry off to disable automatic punt to CPU
117  g_allow_cpu_retry = false;
118  }
size_t g_min_memory_allocation_size
Definition: Execute.cpp:93
bool g_allow_cpu_retry
Definition: Execute.cpp:72
std::string to_string(char const *&&v)
virtual void runDDLStatement(const std::string &)
static QueryRunner * get()
Definition: QueryRunner.h:115
TQueryResult run_multiple_agg(std::string sql)
+ Here is the call graph for this function:

◆ TearDown()

void LowGpuBufferMemory::TearDown ( )
inlineoverride

Definition at line 120 of file BumpAllocatorTest.cpp.

References g_allow_cpu_retry, anonymous_namespace{BumpAllocatorTest.cpp}::g_keep_data, g_min_memory_allocation_size, QueryRunner::QueryRunner::get(), and QueryRunner::QueryRunner::runDDLStatement().

120  {
121  if (!g_keep_data) {
122  const std::string drop_table_stmt{"DROP TABLE IF EXISTS test;"};
123  QR::get()->runDDLStatement(drop_table_stmt);
124  }
125 
128  }
size_t g_min_memory_allocation_size
Definition: Execute.cpp:93
bool g_allow_cpu_retry
Definition: Execute.cpp:72
virtual void runDDLStatement(const std::string &)
static QueryRunner * get()
Definition: QueryRunner.h:115
+ Here is the call graph for this function:

Member Data Documentation

◆ allow_cpu_retry_state_

bool LowGpuBufferMemory::allow_cpu_retry_state_
private

Definition at line 132 of file BumpAllocatorTest.cpp.

◆ min_mem_allocation_state_

size_t LowGpuBufferMemory::min_mem_allocation_state_
private

Definition at line 131 of file BumpAllocatorTest.cpp.


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