This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: OpenACC middle end changes


On Thu, Dec 18, 2014 at 01:24:20PM +0100, Thomas Schwinge wrote:
> Hi Jakub!
> 
> On Thu, 18 Dec 2014 13:15:38 +0100, Jakub Jelinek <jakub@redhat.com> wrote:
> > On Thu, Dec 18, 2014 at 01:02:22PM +0100, Jakub Jelinek wrote:
> > > On Thu, Dec 18, 2014 at 12:38:53PM +0100, Jakub Jelinek wrote:
> > > > So, is what is on the gomp-4_0-branch now all that you'd like to merge to
> > > > trunk now?
> 
> Basically, yes.  Only "basically", because there are still a few
> unaddressed review issues in the front ends -- which I'll look into now.
> (Meaning really: now.)  :-)
> 
> 
> Doing the "merge" as one big commit on trunk will be the easiest
> approach, of course.  Is that OK, or is there any requirement to single
> out any of the changes, such as the
> libgomp/testsuite/libgomp-test-support.exp file just discussed, or the
> libgomp »Offloading and Multi Processing Runtime Library« renaming, or
> anything else?

Doing one big merge is ok with me.  If one needs to bisect something, they
can look at the gomp-4_0-branch.

> > > > Has it been tested on nvptx?
> 
> I have always been testing on gomp-4_0-branch with ACC_DEVICE_TYPE=host
> and ACC_DEVICE_TYPE=host_nonshm, plus with ACC_DEVICE_TYPE=nvidia in an
> internal branch.  This branch corresponds to gomp-4_0-branch, but also
> includes a few patches related to offloading that Bernd has posted for
> trunk approval, but has not yet gotten approved.

Do you have a list of them (URLs)?  Have they been pinged?
Are they show stoppers for the offloading, or just some tests fail because
of that?

> > > > I guess we should test it with
> > > > XeonPhi offloading too to make sure it doesn't break.
> 
> Right.  Do you happen to be set up for such testing?  I have not yet
> managed to properly change my build/test scripts for
> x86_64-intelmicemul-linux-gnu.

Anyone with x86_64-linux should be able to test that (i.e. the emulation),
for real offloading (that ix x86_64-intelmic-linux-gnu) you supposedly need
2 libraries, some kernel module, some distro installed on the offloading
device and most importantly the hw.

> --- gcc/config.gcc
> +++ gcc/config.gcc
> @@ -2906,6 +2906,7 @@ esac
>  case ${target} in
>  *-intelmic-* | *-intelmicemul-*)
>  	tmake_file="${tmake_file} i386/t-intelmic"
> +	tm_file="${tm_file} i386/intelmic-offload.h"
>  	;;
>  esac
>  
> diff --git gcc/config/i386/intelmic-offload.h gcc/config/i386/intelmic-offload.h
> new file mode 100644
> index 0000000..dc346c7
> --- /dev/null
> +++ gcc/config/i386/intelmic-offload.h
> @@ -0,0 +1,35 @@
> +/* Definitions for Intel MIC offloading.
> +
> +   Copyright (C) 2014 Free Software Foundation, Inc.
> +
> +   This file is part of GCC.
> +
> +   GCC is free software; you can redistribute it and/or modify
> +   it under the terms of the GNU General Public License as published by
> +   the Free Software Foundation; either version 3, or (at your option)
> +   any later version.
> +
> +   GCC is distributed in the hope that it will be useful,
> +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +   GNU General Public License for more details.
> +
> +   Under Section 7 of GPL version 3, you are granted additional
> +   permissions described in the GCC Runtime Library Exception, version
> +   3.1, as published by the Free Software Foundation.
> +
> +   You should have received a copy of the GNU General Public License and
> +   a copy of the GCC Runtime Library Exception along with this program;
> +   see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
> +   <http://www.gnu.org/licenses/>.  */
> +
> +#ifndef INTELMIC_OFFLOAD_H
> +#define INTELMIC_OFFLOAD_H
> +
> +/* Support for OpenACC acc_on_device.  */
> +
> +#include "gomp-constants.h"
> +
> +#define ACCEL_COMPILER_acc_device GOMP_DEVICE_INTEL_MIC
> +
> +#endif

LGTM.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]