18 #include "scanner/engine/kernel_factory.h" 19 #include "scanner/engine/runtime.h" 20 #include "scanner/engine/sampler.h" 21 #include "scanner/util/common.h" 22 #include "scanner/util/queue.h" 23 #include "scanner/video/decoder_automata.h" 24 #include "scanner/video/video_encoder.h" 27 #include "hwang/decoder_automata.h" 33 void move_if_different_address_space(Profiler& profiler,
34 DeviceHandle current_handle,
35 DeviceHandle target_handle,
36 BatchedElements& columns);
51 proto::Result& result;
69 const i32 decoder_cpus_;
74 i32 last_job_idx_ = -1;
77 std::vector<std::unique_ptr<DecoderAutomata>> decoders_;
79 std::vector<std::unique_ptr<hwang::DecoderAutomata>> inplace_decoders_;
84 bool needs_configure_;
90 std::vector<std::vector<proto::DecodeArgs>> decode_args_;
94 std::vector<std::string> op_names;
95 std::vector<bool> is_source;
96 std::vector<bool> is_sink;
99 std::map<i64, std::vector<std::vector<proto::SamplingArgs>>>
sampling_args;
103 std::map<i64, std::vector<std::vector<i64>>> slice_output_rows;
111 std::map<i64, std::vector<std::vector<i64>>> op_input_domain_size;
113 std::map<i64, std::vector<std::vector<std::vector<u8>>>> op_args;
114 std::vector<std::vector<std::tuple<i32, std::string>>> live_columns;
116 std::vector<std::vector<i32>> dead_columns;
118 std::vector<std::vector<i32>> unused_outputs;
120 std::vector<std::vector<i32>> column_mapping;
123 std::vector<std::vector<i32>> kernel_stencils;
125 std::vector<i32> kernel_batch_sizes;
131 std::mutex& startup_lock;
132 std::condition_variable& startup_cv;
134 int& resources_fetched_count;
135 std::mutex& resources_fetched_lock;
136 std::condition_variable& resources_fetched_cv;
137 int num_kernel_groups;
143 proto::BulkJobParameters::BoundaryCondition boundary_condition;
146 proto::Result& result;
156 void new_task(i64 job_idx, i64 task_idx,
157 const std::vector<TaskStream>& task_streams);
164 void clear_stencil_cache();
167 const i32 worker_id_;
172 std::vector<DeviceHandle> kernel_devices_;
173 std::vector<std::vector<DeviceHandle>> kernel_input_devices_;
174 std::vector<std::vector<DeviceHandle>> kernel_output_devices_;
175 std::vector<i32> kernel_num_outputs_;
176 std::vector<std::unique_ptr<BaseKernel>> kernels_;
179 std::vector<std::set<i32>> column_mapping_set_;
185 std::map<i64, std::unique_ptr<Partitioner>> partitioners_;
186 std::map<i64, std::unique_ptr<DomainSampler>> domain_samplers_;
189 std::vector<std::set<i64>> valid_input_rows_set_;
190 std::vector<std::vector<i64>> valid_input_rows_;
192 std::vector<std::vector<i64>> current_valid_input_idx_;
195 std::vector<std::set<i64>> compute_rows_set_;
196 std::vector<std::vector<i64>> compute_rows_;
198 std::vector<i64> current_compute_idx_;
201 std::vector<std::set<i64>> valid_output_rows_set_;
202 std::vector<std::vector<i64>> valid_output_rows_;
204 std::vector<i64> current_valid_output_idx_;
207 std::vector<i64> current_element_cache_input_idx_;
208 std::vector<std::vector<std::deque<Element>>> element_cache_;
210 std::vector<std::vector<DeviceHandle>> element_cache_devices_;
212 std::vector<std::vector<std::deque<i64>>> element_cache_row_ids_;
219 std::vector<DeviceHandle> final_output_handles_;
220 std::vector<std::deque<Element>> final_output_columns_;
221 std::vector<std::vector<i64>> final_row_ids_;
226 std::map<std::string, std::string> options;
237 std::vector<i32> column_mapping;
238 std::vector<Column> columns;
239 std::vector<ColumnCompressionOptions> column_compression;
252 std::vector<i32> column_mapping_;
253 std::vector<Column> columns_;
254 std::set<i32> column_set_;
257 VideoEncoderType encoder_type_;
258 std::vector<std::unique_ptr<VideoEncoder>> encoders_;
259 std::vector<bool> frame_size_initialized_;
260 std::vector<bool> encoder_configured_;
261 std::vector<EncodeOptions> encode_options_;
262 std::vector<bool> compression_enabled_;
267 std::deque<EvalWorkEntry> buffered_entries_;
Definition: evaluate_worker.h:242
std::map< i64, std::vector< std::vector< proto::SamplingArgs > > > sampling_args
For sampling ops.
Definition: evaluate_worker.h:99
Definition: evaluate_worker.h:224
Definition: evaluate_worker.h:54
std::map< i64, std::vector< std::vector< i64 > > > unslice_input_rows
For unslice ops.
Definition: evaluate_worker.h:106
Definition: profiler.h:40
Definition: evaluate_worker.h:150
std::vector< std::tuple< KernelFactory *, KernelConfig > > kernel_factories
For regular kernels.
Definition: evaluate_worker.h:108
Definition: evaluate_worker.h:128
Definition: database.cpp:36
Worker thread arguments.
Definition: evaluate_worker.h:40
Definition: evaluate_worker.h:93
Definition: evaluate_worker.h:229
std::map< i64, std::vector< i64 > > slice_input_rows
For slice ops.
Definition: evaluate_worker.h:102