Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for withnvptx easyconfig parameter, to enable GPU offloading, in GCC easyblock #2235

Merged
merged 2 commits into from
Nov 17, 2020

Conversation

bartoldeman
Copy link
Contributor

GCC supports offloading to NVidia GPUs via OpenMP and OpenACC.
To allow this via the easyblock the following strategy is used:
an iterative build with 3 steps:
0. build and install GCC as usual except adding --without-cuda-driver
--enable-offload-targets=nvptx-none to configopts.

  1. build nvptx-tools with this GCC, install in the same location
  2. build and install GCC with target nvptx-none so it can compile
    NVPTX code.

Thanks to
https://gist.github.com/matthiasdiener/e318e7ed8815872e9d29feb3b9c8413f
https://sources.debian.org/src/gcc-10/10.2.0-17/debian/rules2/
https://github.com/eth-cscs/production/blob/master/easybuild/easyconfigs/g/GCCcore/GCCcore-7.3.0-cuda-9.1-offload.eb
for inspiration.

Closes #2232

GCC supports offloading to NVidia GPUs via OpenMP and OpenACC.
To allow this via the easyblock the following strategy is used:
an iterative build with 3 steps:
0. build and install GCC as usual except adding --without-cuda-driver
   --enable-offload-targets=nvptx-none to configopts.
1. build nvptx-tools with this GCC, install in the same location
2. build and install GCC with target nvptx-none so it can compile
   NVPTX code.

Thanks to
https://gist.github.com/matthiasdiener/e318e7ed8815872e9d29feb3b9c8413f
https://sources.debian.org/src/gcc-10/10.2.0-17/debian/rules2/
https://github.com/eth-cscs/production/blob/master/easybuild/easyconfigs/g/GCCcore/GCCcore-7.3.0-cuda-9.1-offload.eb
for inspiration.

Closes easybuilders#2232
bartoldeman added a commit to ComputeCanada/easybuild-easyconfigs that referenced this pull request Nov 15, 2020
@bartoldeman bartoldeman added this to the 4.3.2 milestone Nov 15, 2020
@bartoldeman bartoldeman changed the title Enable withnvptx parameter: enables GPU offloading GCC: Enable withnvptx parameter: enables GPU offloading Nov 15, 2020
Copy link
Contributor

@Micket Micket left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@boegel
Copy link
Member

boegel commented Nov 17, 2020

Test report by @boegel

Overview of tested easyconfigs (in order)

  • SUCCESS GCCcore-5.4.0.eb
  • SUCCESS GCCcore-6.4.0.eb
  • SUCCESS GCCcore-8.3.0.eb
  • SUCCESS GCCcore-9.3.0.eb
  • SUCCESS GCCcore-10.2.0.eb

Build succeeded for 5 out of 5 (5 easyconfigs in total)
node3409.kirlia.os - Linux centos linux 7.8.2003, x86_64, Intel(R) Xeon(R) Gold 6240 CPU @ 2.60GHz (cascadelake), Python 2.7.5
See https://gist.github.com/24ee9809423a2a2e8bdf3f0ad1f22f36 for a full test report.

@boegel
Copy link
Member

boegel commented Nov 17, 2020

Test report by @boegel

Overview of tested easyconfigs (in order)

  • SUCCESS GCCcore-7.3.0.eb
  • SUCCESS GCCcore-8.3.0.eb
  • SUCCESS GCCcore-9.3.0.eb

Build succeeded for 3 out of 3 (3 easyconfigs in total)
generoso - Linux centos linux 8.2.2004, x86_64, Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz (haswell), Python 3.6.8
See https://gist.github.com/50e7f2a6abfb863aad046a0de63fe87b for a full test report.

@boegel boegel merged commit 730c23b into easybuilders:develop Nov 17, 2020
@boegel boegel changed the title GCC: Enable withnvptx parameter: enables GPU offloading add support for withnvptx easyconfig parameter, to enable GPU offloading, in GCC easyblock Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for OpenMP offloading to NVPTX within GCC
3 participants