public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [PATH] Intel offload library
@ 2014-07-02 11:13 Andrey Turetskiy
  2014-07-21  9:46 ` Andrey Turetskiy
  2014-07-30 21:26 ` Joseph S. Myers
  0 siblings, 2 replies; 11+ messages in thread
From: Andrey Turetskiy @ 2014-07-02 11:13 UTC (permalink / raw)
  To: joseph
  Cc: Kirill Yukhin, Jakub Jelinek, Richard Henderson, Bernd Schmidt,
	Richard Biener, Uros Bizjak, GCC Patches

[-- Attachment #1: Type: text/plain, Size: 416 bytes --]

> * Don't duplicate the logic for what's a hosted POSIX system; refactor it
> to a common fragment in config/ (I guess it needs to be a shell script
> fragment there rather than an actual autoconf macro, since you're using
> that logic in configure.tgt which is itself such a fragment).

I've attached the patch with changes related to the point.
Do you mean something like this?

-- 
Best regards,
Andrey Turetskiy

[-- Attachment #2: liboffload_config.patch --]
[-- Type: application/octet-stream, Size: 4258 bytes --]

diff --git a/config/target-posix b/config/target-posix
new file mode 100644
index 0000000..2fba066
--- /dev/null
+++ b/config/target-posix
@@ -0,0 +1,12 @@
+case "${target}" in
+  *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
+      ;;
+  *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly*)
+      ;;
+  *-*-solaris2* | *-*-hpux11*)
+      ;;
+  *-*-darwin* | *-*-aix*)
+      ;;
+  *)
+      UNSUPPORTED=1 ;;
+  esac
diff --git a/libcilkrts/configure b/libcilkrts/configure
index 0dadbbd..5b60cd3 100644
--- a/libcilkrts/configure
+++ b/libcilkrts/configure
@@ -4873,6 +4873,7 @@ fi
 
 # Get target configury.
 . ${srcdir}/configure.tgt
+. ${srcdir}/../config/target-posix
 if test -n "$UNSUPPORTED"; then
    as_fn_error "Configuration ${target} is unsupported." "$LINENO" 5
 fi
@@ -11057,7 +11058,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11060 "configure"
+#line 11061 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11163,7 +11164,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11166 "configure"
+#line 11167 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
diff --git a/libcilkrts/configure.ac b/libcilkrts/configure.ac
index fb21505..daaf6d1 100644
--- a/libcilkrts/configure.ac
+++ b/libcilkrts/configure.ac
@@ -67,6 +67,7 @@ fi
 
 # Get target configury.
 . ${srcdir}/configure.tgt
+. ${srcdir}/../config/target-posix
 if test -n "$UNSUPPORTED"; then
    AC_MSG_ERROR([Configuration ${target} is unsupported.])
 fi
diff --git a/libcilkrts/configure.tgt b/libcilkrts/configure.tgt
index f766352..4c47c4f 100644
--- a/libcilkrts/configure.tgt
+++ b/libcilkrts/configure.tgt
@@ -41,21 +41,3 @@ case "${target}" in
     UNSUPPORTED=1
     ;;
 esac
-
-# Disable libcilkrts on non POSIX hosted systems.
-if test x$enable_libcilkrts = x ; then
-    # Enable libcilkrts by default on hosted POSIX systems.
-    case "${target}" in
-    *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
-        ;;
-    *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly*)
-        ;;
-    *-*-solaris2* | *-*-hpux11*)
-        ;;
-    *-*-darwin* | *-*-aix*)
-        ;;
-    *)
-        UNSUPPORTED=1
-        ;;
-    esac
-fi
diff --git a/liboffloadmic/configure b/liboffloadmic/configure
index 1e759de..8e4d752 100755
--- a/liboffloadmic/configure
+++ b/liboffloadmic/configure
@@ -4935,6 +4935,7 @@ done
 
 # Get target configure.
 . ${srcdir}/configure.tgt
+. ${srcdir}/../config/target-posix
 if test -n "$UNSUPPORTED"; then
   as_fn_error "Configuration ${target} is unsupported." "$LINENO" 5
 fi
