public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [GOMP4, RFC] OpenMP4 offload support for Intel PHI targets.
@ 2014-07-02  8:38 Kirill Yukhin
  2014-07-06 22:11 ` Gerald Pfeifer
  2014-07-08 11:50 ` Kirill Yukhin
  0 siblings, 2 replies; 11+ messages in thread
From: Kirill Yukhin @ 2014-07-02  8:38 UTC (permalink / raw)
  To: GCC Patches
  Cc: Jakub Jelinek, bernds, thomas, Richard Biener, andrey.turetskiy, iverbin

Hello,
I would like to announce creation of a dedicated branch gomp4-offload to speed up review of FE-independent offload-related features.

This branch includes:
     - set of necessary patches from gomp4 branch
     - set of patches which we were developed internally and were unable to share
     - yet to be checked-into-trunk `liboffloadmic'
       (review started here: https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02133.html)
     - 10 new tests for offload written using OpenMP4, which replicates `OpenMP4 examples'

This branch should be capable to perform offload to Intel targets (Xeon PHI)
to help people to perform experiments emulator of MIC's software stack is included.
This emulator lies under `liboffloadmic' and reproduces MIC's HW and SW stack behavior
allowing to perform non-fallback execution of target regions using the host machine.
We're going to start efforts to review and integrate these changes to GCC main trunk.

We appreciate your feedback!
Many changes are vexed, especially autogen-related since we're dummies here.
Currently bootstrap is broken (because of few warnings) and will be fixed soon.

Here is a manual describing how to build compiler and run OpenMP offload apps:
1. Building accel compiler:
   /gcc_src/configure --disable-bootstrap --enable-accelerator=intelmic --enable-as-accelerator-for=x86_64-unknown-linux-gnu --enable-liboffloadmic=target --prefix=/install_mic
   make
   make install

2. Building host compiler:
   export LIBOFFLOAD_TARGET_PATH="/install_mic/lib64"
   /gcc_src/configure --disable-bootstrap --enable-accelerator=intelmic --enable-liboffloadmic=host --prefix=/install_host
   make
   make install

3. Building an application:
   export LD_LIBRARY_PATH="/install_host/lib64"
   export MKOFFLOAD="/install_mic/libexec/gcc/x86_64-unknown-linux-gnu/4.10.0/accel/x86_64-unknown-linux-gnu/mkoffload"
   /install_host/bin/gcc -fopenmp -flto test.c

4. Running an application:
   export LIBGOMP_PLUGIN_PATH="/gcc_build/x86_64-unknown-linux-gnu/libgomp/plugins/intelmic"
   export MIC_LD_LIBRARY_PATH="/install_mic/lib64/"
   ./a.out

5. make check. Run tests (w/ emulator)
   export LD_LIBRARY_PATH="/install_host/lib64"
   export MKOFFLOAD="/install_mic/libexec/gcc/x86_64-unknown-linux-gnu/4.10.0/accel/x86_64-unknown-linux-gnu/mkoffload"
   export LIBGOMP_PLUGIN_PATH="/gcc_build/x86_64-unknown-linux-gnu/libgomp/plugins/intelmic"
   export MIC_LD_LIBRARY_PATH="/install_mic/lib64/"
   make check-target-libgomp

Do not delete build dir of the host compiler, since 'make install' for libgomp plugin is not working yet.
Also there might be an issue with building libgomp plugin when using relative path to the 'configure'.

It is GIT-only branch, name is: kyukhin/gomp4-offload
URL: https://gcc.gnu.org/git/?p=gcc.git;a=shortlog;h=refs/heads/kyukhin/gomp4-offload

--
Thanks, K

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

* Re: [GOMP4, RFC] OpenMP4 offload support for Intel PHI targets.
  2014-07-02  8:38 [GOMP4, RFC] OpenMP4 offload support for Intel PHI targets Kirill Yukhin
@ 2014-07-06 22:11 ` Gerald Pfeifer
  2014-07-08 11:50 ` Kirill Yukhin
  1 sibling, 0 replies; 11+ messages in thread
From: Gerald Pfeifer @ 2014-07-06 22:11 UTC (permalink / raw)
  To: Kirill Yukhin
  Cc: GCC Patches, Jakub Jelinek, bernds, thomas, Richard Biener,
	andrey.turetskiy, iverbin

Hi Kirill,

On Wed, 2 Jul 2014, Kirill Yukhin wrote:
> I would like to announce creation of a dedicated branch gomp4-offload to 
> speed up review of FE-independent offload-related features.

mind documenting this in https://gcc.gnu.org/svn.html as well?

(If this requires more involved configuration as it seems, in
addition to the regular information on a branch there, perhaps
include a link to this message of yours?)

If you need help, let me know, I'll be happy to.

Gerald

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

* Re: [GOMP4, RFC] OpenMP4 offload support for Intel PHI targets.
  2014-07-02  8:38 [GOMP4, RFC] OpenMP4 offload support for Intel PHI targets Kirill Yukhin
  2014-07-06 22:11 ` Gerald Pfeifer
