offload_host.cpp (OffloadDescriptor::setup_misc_data): Use calloc instead of malloc.
[gcc.git] / liboffloadmic / ChangeLog
1 2015-10-26 Ilya Verbin <ilya.verbin@intel.com>
2 Aleksander Ivanushenko <aleksander.ivanushenko@intel.com>
3
4 * runtime/offload_host.cpp (OffloadDescriptor::setup_misc_data): Use
5 calloc instead of malloc.
6 (__offload_fini_library): Set mic_engines_total to zero.
7
8 2015-10-13 Ilya Verbin <ilya.verbin@intel.com>
9
10 * plugin/libgomp-plugin-intelmic.cpp (GOMP_OFFLOAD_dev2dev): New
11 function.
12 * plugin/offload_target_main.cpp (__offload_target_tgt2tgt): New
13 static function, register it in liboffloadmic.
14
15 2015-10-08 Ilya Verbin <ilya.verbin@intel.com>
16
17 * runtime/offload_engine.cpp (Engine::init_process): Use strdup instead
18 of sizeof+malloc+sprintf, check for return value.
19 * runtime/offload_env.cpp (MicEnvVar::get_env_var_kind): Check for
20 strdup return value.
21 * runtime/offload_host.cpp (__offload_init_library_once): Check for
22 strdup return value. Fix size calculation of COI_HOST_THREAD_AFFINITY.
23 * runtime/emulator/coi_device.cpp (COIProcessWaitForShutdown): Check for
24 malloc return value.
25
26 2015-09-29 Ilya Verbin <ilya.verbin@intel.com>
27
28 * plugin/libgomp-plugin-intelmic.cpp (OFFLOAD_ACTIVE_WAIT_ENV): New
29 define.
30 (init): Set OFFLOAD_ACTIVE_WAIT env var to 0, if it is not set.
31 * runtime/emulator/coi_common.h (PIPE_HOST_PATH): Replace with ...
32 (PIPE_HOST2TGT_NAME): ... this.
33 (PIPE_TARGET_PATH): Replace with ...
34 (PIPE_TGT2HOST_NAME): ... this.
35 (MALLOCN): New define.
36 (READN): Likewise.
37 (WRITEN): Likewise.
38 (enum cmd_t): Replace CMD_RUN_FUNCTION with CMD_PIPELINE_RUN_FUNCTION.
39 Add CMD_PIPELINE_CREATE, CMD_PIPELINE_DESTROY.
40 * runtime/emulator/coi_device.cpp (engine_dir): New static variable.
41 (pipeline_thread_routine): New static function.
42 (COIProcessWaitForShutdown): Use global engine_dir instead of mic_dir.
43 Rename pipe_host and pipe_target to pipe_host2tgt and pipe_tgt2host.
44 If cmd is CMD_PIPELINE_CREATE, create a new thread for the pipeline.
45 Remove cmd == CMD_RUN_FUNCTION case.
46 * runtime/emulator/coi_device.h (COIERRORN): New define.
47 * runtime/emulator/coi_host.cpp: Include set, map, queue.
48 Replace typedefs with enums and structs.
49 (struct Function): Remove name, add num_buffers, bufs_size,
50 bufs_data_target, misc_data_len, misc_data, return_value_len,
51 return_value, completion_event.
52 (struct Callback): New.
53 (struct Process): Remove pipeline. Add pipe_host2tgt and pipe_tgt2host.
54 (struct Pipeline): Remove pipe_host and pipe_target. Add thread,
55 destroy, is_destroyed, pipe_host2tgt_path, pipe_tgt2host_path,
56 pipe_host2tgt, pipe_tgt2host, queue, process.
57 (max_pipeline_num): New static variable.
58 (pipelines): Likewise.
59 (max_event_num): Likewise.
60 (non_signalled_events): Likewise.
61 (errored_events): Likewise.
62 (callbacks): Likewise.
63 (cleanup): Do not check tmp_dirs before free.
64 (start_critical_section): New static function.
65 (finish_critical_section): Likewise.
66 (pipeline_is_destroyed): Likewise.
67 (maybe_invoke_callback): Likewise.
68 (signal_event): Likewise.
69 (get_event_result): Likewise.
70 (COIBufferCopy): Rename arguments according to headers. Add asserts.
71 Use process' main pipes, instead of pipeline's pipes. Signal completion
72 event.
73 (COIBufferCreate): Rename arguments according to headers. Add asserts.
74 Use process' main pipes, instead of pipeline's pipes.
75 (COIBufferCreateFromMemory): Rename arguments according to headers.
76 Add asserts.
77 (COIBufferDestroy): Rename arguments according to headers. Add asserts.
78 Use process' main pipes, instead of pipeline's pipes.
79 (COIBufferGetSinkAddress): Rename arguments according to headers.
80 Add asserts.
81 (COIBufferMap): Rename arguments according to headers. Add asserts.
82 Signal completion event.
83 (COIBufferRead): Likewise.
84 (COIBufferSetState): Likewise.
85 (COIBufferUnmap): Likewise.
86 (COIBufferWrite): Likewise.
87 (COIEngineGetCount): Add assert.
88 (COIEngineGetHandle): Rename arguments according to headers.
89 Add assert.
90 (COIEventWait): Rename arguments according to headers. Add asserts.
91 Implement waiting for events with zero or infinite timeout.
92 (COIEventRegisterCallback): New function.
93 (pipeline_thread_routine): New static function.
94 (COIPipelineCreate): Create a new thread for the pipeline.
95 (COIPipelineDestroy): Exit pipeline thread.
96 (COIPipelineRunFunction): Add the function into pipeline's queue,
97 instead running it here. Wait for it's completion in case of
98 synchronous execution.
99 (COIProcessCreateFromMemory): Rename arguments according to headers.
100 Add asserts. Create process' main pipes, instead of pipeline's pipes.
101 (COIProcessDestroy): Rename arguments according to headers.
102 Add asserts. Destroy all undestroyed pipelines.
103 (COIProcessGetFunctionHandles): Rename arguments according to headers.
104 Add asserts. Use process' main pipes, instead of pipeline's pipes.
105 Remove useless function names.
106 (COIProcessLoadLibraryFromMemory): Add asserts. Use process' main
107 pipes, instead of pipeline's pipes.
108 (COIProcessUnloadLibrary): Likewise.
109 (COIEngineGetInfo): Add assert.
110 * runtime/emulator/coi_host.h (COIERRORN): New define.
111
112 2015-09-28 Ilya Verbin <ilya.verbin@intel.com>
113
114 PR other/67652
115 * runtime/offload_engine.cpp (Engine::init_process): Fix sizeof.
116
117 2015-09-08 Ilya Verbin <ilya.verbin@intel.com>
118
119 * Makefile.am (liboffloadmic_host_la_DEPENDENCIES): Remove libcoi_host
120 and libmyo-client. liboffloadmic_host loads them dynamically.
121 * Makefile.in: Regenerate.
122 * doc/doxygen/header.tex: Merge from upstream, version 20150803
123 <https://openmprtl.org/sites/default/files/liboffload_oss_20150803.tgz>.
124 * runtime/cean_util.cpp: Likewise.
125 * runtime/cean_util.h: Likewise.
126 * runtime/coi/coi_client.cpp: Likewise.
127 * runtime/coi/coi_client.h: Likewise.
128 * runtime/coi/coi_server.cpp: Likewise.
129 * runtime/coi/coi_server.h: Likewise.
130 * runtime/compiler_if_host.cpp: Likewise.
131 * runtime/compiler_if_host.h: Likewise.
132 * runtime/compiler_if_target.cpp: Likewise.
133 * runtime/compiler_if_target.h: Likewise.
134 * runtime/dv_util.cpp: Likewise.
135 * runtime/dv_util.h: Likewise.
136 * runtime/liboffload_error.c: Likewise.
137 * runtime/liboffload_error_codes.h: Likewise.
138 * runtime/liboffload_msg.c: Likewise.
139 * runtime/liboffload_msg.h: Likewise.
140 * runtime/mic_lib.f90: Likewise.
141 * runtime/offload.h: Likewise.
142 * runtime/offload_common.cpp: Likewise.
143 * runtime/offload_common.h: Likewise.
144 * runtime/offload_engine.cpp: Likewise.
145 * runtime/offload_engine.h: Likewise.
146 * runtime/offload_env.cpp: Likewise.
147 * runtime/offload_env.h: Likewise.
148 * runtime/offload_host.cpp: Likewise.
149 * runtime/offload_host.h: Likewise.
150 * runtime/offload_iterator.h: Likewise.
151 * runtime/offload_myo_host.cpp: Likewise.
152 * runtime/offload_myo_host.h: Likewise.
153 * runtime/offload_myo_target.cpp: Likewise.
154 * runtime/offload_myo_target.h: Likewise.
155 * runtime/offload_omp_host.cpp: Likewise.
156 * runtime/offload_omp_target.cpp: Likewise.
157 * runtime/offload_orsl.cpp: Likewise.
158 * runtime/offload_orsl.h: Likewise.
159 * runtime/offload_table.cpp: Likewise.
160 * runtime/offload_table.h: Likewise.
161 * runtime/offload_target.cpp: Likewise.
162 * runtime/offload_target.h: Likewise.
163 * runtime/offload_target_main.cpp: Likewise.
164 * runtime/offload_timer.h: Likewise.
165 * runtime/offload_timer_host.cpp: Likewise.
166 * runtime/offload_timer_target.cpp: Likewise.
167 * runtime/offload_trace.cpp: Likewise.
168 * runtime/offload_trace.h: Likewise.
169 * runtime/offload_util.cpp: Likewise.
170 * runtime/offload_util.h: Likewise.
171 * runtime/ofldbegin.cpp: Likewise.
172 * runtime/ofldend.cpp: Likewise.
173 * runtime/orsl-lite/include/orsl-lite.h: Likewise.
174 * runtime/orsl-lite/lib/orsl-lite.c: Likewise.
175 * runtime/use_mpss2.txt: Likewise.
176 * include/coi/common/COIEngine_common.h: Merge from upstream, MPSS
177 version 3.5
178 <http://registrationcenter.intel.com/irc_nas/7445/mpss-src-3.5.tar>.
179 * include/coi/common/COIEvent_common.h: Likewise.
180 * include/coi/common/COIMacros_common.h: Likewise.
181 * include/coi/common/COIPerf_common.h: Likewise.
182 * include/coi/common/COIResult_common.h: Likewise.
183 * include/coi/common/COISysInfo_common.h: Likewise.
184 * include/coi/common/COITypes_common.h: Likewise.
185 * include/coi/sink/COIBuffer_sink.h: Likewise.
186 * include/coi/sink/COIPipeline_sink.h: Likewise.
187 * include/coi/sink/COIProcess_sink.h: Likewise.
188 * include/coi/source/COIBuffer_source.h: Likewise.
189 * include/coi/source/COIEngine_source.h: Likewise.
190 * include/coi/source/COIEvent_source.h: Likewise.
191 * include/coi/source/COIPipeline_source.h: Likewise.
192 * include/coi/source/COIProcess_source.h: Likewise.
193 * include/myo/myo.h: Likewise.
194 * include/myo/myoimpl.h: Likewise.
195 * include/myo/myotypes.h: Likewise.
196 * plugin/Makefile.am (myo_inc_dir): Remove.
197 (libgomp_plugin_intelmic_la_CPPFLAGS): Do not define MYO_SUPPORT.
198 (AM_CPPFLAGS): Likewise for offload_target_main.
199 * plugin/Makefile.in: Regenerate.
200 * runtime/emulator/coi_common.h: Update copyright years.
201 (OFFLOAD_EMUL_KNC_NUM_ENV): Replace with ...
202 (OFFLOAD_EMUL_NUM_ENV): ... this.
203 (enum cmd_t): Add CMD_CLOSE_LIBRARY.
204 * runtime/emulator/coi_device.cpp: Update copyright years.
205 (COIProcessWaitForShutdown): Add space between string constants.
206 Return handle to host in CMD_OPEN_LIBRARY.
207 Support CMD_CLOSE_LIBRARY.
208 * runtime/emulator/coi_device.h: Update copyright years.
209 * runtime/emulator/coi_host.cpp: Update copyright years.
210 (knc_engines_num): Replace with ...
211 (num_engines): ... this.
212 (init): Replace OFFLOAD_EMUL_KNC_NUM_ENV with OFFLOAD_EMUL_NUM_ENV.
213 (COIEngineGetCount): Replace COI_ISA_KNC with COI_ISA_MIC, and
214 knc_engines_num with num_engines.
215 (COIEngineGetHandle): Likewise.
216 (COIProcessCreateFromMemory): Add space between string constants.
217 (COIProcessCreateFromFile): New function.
218 (COIProcessLoadLibraryFromMemory): Rename arguments according to
219 COIProcess_source.h. Return handle, received from target.
220 (COIProcessUnloadLibrary): New function.
221 (COIPipelineClearCPUMask): New function.
222 (COIPipelineSetCPUMask): New function.
223 (COIEngineGetInfo): New function.
224 * runtime/emulator/coi_host.h: Update copyright years.
225 * runtime/emulator/coi_version_asm.h: Regenerate.
226 * runtime/emulator/coi_version_linker_script.map: Regenerate.
227 * runtime/emulator/myo_client.cpp: Update copyright years.
228 * runtime/emulator/myo_service.cpp: Update copyright years.
229 (myoArenaRelease): New function.
230 (myoArenaAcquire): New function.
231 (myoArenaAlignedFree): New function.
232 (myoArenaAlignedMalloc): New function.
233 * runtime/emulator/myo_service.h: Update copyright years.
234 * runtime/emulator/myo_version_asm.h: Regenerate.
235 * runtime/emulator/myo_version_linker_script.map: Regenerate.
236
237 2015-08-24 Nathan Sidwell <nathan@codesourcery.com>
238
239 * plugin/libgomp-plugin-intelmic.cpp (GOMP_OFFLOAD_version): New.
240 (GOMP_OFFLOAD_load_image): Add version arg and check it.
241 (GOMP_OFFLOAD_unload_image): Likewise.
242
243 2015-08-24 Thomas Schwinge <thomas@codesourcery.com>
244
245 * plugin/Makefile.am (include_src_dir): Set.
246 [PLUGIN_HOST] (libgomp_plugin_intelmic_la_CPPFLAGS): Use it.
247 * plugin/Makefile.in: Regenerate.
248 * plugin/libgomp-plugin-intelmic.cpp: Include "gomp-constants.h".
249
250 2015-07-24 Micahel Darling <darlingm@gmail.com>
251
252 PR other/66259
253 * configure: Reflects renaming of configure.in to configure.ac
254
255 2015-07-17 Nathan Sidwell <nathan@acm.org>
256 Ilya Verbin <ilya.verbin@intel.com>
257
258 * plugin/libgomp-plugin-intelmic.cpp (ImgDevAddrMap): Constify.
259 (offload_image, GOMP_OFFLOAD_load_image,
260 GOMP_OFFLOAD_unload_image): Constify target data.
261
262 2015-07-08 Thomas Schwinge <thomas@codesourcery.com>
263
264 * plugin/Makefile.am (main_target_image.h): Change type of data
265 member of struct MainTargetImage to uint8_t.
266 * plugin/Makefile.in: Regenerate.
267
268 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
269
270 * Makefile.in: Regenerated with automake-1.11.6.
271 * aclocal.m4: Likewise.
272 * configure: Likewise.
273 * plugin/Makefile.in: Likewise.
274 * plugin/aclocal.m4: Likewise.
275 * plugin/configure: Likewise.
276
277 2015-04-06 Ilya Verbin <ilya.verbin@intel.com>
278
279 * plugin/libgomp-plugin-intelmic.cpp: Include map.
280 (AddrVect, DevAddrVect, ImgDevAddrMap): New typedefs.
281 (num_devices, num_images, address_table): New static vars.
282 (num_libraries, lib_descrs): Remove static vars.
283 (set_mic_lib_path): Rename to ...
284 (init): ... this. Allocate address_table and get num_devices.
285 (GOMP_OFFLOAD_get_num_devices): return num_devices.
286 (load_lib_and_get_table): Remove static function.
287 (offload_image): New static function.
288 (GOMP_OFFLOAD_get_table): Remove function.
289 (GOMP_OFFLOAD_load_image, GOMP_OFFLOAD_unload_image): New functions.
290
291 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
292
293 * plugin/libgomp-plugin-intelmic.cpp (GOMP_OFFLOAD_get_name)
294 (GOMP_OFFLOAD_get_caps, GOMP_OFFLOAD_fini_device): New functions.
295
296 2014-11-13 Ilya Verbin <ilya.verbin@intel.com>
297 Andrey Turetskiy <andrey.turetskiy@intel.com>
298
299 * Makefile.in: Regenerate.
300 * configure: Regenerate.
301 * configure.ac: Add subdirectory 'plugin'.
302 * plugin/Makefile.am: New file.
303 * plugin/Makefile.in: New file, generated by automake.
304 * plugin/aclocal.m4: New file, generated by aclocal.
305 * plugin/configure: New file, generated by autoconf.
306 * plugin/configure.ac: New file.
307 * plugin/libgomp-plugin-intelmic.cpp: New file.
308 * plugin/offload_target_main.cpp: New file.
309
310 2014-11-13 Kirill Yukhin <kirill.yukhin@intel.com>
311
312 Initial commit. Imported from upstream:
313 https://www.openmprtl.org/sites/default/files/liboffload_oss.tgz
314 * Makefile.am: New file.
315 * Makefile.in: New file, generated by automake.
316 * aclocal.m4: New file, generated by aclocal.
317 * configure: New file, generated by autoconf.
318 * configure.ac: New file.
319 * configure.tgt: Ditto.
320 * doc/doxygen/config: Ditto.
321 * doc/doxygen/header.tex: Ditto.
322 * include/coi/common/COIEngine_common.h: Ditto.
323 * include/coi/common/COIMacros_common.h: Ditto.
324 * include/coi/common/COIPerf_common.h : Ditto.
325 * include/coi/common/COIResult_common.h : Ditto.
326 * include/coi/common/COITypes_common.h: Ditto.
327 * include/coi/sink/COIBuffer_sink.h: Ditto.
328 * include/coi/sink/COIPipeline_sink.h: Ditto.
329 * include/coi/sink/COIProcess_sink.h: Ditto.
330 * include/coi/source/COIBuffer_source.h: Ditto.
331 * include/coi/source/COIEngine_source.h: Ditto.
332 * include/coi/source/COIEvent_source.h: Ditto.
333 * include/coi/source/COIPipeline_source.h: Ditto.
334 * include/coi/source/COIProcess_source.h: Ditto.
335 * include/myo/myo.h: Ditto.
336 * include/myo/myoimpl.h: Ditto.
337 * include/myo/myotypes.h: Ditto.
338 * liboffloadmic_host.spec.in: Ditto.
339 * liboffloadmic_target.spec.in: Ditto.
340 * runtime/cean_util.cpp: Ditto.
341 * runtime/cean_util.h: Ditto.
342 * runtime/coi/coi_client.cpp: Ditto.
343 * runtime/coi/coi_client.h: Ditto.
344 * runtime/coi/coi_server.cpp: Ditto.
345 * runtime/coi/coi_server.h: Ditto.
346 * runtime/compiler_if_host.cpp: Ditto.
347 * runtime/compiler_if_host.h: Ditto.
348 * runtime/compiler_if_target.cpp: Ditto.
349 * runtime/compiler_if_target.h: Ditto.
350 * runtime/dv_util.cpp: Ditto.
351 * runtime/dv_util.h: Ditto.
352 * runtime/emulator/coi_common.h: Ditto.
353 * runtime/emulator/coi_device.cpp: Ditto.
354 * runtime/emulator/coi_device.h: Ditto.
355 * runtime/emulator/coi_host.cpp: Ditto.
356 * runtime/emulator/coi_host.h: Ditto.
357 * runtime/emulator/coi_version_asm.h: Ditto.
358 * runtime/emulator/coi_version_linker_script.map: Ditto.
359 * runtime/emulator/myo_client.cpp: Ditto.
360 * runtime/emulator/myo_service.cpp: Ditto.
361 * runtime/emulator/myo_service.h: Ditto.
362 * runtime/emulator/myo_version_asm.h: Ditto.
363 * runtime/emulator/myo_version_linker_script.map: Ditto.
364 * runtime/liboffload_error.c: Ditto.
365 * runtime/liboffload_error_codes.h: Ditto.
366 * runtime/liboffload_msg.c: Ditto.
367 * runtime/liboffload_msg.h: Ditto.
368 * runtime/mic_lib.f90: Ditto.
369 * runtime/offload.h: Ditto.
370 * runtime/offload_common.cpp: Ditto.
371 * runtime/offload_common.h: Ditto.
372 * runtime/offload_engine.cpp: Ditto.
373 * runtime/offload_engine.h: Ditto.
374 * runtime/offload_env.cpp: Ditto.
375 * runtime/offload_env.h: Ditto.
376 * runtime/offload_host.cpp: Ditto.
377 * runtime/offload_host.h: Ditto.
378 * runtime/offload_myo_host.cpp: Ditto.
379 * runtime/offload_myo_host.h: Ditto.
380 * runtime/offload_myo_target.cpp: Ditto.
381 * runtime/offload_myo_target.h: Ditto.
382 * runtime/offload_omp_host.cpp: Ditto.
383 * runtime/offload_omp_target.cpp: Ditto.
384 * runtime/offload_orsl.cpp: Ditto.
385 * runtime/offload_orsl.h: Ditto.
386 * runtime/offload_table.cpp: Ditto.
387 * runtime/offload_table.h: Ditto.
388 * runtime/offload_target.cpp: Ditto.
389 * runtime/offload_target.h: Ditto.
390 * runtime/offload_target_main.cpp: Ditto.
391 * runtime/offload_timer.h: Ditto.
392 * runtime/offload_timer_host.cpp: Ditto.
393 * runtime/offload_timer_target.cpp: Ditto.
394 * runtime/offload_trace.cpp: Ditto.
395 * runtime/offload_trace.h: Ditto.
396 * runtime/offload_util.cpp: Ditto.
397 * runtime/offload_util.h: Ditto.
398 * runtime/ofldbegin.cpp: Ditto.
399 * runtime/ofldend.cpp: Ditto.
400 * runtime/orsl-lite/include/orsl-lite.h: Ditto.
401 * runtime/orsl-lite/lib/orsl-lite.c: Ditto.
402 * runtime/orsl-lite/version.txt: Ditto.
403 * runtime/use_mpss2.txt: Ditto.