Patchwork [wwwdocs] RFC - mention Cilk Plus in the GCC 4.9 release notes

login
register
mail settings
Submitter Tobias Burnus
Date March 8, 2014, 6:25 p.m.
Message ID <531B60A4.7050209@net-b.de>
Download mbox | patch
Permalink /patch/328221/
State New
Headers show

Comments

Tobias Burnus - March 8, 2014, 6:25 p.m.
Hi all,

the attached patch mentions the support of Cilk Plus in GCC 4.9 in the 
release notes, http://gcc.gnu.org/gcc-4.9/changes.html

Is the patch OK?

Tobias

PS: Is it correct that the current implementation only supports ABI 0.9 
of Oct 2010 and not ABI 1.1 of Jul 2011? (Current is 1.2 of Sep 2013, 
cf. http://www.cilkplus.org/download#open-specification) The ABI version 
0.9 is taken from gcc/doc/invoke.texi [The library has CILKLIB1.02.]
Gerald Pfeifer - March 8, 2014, 6:29 p.m.
On Sat, 8 Mar 2014, Tobias Burnus wrote:
> the attached patch mentions the support of Cilk Plus in GCC 4.9 in the 
> release notes, http://gcc.gnu.org/gcc-4.9/changes.html
> 
> Is the patch OK?

"Plus is an extension...", should this read "Cilk Plus is an extension?"

If so, I suggest to switch the second and third sentences: first explain
what it is, then go into specifics such as ABI.

Looks good to me otherwise (modulo the ABI question I cannot answer :-).

Gerald
Iyer, Balaji V - March 8, 2014, 7:15 p.m.
> -----Original Message-----
> From: Gerald Pfeifer [mailto:gerald@pfeifer.com]
> Sent: Saturday, March 8, 2014 1:29 PM
> To: Tobias Burnus
> Cc: gcc-patches; Iyer, Balaji V; Jakub Jelinek
> Subject: Re: [wwwdocs] RFC - mention Cilk Plus in the GCC 4.9 release notes
> 
> On Sat, 8 Mar 2014, Tobias Burnus wrote:
> > the attached patch mentions the support of Cilk Plus in GCC 4.9 in the
> > release notes, http://gcc.gnu.org/gcc-4.9/changes.html
> >
> > Is the patch OK?
> 
> "Plus is an extension...", should this read "Cilk Plus is an extension?"
> 

Yes Cilk Plus is a language extension. It is enabled with -fcilkplus flag.

> If so, I suggest to switch the second and third sentences: first explain what it
> is, then go into specifics such as ABI.
> 

Cilk Plus supports both task and data parallelism and Cilk Plus and thus far all features except _Cilk_for is supported in 4.9. I am not sure what ABI you are referring to but Cilk Plus follows Cilk ABI 1.1.

> Looks good to me otherwise (modulo the ABI question I cannot answer :-).
> 
> Gerald
Tobias Burnus - March 8, 2014, 7:23 p.m.
Iyer, Balaji V wrote:
> Cilk Plus supports both task and data parallelism and Cilk Plus and 
> thus far all features except _Cilk_for is supported in 4.9. I am not 
> sure what ABI you are referring to but Cilk Plus follows Cilk ABI 1.1.

Well, I am referring to the following in gcc/doc/invoke.texi. From your 
answer, it should be either updated to "ABI version 1.1" - or, probably 
better, the ABI version should be removed from invoke.texi. Here is the 
quote:

@item -fcilkplus
@opindex fcilkplus
@cindex Enable Cilk Plus
Enable the usage of Cilk Plus language extension features for C/C++.
When the option @option{-fcilkplus} is specified, enable the usage of
the Cilk Plus Language extension features for C/C++.  The present
implementation follows ABI version 0.9.  This is an experimental
feature that is only partially complete, and whose interface may
change in future versions of GCC as the official specification
changes.  Currently only the array notation feature of the language
specification has been implemented.  More features will be implemented
in subsequent release cycles.


Tobias
Iyer, Balaji V - March 8, 2014, 7:26 p.m.
> -----Original Message-----
> From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches-
> owner@gcc.gnu.org] On Behalf Of Tobias Burnus
> Sent: Saturday, March 8, 2014 2:24 PM
> To: Iyer, Balaji V; Gerald Pfeifer
> Cc: gcc-patches; Jakub Jelinek
> Subject: Re: [wwwdocs] RFC - mention Cilk Plus in the GCC 4.9 release notes
> 
> Iyer, Balaji V wrote:
> > Cilk Plus supports both task and data parallelism and Cilk Plus and
> > thus far all features except _Cilk_for is supported in 4.9. I am not
> > sure what ABI you are referring to but Cilk Plus follows Cilk ABI 1.1.
> 
> Well, I am referring to the following in gcc/doc/invoke.texi. From your
> answer, it should be either updated to "ABI version 1.1" - or, probably better,
> the ABI version should be removed from invoke.texi. Here is the
> quote:
> 
> @item -fcilkplus
> @opindex fcilkplus
> @cindex Enable Cilk Plus
> Enable the usage of Cilk Plus language extension features for C/C++.
> When the option @option{-fcilkplus} is specified, enable the usage of the Cilk
> Plus Language extension features for C/C++.  The present implementation
> follows ABI version 0.9.  This is an experimental feature that is only partially

