OmniSciDB  72c90bc290
 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 
24 
26 
28 
35  bool filter_on_deleted_column{true}; // if false, ignore the delete column during table
36  // scans. Primarily disabled for delete queries.
39 
42  in.hoist_literals,
43  in.opt_level,
47  in.explain_type,
49  }
50 
54  /*hoist_literals=*/true,
55  /*opt_level=*/ExecutorOptLevel::Default,
56  /*with_dynamic_watchdog=*/false,
57  /*allow_lazy_fetch=*/true,
58  /*filter_on_delted_column=*/true,
59  /*explain_type=*/ExecutorExplainType::Default,
60  /*register_intel_jit_listener=*/false};
61  }
62 };
63 
65 
70  bool just_explain; // return the generated IR for the first step
72  bool with_watchdog; // Per work unit, not global.
73  bool jit_debug;
75  bool with_dynamic_watchdog; // Per work unit, not global.
76  unsigned dynamic_watchdog_time_limit; // Dynamic watchdog time limit, in milliseconds.
79  double gpu_input_mem_limit_percent; // punt to CPU if input memory exceeds this
85  size_t max_join_hash_table_size = std::numeric_limits<size_t>::max();
87  std::vector<size_t> outer_fragment_indices{};
88 
90  return ExecutionOptions{/*output_columnar_hint=*/false,
91  /*keep_result=*/false,
92  /*allow_multifrag=*/true,
93  /*just_explain=*/false,
94  /*allow_loop_joins=*/false,
95  /*with_watchdog=*/true,
96  /*jit_debug=*/false,
97  /*just_validate=*/false,
98  /*with_dynamic_watchdog=*/false,
99  /*dynamic_watchdog_time_limit=*/0,
100  /*find_push_down_candidates=*/false,
101  /*just_calcite_explain=*/false,
102  /*=gpu_input_mem_limit_percent=*/1.0,
103  /*allow_runtime_query_interrupt=*/false,
104  /*running_query_interrupt_freq=*/0.5,
105  /*pending_query_interrupt_freq=*/1000,
106  /*optimize_cuda_block_and_grid_sizes*/ false};
107  }
108  void setNoExplainExecutionOptions(bool no_validation = false) {
109  just_explain = false;
110  just_calcite_explain = false;
111  if (no_validation) {
112  just_validate = false;
113  }
114  }
115 };
116 
117 #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
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