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

Backport: add and use preprocessors macros for loop unrolling (#32499) #596

Merged
merged 2 commits into from
Dec 21, 2020

Conversation

fwyzard
Copy link

@fwyzard fwyzard commented Dec 21, 2020

Define preprocessor macros that expand to pragmas controlling loop unrolling.
Two set of macros are defined:

  • CMS_UNROLL_LOOP and friends are applied on both host and device compilation
  • CMS_DEVICE_UNROLL_LOOP and friends are only applied in device compilation, and expand to nothing on the host

The supported compilers are

  • CUDA nvcc
  • HIP (untested)
  • gcc
  • clang

Use CMS_UNROLL_LOOP instead of #pragma unroll.

Define preprocessor macros that exoand to pragmas controlling loop unrolling.
Two set of macrso are defined:
  - CMS_UNROLL_LOOP and friends are applied on both host and device compilation
  - CMS_DEVICE_UNROLL_LOOP and friends is only applied in device compilation,
    and expands to nothing on the host

The supported compilers are
  - CUDA nvcc
  - HIP (untested)
  - gcc
  - clang
@fwyzard fwyzard merged commit 72676e6 into cms-patatrack:CMSSW_11_2_X_Patatrack Dec 21, 2020
@fwyzard fwyzard deleted the backport_32499 branch December 21, 2020 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant