OmniSciDB
a5dc49c757
|
#include <TreeModelPredictionMgr.h>
Public Member Functions | |
TreeModelPredictionMgr (const Data_Namespace::MemoryLevel memory_level, Executor *executor, const std::vector< std::vector< DecisionTreeEntry >> &decision_trees, const std::vector< int64_t > &decision_tree_offsets, const bool compute_avg) | |
~TreeModelPredictionMgr () | |
llvm::Value * | codegen (const std::vector< llvm::Value * > ®ressor_inputs, const CompilationOptions &co) const |
Private Member Functions | |
void | allocateAndPopulateHostBuffers (const std::vector< std::vector< DecisionTreeEntry >> &decision_trees, const std::vector< int64_t > &decision_tree_offsets) |
void | createKernelBuffers () |
Private Attributes | |
const Data_Namespace::MemoryLevel | memory_level_ |
Executor * | executor_ |
Data_Namespace::DataMgr * | data_mgr_ |
const int | device_count_ |
const int32_t | num_trees_ |
const bool | compute_avg_ |
int8_t * | host_decision_tree_table_ |
int8_t * | host_decision_tree_offsets_ |
int64_t | decision_tree_table_size_bytes_ |
int64_t | decision_tree_offsets_size_bytes_ |
std::vector < Data_Namespace::AbstractBuffer * > | decision_tree_table_device_buffers_ |
std::vector < Data_Namespace::AbstractBuffer * > | decision_tree_offsets_device_buffers_ |
std::vector< const int8_t * > | kernel_decision_tree_tables_ |
std::vector< const int8_t * > | kernel_decision_tree_offsets_ |
Definition at line 37 of file TreeModelPredictionMgr.h.
TreeModelPredictionMgr::TreeModelPredictionMgr | ( | const Data_Namespace::MemoryLevel | memory_level, |
Executor * | executor, | ||
const std::vector< std::vector< DecisionTreeEntry >> & | decision_trees, | ||
const std::vector< int64_t > & | decision_tree_offsets, | ||
const bool | compute_avg | ||
) |
Definition at line 28 of file TreeModelPredictionMgr.cpp.
References allocateAndPopulateHostBuffers(), CHECK, CHECK_EQ, Data_Namespace::CPU_LEVEL, createKernelBuffers(), Data_Namespace::GPU_LEVEL, and memory_level_.
TreeModelPredictionMgr::~TreeModelPredictionMgr | ( | ) |
Definition at line 52 of file TreeModelPredictionMgr.cpp.
References CHECK, data_mgr_, decision_tree_offsets_device_buffers_, decision_tree_table_device_buffers_, and Data_Namespace::DataMgr::free().
|
private |
Definition at line 64 of file TreeModelPredictionMgr.cpp.
References CHECK_EQ, DEBUG_TIMER, decision_tree_offsets_size_bytes_, decision_tree_table_size_bytes_, executor_, host_decision_tree_offsets_, host_decision_tree_table_, num_trees_, and threading_serial::parallel_for().
Referenced by TreeModelPredictionMgr().
llvm::Value * TreeModelPredictionMgr::codegen | ( | const std::vector< llvm::Value * > & | regressor_inputs, |
const CompilationOptions & | co | ||
) | const |
Definition at line 158 of file TreeModelPredictionMgr.cpp.
References AUTOMATIC_IR_METADATA, CHECK, CodeGenerator::codegen(), CodeGenerator::codegenHoistedConstants(), compute_avg_, device_count_, CompilationOptions::device_type, executor_, generate_kernel_buffer_constants(), GPU, Data_Namespace::GPU_LEVEL, CompilationOptions::hoist_literals, inline_fp_null_value< double >(), kENCODING_NONE, kernel_decision_tree_offsets_, kernel_decision_tree_tables_, memory_level_, and num_trees_.
Referenced by CodeGenerator::codegenTreeRegPredict().
|
private |
Definition at line 96 of file TreeModelPredictionMgr.cpp.
References CudaAllocator::allocGpuAbstractBuffer(), CHECK_EQ, copy_to_nvidia_gpu(), Data_Namespace::CPU_LEVEL, data_mgr_, DEBUG_TIMER, decision_tree_offsets_device_buffers_, decision_tree_offsets_size_bytes_, decision_tree_table_device_buffers_, decision_tree_table_size_bytes_, device_count_, Data_Namespace::GPU_LEVEL, host_decision_tree_offsets_, host_decision_tree_table_, kernel_decision_tree_offsets_, kernel_decision_tree_tables_, and memory_level_.
Referenced by TreeModelPredictionMgr().
|
private |
Definition at line 61 of file TreeModelPredictionMgr.h.
Referenced by codegen().
|
private |
Definition at line 58 of file TreeModelPredictionMgr.h.
Referenced by createKernelBuffers(), and ~TreeModelPredictionMgr().
|
private |
Definition at line 67 of file TreeModelPredictionMgr.h.
Referenced by createKernelBuffers(), and ~TreeModelPredictionMgr().
|
private |
Definition at line 65 of file TreeModelPredictionMgr.h.
Referenced by allocateAndPopulateHostBuffers(), and createKernelBuffers().
|
private |
Definition at line 66 of file TreeModelPredictionMgr.h.
Referenced by createKernelBuffers(), and ~TreeModelPredictionMgr().
|
private |
Definition at line 64 of file TreeModelPredictionMgr.h.
Referenced by allocateAndPopulateHostBuffers(), and createKernelBuffers().
|
private |
Definition at line 59 of file TreeModelPredictionMgr.h.
Referenced by codegen(), and createKernelBuffers().
|
private |
Definition at line 57 of file TreeModelPredictionMgr.h.
Referenced by allocateAndPopulateHostBuffers(), and codegen().
|
private |
Definition at line 63 of file TreeModelPredictionMgr.h.
Referenced by allocateAndPopulateHostBuffers(), and createKernelBuffers().
|
private |
Definition at line 62 of file TreeModelPredictionMgr.h.
Referenced by allocateAndPopulateHostBuffers(), and createKernelBuffers().
|
private |
Definition at line 69 of file TreeModelPredictionMgr.h.
Referenced by codegen(), and createKernelBuffers().
|
private |
Definition at line 68 of file TreeModelPredictionMgr.h.
Referenced by codegen(), and createKernelBuffers().
|
private |
Definition at line 56 of file TreeModelPredictionMgr.h.
Referenced by codegen(), createKernelBuffers(), and TreeModelPredictionMgr().
|
private |
Definition at line 60 of file TreeModelPredictionMgr.h.
Referenced by allocateAndPopulateHostBuffers(), and codegen().