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