@@ -11067,7 +11068,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11070 "configure"
+#line 11071 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11173,7 +11174,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11176 "configure"
+#line 11177 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
diff --git a/liboffloadmic/configure.ac b/liboffloadmic/configure.ac
index 8936ba2..96bd5a7 100644
--- a/liboffloadmic/configure.ac
+++ b/liboffloadmic/configure.ac
@@ -47,6 +47,7 @@ AC_CHECK_HEADERS([mm_malloc.h], [], [AC_MSG_ERROR(["Couldn't find mm_malloc.h"])
 
 # Get target configure.
 . ${srcdir}/configure.tgt
+. ${srcdir}/../config/target-posix
 if test -n "$UNSUPPORTED"; then
   AC_MSG_ERROR([Configuration ${target} is unsupported.])
 fi
diff --git a/liboffloadmic/configure.tgt b/liboffloadmic/configure.tgt
index a522288..d139292 100644
--- a/liboffloadmic/configure.tgt
+++ b/liboffloadmic/configure.tgt
@@ -34,17 +34,3 @@ case "${target}" in
   *-*-*)
     UNSUPPORTED=1 ;;
 esac
-
-# Disable liboffloadmic on non POSIX hosted systems.
-case "${target}" in
-  *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
-      ;;
-  *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly*)
-      ;;
-  *-*-solaris2* | *-*-hpux11*)
-      ;;
-  *-*-darwin* | *-*-aix*)
-      ;;
-  *)
-      UNSUPPORTED=1 ;;
-  esac

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [PATH] Intel offload library
@ 2014-06-26 13:34 Kirill Yukhin
  2014-06-26 21:27 ` Joseph S. Myers
  0 siblings, 1 reply; 11+ messages in thread
From: Kirill Yukhin @ 2014-06-26 13:34 UTC (permalink / raw)
  To: Jakub Jelinek, Richard Henderson, bernds, Richard Biener, Uros Bizjak
  Cc: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 5711 bytes --]

Hello,

This patch adds Intel MIC runtime offload library to GCC source tree.

Patch attached (it is big, so compressed).

As proposed, name was changed (to liboffloadmic).

Bootstrap pass.
This library builds only on x86{_64} POSIX systems.
By default build is switched off.

To build it you need to pass to top-level configure: --enable-liboffloadmic={host|target}

This sources include liboffloadmic underlying software stack emulator.
It builds along with liboffloadmic (target and host correspondingly).

Is it ok for trunk?

ChangeLog/
	* configure.ac: Added liboffloadmic to target binaries.  Also, restrict
	liboffloadmic for POSIX and i*86, and x86_64 architectures.  Also added
	liboffloadmic to noconfig list when C++ is not supported.
	* configure: Regenerate.
	* Makefile.def: Add liboffloadmic to target_modules.  Make
	liboffloadmic depend on libgomp's configure, libstdc++ and libgcc.
	* Makefile.in: Regenerate.
	* liboffloadmic/Makefile.am: New file.
	* liboffloadmic/Makefile.in: Ditto.
	* liboffloadmic/aclocal.m4: Ditto.
	* liboffloadmic/configure: Ditto.
	* liboffloadmic/configure.ac: Ditto.
	* liboffloadmic/configure.tgt: Ditto.
	* liboffloadmic/doc/doxygen/config: Ditto.
	* liboffloadmic/doc/doxygen/header.tex: Ditto.
	* liboffloadmic/include/coi/common/COIEngine_common.h: Ditto.
	* liboffloadmic/include/coi/common/COIMacros_common.h: Ditto.
	* liboffloadmic/include/coi/common/COIPerf_common.h : Ditto.
	* liboffloadmic/include/coi/common/COIResult_common.h : Ditto.
	* liboffloadmic/include/coi/common/COITypes_common.h: Ditto.
	* liboffloadmic/include/coi/sink/COIBuffer_sink.h: Ditto.
	* liboffloadmic/include/coi/sink/COIPipeline_sink.h: Ditto.
	* liboffloadmic/include/coi/sink/COIProcess_sink.h: Ditto.
	* liboffloadmic/include/coi/source/COIBuffer_source.h: Ditto.
	* liboffloadmic/include/coi/source/COIEngine_source.h: Ditto.
	* liboffloadmic/include/coi/source/COIEvent_source.h: Ditto.
	* liboffloadmic/include/coi/source/COIPipeline_source.h: Ditto.
	* liboffloadmic/include/coi/source/COIProcess_source.h: Ditto.
	* liboffloadmic/include/myo/myo.h: Ditto.
	* liboffloadmic/include/myo/myoimpl.h: Ditto.
	* liboffloadmic/include/myo/myotypes.h: Ditto.
	* liboffloadmic/liboffloadmic.spec.in: Ditto.
	* liboffloadmic/runtime/cean_util.cpp: Ditto.
	* liboffloadmic/runtime/cean_util.h: Ditto.
	* liboffloadmic/runtime/coi/coi_client.cpp: Ditto.
	* liboffloadmic/runtime/coi/coi_client.h: Ditto.
	* liboffloadmic/runtime/coi/coi_server.cpp: Ditto.
	* liboffloadmic/runtime/coi/coi_server.h: Ditto.
	* liboffloadmic/runtime/compiler_if_host.cpp: Ditto.
	* liboffloadmic/runtime/compiler_if_host.h: Ditto.
	* liboffloadmic/runtime/compiler_if_target.cpp: Ditto.
	* liboffloadmic/runtime/compiler_if_target.h: Ditto.
	* liboffloadmic/runtime/dv_util.cpp: Ditto.
	* liboffloadmic/runtime/dv_util.h: Ditto.
	* liboffloadmic/runtime/emulator/coi_common.h: Ditto.
	* liboffloadmic/runtime/emulator/coi_device.cpp: Ditto.
	* liboffloadmic/runtime/emulator/coi_device.h: Ditto.
	* liboffloadmic/runtime/emulator/coi_host.cpp: Ditto.
	* liboffloadmic/runtime/emulator/coi_host.h: Ditto.
	* liboffloadmic/runtime/emulator/coi_version_asm.h: Ditto.
	* liboffloadmic/runtime/emulator/coi_version_linker_script.map: Ditto.
	* liboffloadmic/runtime/emulator/myo_client.cpp: Ditto.
	* liboffloadmic/runtime/emulator/myo_service.cpp: Ditto.
	* liboffloadmic/runtime/emulator/myo_service.h: Ditto.
	* liboffloadmic/runtime/emulator/myo_version_asm.h: Ditto.
	* liboffloadmic/runtime/emulator/myo_version_linker_script.map: Ditto.
	* liboffloadmic/runtime/liboffload_error.c: Ditto.
	* liboffloadmic/runtime/liboffload_error_codes.h: Ditto.
	* liboffloadmic/runtime/liboffload_msg.c: Ditto.
	* liboffloadmic/runtime/liboffload_msg.h: Ditto.
	* liboffloadmic/runtime/mic_lib.f90: Ditto.
	* liboffloadmic/runtime/offload.h: Ditto.
	* liboffloadmic/runtime/offload_common.cpp: Ditto.
	* liboffloadmic/runtime/offload_common.h: Ditto.
	* liboffloadmic/runtime/offload_engine.cpp: Ditto.
	* liboffloadmic/runtime/offload_engine.h: Ditto.
	* liboffloadmic/runtime/offload_env.cpp: Ditto.
	* liboffloadmic/runtime/offload_env.h: Ditto.
	* liboffloadmic/runtime/offload_host.cpp: Ditto.
	* liboffloadmic/runtime/offload_host.h: Ditto.
	* liboffloadmic/runtime/offload_myo_host.cpp: Ditto.
	* liboffloadmic/runtime/offload_myo_host.h: Ditto.
	* liboffloadmic/runtime/offload_myo_target.cpp: Ditto.
	* liboffloadmic/runtime/offload_myo_target.h: Ditto.
	* liboffloadmic/runtime/offload_omp_host.cpp: Ditto.
	* liboffloadmic/runtime/offload_omp_target.cpp: Ditto.
	* liboffloadmic/runtime/offload_orsl.cpp: Ditto.
	* liboffloadmic/runtime/offload_orsl.h: Ditto.
	* liboffloadmic/runtime/offload_table.cpp: Ditto.
	* liboffloadmic/runtime/offload_table.h: Ditto.
	* liboffloadmic/runtime/offload_target.cpp: Ditto.
	* liboffloadmic/runtime/offload_target.h: Ditto.
	* liboffloadmic/runtime/offload_target_main.cpp: Ditto.
	* liboffloadmic/runtime/offload_timer.h: Ditto.
	* liboffloadmic/runtime/offload_timer_host.cpp: Ditto.
	* liboffloadmic/runtime/offload_timer_target.cpp: Ditto.
	* liboffloadmic/runtime/offload_trace.cpp: Ditto.
	* liboffloadmic/runtime/offload_trace.h: Ditto.
	* liboffloadmic/runtime/offload_util.cpp: Ditto.
	* liboffloadmic/runtime/offload_util.h: Ditto.
	* liboffloadmic/runtime/ofldbegin.cpp: Ditto.
	* liboffloadmic/runtime/ofldend.cpp: Ditto.
	* liboffloadmic/runtime/orsl-lite/include/orsl-lite.h: Ditto.
	* liboffloadmic/runtime/orsl-lite/lib/orsl-lite.c: Ditto.
	* liboffloadmic/runtime/orsl-lite/version.txt: Ditto.
	* boffloadmic/runtime/rdtsc.h: Ditto.
	* liboffloadmic/runtime/use_mpss2.txt: Ditto.
	* liboffloadmic/runtime/use_mpss_win.txt: Ditto.

--
Thanks, K

[-- Attachment #2: liboffload.patch.tar.bz2 --]
[-- Type: application/x-bzip2, Size: 242286 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-09-10  6:28 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-02 11:13 [PATH] Intel offload library Andrey Turetskiy
2014-07-21  9:46 ` Andrey Turetskiy
2014-07-28  7:33   ` Andrey Turetskiy
2014-07-30 21:26 ` Joseph S. Myers
2014-08-12  6:59   ` Andrey Turetskiy
2014-08-19  8:45     ` Kirill Yukhin
2014-08-26  6:42       ` Andrey Turetskiy
2014-09-04  7:41         ` Andrey Turetskiy
2014-09-10  6:28           ` Andrey Turetskiy
  -- strict thread matches above, loose matches on Subject: below --
2014-06-26 13:34 Kirill Yukhin
2014-06-26 21:27 ` Joseph S. Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).