Hi Stefan,
Stefan Weigl-Bosker wrote:
My name is Stefan, I'm a second-year computer engineering student
planning to work on a proposal related to openmp 6.0 loop
transformations (motivated by some fun I've had with halide).
(I CC'ed Jakub as he finished up the last loop transformation patches +
is a GCC OpenMP maintainer).
I have some questions that I thought would be worth asking here:
- My personal email seems to hit the spam filter, probably because of
the cheap tld. Is there any way to get this whitelisted, or am i stuck
using this email?
Check with Overseers, https://sourceware.org/mission.html – they
probably need the error message / email header.
- What branch should i be targeting? Besides master, there are the
/devel/omp/* branches, should I be targeting /devel/omp/gcc-15 or
something instead?
Definitely master – there is still some backlog of commits in the OG
branch (currently: OG15 alias devel/omp/gcc-15) but not for loop
transformation. Additionally, the GSoC work falls timewise
- There are some corner cases mentioned in some of the initial loop
transformation work (804c0f35a6b1d75bafc550b4b42155744d77f990). Is it
okay to consider these NYI for my proposal and figure them out later?
Jakub, as you wrote it – do you want to comment on your commit
r15-1037-g804c0f35a6b1d7 / https://gcc.gnu.org/r15-1037-g804c0f35a6b1d7 ?
(on that note, is there something more in depth than the OpenMP spec
that I should be referencing?)
I think there is nothing more in depth – but the example document has a
chapter "8 Loop Transformations" which might help.
https://www.openmp.org/specifications/ → Examples; the example files
themselves can be found in the */sources/ subdirectories of the repo at
https://github.com/OpenMP/Examples
If there is something unclear on the spec side: OpenMP members like Red
Hat (→ Jakub), SUSE, and BayLibre (→ me) can access the nonpublic issue
tracker and especially for loop transformations, there are quite
extensive notes about meeting discussions of certain features.
Otherwise, I have not really seen the transformations in the wild.
* * *
Newer OpenMP features (See Appendix B):
* The fanciest new feature to OpenMP's loop transformation is surely the
'apply' clause. I have not tried to understand how hard it will be to
implement it.
* New transformations: OpenMP 6.0 added fuse, interchange, reverse,
split and stride. OpenMP 6.1 will add flatten (see Technical Report 14;
6.1 is scheduled for November this year).
* Otherwise: 'sizes' clause (used by tile and new stride) permits
non-constant values; the 'tile' construct now has the modifiers grid and
intratile.
* Otherwise in OpenMP 6.1: new 'shift' clause to 'tile', 'sizes' clause
has now the modifiers 'grid' and 'tile'
* And there is a new restriction in 6.0:
"A restriction for loop-transforming constructs was added that the
generated loop must not be a doacross-affected loop, which implies that,
in an unroll construct with an unroll-factor of one, a stand-alone
ordered directive is now non-conforming (see Chapter 17, Section 17.11
and Section 23.10.1)."
- Id like to send my proposal for feedback when it is ready. What is
the right way to do that? I imagine attaching a PDF here isn't ideal.
Either share it with a smaller group or find a place to upload?
Ive just done some parser stuff so far, and im working on the
gimplification right now. Ill be working in my fork
https://github.com/sweiglbosker/gcc/tree/omp-stuff if someone wants to
take a look.
That's support for 'reverse' in C/C++. (You eventually want to add it
also to Fortran, but the representation there is a bit different.
Otherwise, I only glanced at it.)
Thanks for the interest in contributing to GCC!
Tobias