Thank you for catching this. Yes, it should be ABI 1.1

> complete, and whose interface may change in future versions of GCC as the
> official specification changes.  Currently only the array notation feature of the
> language specification has been implemented.  More features will be

The sentence "Current only..." should be changed to something like this:

Currently all the features except _Cilk_for has been implemented.

Thanks,

Balaji V. Iyer.
Andi Kleen - March 8, 2014, 7:58 p.m.
"Iyer, Balaji V" <balaji.v.iyer@intel.com> writes:
>
> The sentence "Current only..." should be changed to something like this:
>
> Currently all the features except _Cilk_for has been implemented.

It would be also good if the documentation mentioned that you have to
specify -lcilkrts

-Andi
Andi Kleen - March 8, 2014, 8:13 p.m.
Andi Kleen <andi@firstfloor.org> writes:

> "Iyer, Balaji V" <balaji.v.iyer@intel.com> writes:
>>
>> The sentence "Current only..." should be changed to something like this:
>>
>> Currently all the features except _Cilk_for has been implemented.
>
> It would be also good if the documentation mentioned that you have to
> specify -lcilkrts

Also it would be good to specify exactly what parts of Cilk are
supported currently. It's some what hard to figure out.

One trap I ran into (perhaps naively) is that I tried to use 
cilk_spawn (as documented in some tutorials) instead of _Cilk_spawn 

-Andi
Iyer, Balaji V - March 8, 2014, 8:26 p.m.
> -----Original Message-----
> From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches-
> owner@gcc.gnu.org] On Behalf Of Andi Kleen
> Sent: Saturday, March 8, 2014 3:13 PM
> To: Iyer, Balaji V
> Cc: Tobias Burnus; Gerald Pfeifer; gcc-patches; Jakub Jelinek
> Subject: Re: [wwwdocs] RFC - mention Cilk Plus in the GCC 4.9 release notes
> 
> Andi Kleen <andi@firstfloor.org> writes:
> 
> > "Iyer, Balaji V" <balaji.v.iyer@intel.com> writes:
> >>
> >> The sentence "Current only..." should be changed to something like this:
> >>
> >> Currently all the features except _Cilk_for has been implemented.
> >
> > It would be also good if the documentation mentioned that you have to
> > specify -lcilkrts
> 
> Also it would be good to specify exactly what parts of Cilk are supported
> currently. It's some what hard to figure out.
> 
> One trap I ran into (perhaps naively) is that I tried to use cilk_spawn (as
> documented in some tutorials) instead of _Cilk_spawn