@ 2014-07-08 11:50 ` Kirill Yukhin
  2014-07-14  6:08   ` Kirill Yukhin
  1 sibling, 1 reply; 11+ messages in thread
From: Kirill Yukhin @ 2014-07-08 11:50 UTC (permalink / raw)
  To: GCC Patches
  Cc: Jakub Jelinek, bernds, thomas, Richard Biener, andrey.turetskiy, iverbin

Hello,
We recently checked into gomp4-offload branch fix allowing bootstrap to pass
as well as fix for disabling multilib for liboffloadmic (64-bit only).

--
Thanks, K

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

* Re: [GOMP4, RFC] OpenMP4 offload support for Intel PHI targets.
  2014-07-08 11:50 ` Kirill Yukhin
@ 2014-07-14  6:08   ` Kirill Yukhin
  2014-07-15  9:43     ` Kirill Yukhin
  0 siblings, 1 reply; 11+ messages in thread
From: Kirill Yukhin @ 2014-07-14  6:08 UTC (permalink / raw)
  To: GCC Patches
  Cc: Jakub Jelinek, bernds, thomas, Richard Biener, andrey.turetskiy, iverbin

Hello,

We've fixed build infrastructure to allow both host- and accel-compilers to live
in the same directory.
We've also got rid off some [necessary for build] environment variables.

Unfortunately currently it’s impossible to run make check-target-libgomp
from the build dir, since both accel- and host-compilers need to be installed
into the same dir, otherwise host’s gcc will not find accel’s mkoffload.

Bootstrapped.
Rebaed on recent trunk.

Updated manual:

1. Building accel compiler:

/gcc_src/configure --build=x86_64-intelmic-linux-gnu --host=x86_64-intelmic-linux-gnu --target=x86_64-intelmic-linux-gnu --enable-as-accelerator-for=x86_64-pc-linux-gnu --enable-liboffloadmic=target --prefix=/install target_configargs="--enable-version-specific-runtime-libs"
make
make install

2. Building host compiler:

export LIBOFFLOAD_TARGET_PATH="/install/lib/gcc/x86_64-intelmic-linux-gnu/4.10.0/"
/gcc_src/configure --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --enable-offload-targets=x86_64-intelmic-linux-gnu --enable-liboffloadmic=host --prefix=/install
make
make install

3. Building an application:

/install/bin/gcc -fopenmp -flto test.c

4. Running an application:

export LIBGOMP_PLUGIN_PATH="/gcc_build_host/x86_64-pc-linux-gnu/libgomp/plugins/intelmic"
export LD_LIBRARY_PATH="/install/lib64/"
export MIC_LD_LIBRARY_PATH="/install/lib/gcc/x86_64-intelmic-linux-gnu/4.10.0/"
./a.out

Do not delete build dir of the host compiler, since 'make install' for libgomp plugin is not working yet.
Also there might be an issue with building libgomp plugin when using relative path to the 'configure'.

--
Thanks, K

PS: I've rebased kyukhin/gomp4-offload, so hashes are new.

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

* Re: [GOMP4, RFC] OpenMP4 offload support for Intel PHI targets.
  2014-07-14  6:08   ` Kirill Yukhin
@ 2014-07-15  9:43     ` Kirill Yukhin
  2014-07-19 10:43       ` Kirill Yukhin
  0 siblings, 1 reply; 11+ messages in thread
From: Kirill Yukhin @ 2014-07-15  9:43 UTC (permalink / raw)
  To: GCC Patches
  Cc: Jakub Jelinek, bernds, thomas, Richard Biener, andrey.turetskiy, iverbin

Hello,
> Unfortunately currently it’s impossible to run make check-target-libgomp
> from the build dir, since both accel- and host-compilers need to be installed
> into the same dir, otherwise host’s gcc will not find accel’s mkoffload.
We found workaround to allow make check-target-libgomp.
So, here's addendum to previous's message manual

    5. make check (run tests using the emulator):

    configure, make and *install* accel compiler (see #1)
    configure and make host compiler (see #2)
    export COMPILER_PATH="/install/libexec/gcc/x86_64-pc-linux-gnu/4.10.0"
    export LIBGOMP_PLUGIN_PATH="/gcc_build_host/x86_64-pc-linux-gnu/libgomp/plugins/intelmic"
    export LD_LIBRARY_PATH="/gcc_build_host/x86_64-pc-linux-gnu/liboffloadmic/.libs"
    export MIC_LD_LIBRARY_PATH="/install/lib/gcc/x86_64-intelmic-linux-gnu/4.10.0/"
    cd gcc_build_host
    make check-target-libgomp

--
Thanks, K

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

* Re: [GOMP4, RFC] OpenMP4 offload support for Intel PHI targets.
  2014-07-15  9:43     ` Kirill Yukhin
@ 2014-07-19 10:43       ` Kirill Yukhin
  2014-07-25 17:10         ` Kirill Yukhin
  0 siblings, 1 reply; 11+ messages in thread
From: Kirill Yukhin @ 2014-07-19 10:43 UTC (permalink / raw)
  To: GCC Patches
  Cc: Jakub Jelinek, bernds, thomas, Richard Biener, andrey.turetskiy, iverbin

Hello,

We've slightly improved mkoffload.

Branch was rebased.

--
Thanks, K

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

* Re: [GOMP4, RFC] OpenMP4 offload support for Intel PHI targets.
  2014-07-19 10:43       ` Kirill Yukhin
@ 2014-07-25 17:10         ` Kirill Yukhin
  2014-08-07 14:36           ` Kirill Yukhin
  0 siblings, 1 reply; 11+ messages in thread
From: Kirill Yukhin @ 2014-07-25 17:10 UTC (permalink / raw)
  To: GCC Patches
  Cc: Jakub Jelinek, bernds, thomas, Richard Biener, andrey.turetskiy, iverbin

Hello,
Branch was rebased on trunk.

It contains fixes for several issues in the build system.
Now 'configure' can be called using relative path.

Also some options are now unnecessary, updated manual is posted
on wiki: https://gcc.gnu.org/wiki/Offloading in "How to try offloading enabled GCC".

--
Thanks, K

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

* Re: [GOMP4, RFC] OpenMP4 offload support for Intel PHI targets.
  2014-07-25 17:10         ` Kirill Yukhin
@ 2014-08-07 14:36           ` Kirill Yukhin
  2014-08-21 13:51             ` Ilya Verbin
  0 siblings, 1 reply; 11+ messages in thread
From: Kirill Yukhin @ 2014-08-07 14:36 UTC (permalink / raw)
  To: GCC Patches
  Cc: Jakub Jelinek, bernds, thomas, Richard Biener, andrey.turetskiy, iverbin

Hello,
On 25 Jul 20:55, Kirill Yukhin wrote:
> Hello,
> Branch was rebased on trunk.
> 
> It contains fixes for several issues in the build system.
> Now 'configure' can be called using relative path.
> 
> Also some options are now unnecessary, updated manual is posted
> on wiki: https://gcc.gnu.org/wiki/Offloading in "How to try offloading enabled GCC".

Branch was rebased again.
It contains:
* A fix for omp-low.c: offload_funcs/vars are no more corrupted by garbage collector.
* A fix for libgomp: gomp_init_device and splay_tree_lookup are now surrounded by gomp_mutex_lock/unlock.
* Several tests in libgomp/testsuite are fixed.
* Changes in liboffloadmic+emulator:
  1. Fix issues noted by Joseph Myers (https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02166.html)
  2. Implement one more COI interface function;
  3. Fix emulator shutdown when target execution is interrupted;
  4. Clean up code.

Bootstrap passed.

--
Thanks, K

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

* Re: [GOMP4, RFC] OpenMP4 offload support for Intel PHI targets.
  2014-08-07 14:36           ` Kirill Yukhin
@ 2014-08-21 13:51             ` Ilya Verbin
  2014-09-09 11:21               ` Ilya Verbin
  0 siblings, 1 reply; 11+ messages in thread
From: Ilya Verbin @ 2014-08-21 13:51 UTC (permalink / raw)
  To: GCC Patches
  Cc: Kirill Yukhin, Jakub Jelinek, Bernd Schmidt, Thomas Schwinge,
	Richard Biener, Andrey Turetskiy

Hello,

The branch was rebased and updated:
https://gcc.gnu.org/git/?p=gcc.git;a=shortlog;h=refs/heads/kyukhin/gomp4-offload

Now it requires even less actions to build and run an executable with offloading.
Instructions on wiki were updated:
https://gcc.gnu.org/wiki/Offloading#How_to_try_offloading_enabled_GCC

Bootstrap and all tests in 'make check-target-libgomp' passed.

  -- Ilya

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

* Re: [GOMP4, RFC] OpenMP4 offload support for Intel PHI targets.
  2014-08-21 13:51             ` Ilya Verbin
@ 2014-09-09 11:21               ` Ilya Verbin
  2014-09-26 12:43                 ` Ilya Verbin
  0 siblings, 1 reply; 11+ messages in thread
From: Ilya Verbin @ 2014-09-09 11:21 UTC (permalink / raw)
  To: GCC Patches
  Cc: Kirill Yukhin, Jakub Jelinek, Bernd Schmidt, Thomas Schwinge,
	Richard Biener, Andrey Turetskiy

Hello,

The branch was rebased and updated again:
https://gcc.gnu.org/git/?p=gcc.git;a=shortlog;h=refs/heads/kyukhin/gomp4-offload

Now offloading works without -flto option.  Also there is no need to set LIBGOMP_PLUGIN_PATH.
https://gcc.gnu.org/wiki/Offloading was updated accordingly.

All tests in 'make check-target-libgomp' pass in the emulator with separate address space.

  -- Ilya

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

* Re: [GOMP4, RFC] OpenMP4 offload support for Intel PHI targets.
  2014-09-09 11:21               ` Ilya Verbin
@ 2014-09-26 12:43                 ` Ilya Verbin
  0 siblings, 0 replies; 11+ messages in thread
From: Ilya Verbin @ 2014-09-26 12:43 UTC (permalink / raw)
  To: Jakub Jelinek, GCC Patches
  Cc: Kirill Yukhin, Bernd Schmidt, Thomas Schwinge, Richard Biener,
	Andrey Turetskiy

Hi,

I also rebased and updated our branch:
https://gcc.gnu.org/git/?p=gcc.git;a=shortlog;h=refs/heads/kyukhin/gomp4-offload

It contains fixes for the issues, mentioned in "Offloading not relocatable".

https://gcc.gnu.org/wiki/Offloading was updated accordingly.

  -- Ilya

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

end of thread, other threads:[~2014-09-26 12:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-02  8:38 [GOMP4, RFC] OpenMP4 offload support for Intel PHI targets Kirill Yukhin
2014-07-06 22:11 ` Gerald Pfeifer
2014-07-08 11:50 ` Kirill Yukhin
2014-07-14  6:08   ` Kirill Yukhin
2014-07-15  9:43     ` Kirill Yukhin
2014-07-19 10:43       ` Kirill Yukhin
2014-07-25 17:10         ` Kirill Yukhin
2014-08-07 14:36           ` Kirill Yukhin
2014-08-21 13:51             ` Ilya Verbin
2014-09-09 11:21               ` Ilya Verbin
2014-09-26 12:43                 ` Ilya Verbin

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).