OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CompilationOptions.h
Go to the documentation of this file.
1 /*
2  * Copyright 2022 HEAVY.AI, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef QUERYENGINE_COMPILATIONOPTIONS_H
18 #define QUERYENGINE_COMPILATIONOPTIONS_H
19 
20 #include <vector>
21 #include "ExecutorDeviceType.h"
22 
23 extern bool g_from_table_reordering;
24 
26 
28 
30 
37  bool filter_on_deleted_column{true}; // if false, ignore the delete column during table
38  // scans. Primarily disabled for delete queries.
41 
44  in.hoist_literals,
45  in.opt_level,
49  in.explain_type,
51  }
52 
56  /*hoist_literals=*/true,
57  /*opt_level=*/ExecutorOptLevel::Default,
58  /*with_dynamic_watchdog=*/false,
59  /*allow_lazy_fetch=*/true,
60  /*filter_on_delted_column=*/true,
61  /*explain_type=*/ExecutorExplainType::Default,
62  /*register_intel_jit_listener=*/false};
63  }
64 };
65 
67 
72  bool just_explain; // return the generated IR for the first step
74  bool with_watchdog; // Per work unit, not global.
75  bool jit_debug;
77  bool with_dynamic_watchdog; // Per work unit, not global.
78  unsigned dynamic_watchdog_time_limit; // Dynamic watchdog time limit, in milliseconds.
81  double gpu_input_mem_limit_percent; // punt to CPU if input memory exceeds this
88  size_t max_join_hash_table_size = std::numeric_limits<size_t>::max();
90  std::vector<size_t> outer_fragment_indices{};
91 
93  return ExecutionOptions{/*output_columnar_hint=*/false,
94  /*keep_result=*/false,
95  /*allow_multifrag=*/true,
96  /*just_explain=*/false,
97  /*allow_loop_joins=*/false,
98  /*with_watchdog=*/true,
99  /*jit_debug=*/false,
100  /*just_validate=*/false,
101  /*with_dynamic_watchdog=*/false,
102  /*dynamic_watchdog_time_limit=*/0,
103  /*find_push_down_candidates=*/false,
104  /*just_calcite_explain=*/false,
105  /*=gpu_input_mem_limit_percent=*/1.0,
106  /*allow_runtime_query_interrupt=*/false,
107  /*running_query_interrupt_freq=*/0.5,
108  /*pending_query_interrupt_freq=*/1000,
109  /*optimize_cuda_block_and_grid_sizes*/ false};
110  }
111  void setNoExplainExecutionOptions(bool no_validation = false) {
112  just_explain = false;
113  just_calcite_explain = false;
114  if (no_validation) {
115  just_validate = false;
116  }
117  }
118 };
119 
120 #endif // QUERYENGINE_COMPILATIONOPTIONS_H
std::vector< size_t > outer_fragment_indices
ExecutorOptLevel opt_level
void setNoExplainExecutionOptions(bool no_validation=false)
ExecutorDeviceType
double running_query_interrupt_freq
bool g_from_table_reordering
Definition: Execute.cpp:97
ExecutorOptLevel
ExecutorDispatchMode
ExecutorType
static CompilationOptions makeCpuOnly(const CompilationOptions &in)
ExecutorType executor_type
ExecutorExplainType explain_type
unsigned pending_query_interrupt_freq
ExecutorDeviceType device_type
static CompilationOptions defaults(const ExecutorDeviceType device_type=ExecutorDeviceType::GPU)
bool optimize_cuda_block_and_grid_sizes
double gpu_input_mem_limit_percent
unsigned dynamic_watchdog_time_limit
static ExecutionOptions defaults()
ExecutorExplainType