_Cilk_spawn is the correct keyword. "cilk_spawn" can be used if the user includes <cilk/cilk.h> which has the following 3 lines (and that's the whole file)

#define cilk_spawn _Cilk_spawn
#define cilk_sync _Cilk_sync
#define cilk_for _Cilk_for


In Cilk there are basically 3 keywords: _Cilk_spawn, _Cilk_sync and _Cilk_for. _Cilk_for patch is still under review but _Cilk_spawn and _Cilk_sync keywords are supported.

> 
> -Andi
Andi Kleen - March 8, 2014, 8:38 p.m.
> _Cilk_spawn is the correct keyword. "cilk_spawn" can be used if the user includes <cilk/cilk.h> which has the following 3 lines (and that's the whole file)
> 
> #define cilk_spawn _Cilk_spawn
> #define cilk_sync _Cilk_sync
> #define cilk_for _Cilk_for
> 
> 
> In Cilk there are basically 3 keywords: _Cilk_spawn, _Cilk_sync and _Cilk_for. _Cilk_for patch is still under review but _Cilk_spawn and _Cilk_sync keywords are supported.

Thanks for explaining. But that should be somewhere in the
documentation. I think you could just put that paragraph in there.

How about all the pragmas, or do these only only exist on icc?
How about special functions?

Basically should have a list of what cilkplus means here.

-Andi
Iyer, Balaji V - March 8, 2014, 8:41 p.m.
> -----Original Message-----
> From: Andi Kleen [mailto:andi@firstfloor.org]
> Sent: Saturday, March 8, 2014 3:38 PM
> To: Iyer, Balaji V
> Cc: Andi Kleen; Tobias Burnus; Gerald Pfeifer; gcc-patches; Jakub Jelinek
> Subject: Re: [wwwdocs] RFC - mention Cilk Plus in the GCC 4.9 release notes
> 
> > _Cilk_spawn is the correct keyword. "cilk_spawn" can be used if the
> > user includes <cilk/cilk.h> which has the following 3 lines (and
> > that's the whole file)
> >
> > #define cilk_spawn _Cilk_spawn
> > #define cilk_sync _Cilk_sync
> > #define cilk_for _Cilk_for
> >
> >
> > In Cilk there are basically 3 keywords: _Cilk_spawn, _Cilk_sync and
> _Cilk_for. _Cilk_for patch is still under review but _Cilk_spawn and
> _Cilk_sync keywords are supported.
> 
> Thanks for explaining. But that should be somewhere in the documentation.
> I think you could just put that paragraph in there.
> 
> How about all the pragmas, or do these only only exist on icc?

They should be supported.

> How about special functions?
Yes.

> 
> Basically should have a list of what cilkplus means here.
> 

Everything except _Cilk_for should be supported.
> -Andi
> 
> --
> ak@linux.intel.com -- Speaking for myself only.
Andi Kleen - March 8, 2014, 8:53 p.m.
> Everything except _Cilk_for should be supported.

Imagine you're a new cilk user. For you it's totally obvious
what "everything" is. But someone new to it they won't it
know anything about "everything". So you have to tell them.

-Andi

Patch

Index: changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.9/changes.html,v
retrieving revision 1.61
diff -p -r1.61 changes.html
*** changes.html	8 Mar 2014 18:09:45 -0000	1.61
--- changes.html	8 Mar 2014 18:15:06 -0000
***************
*** 157,162 ****
--- 157,167 ----
      loop-carried dependencies which would prevent concurrent execution of
      consecutive iterations using SIMD (single instruction multiple data)
      instructions.</li>
+ 
+     <li>Support for <a href="https://www.cilkplus.org/">Cilk Plus</a> has been
+     added and can be enabled with the <code>-fcilkplus</code> option.  The
+     present implementation follows ABI version 0.9. Plus is an extension to the
+     C and C++ languages to support data and task parallelism.</li>
    </ul>           
  
  <h3>C</h3>