-
Notifications
You must be signed in to change notification settings - Fork 21
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
Fix Clang warning with __builtin_assume #1788
Fix Clang warning with __builtin_assume #1788
Conversation
Hi there, this is jenkins continuous integration... |
launch jenkins |
launch perftests |
launch jenkins |
launch perftests |
launch jenkins |
1 similar comment
launch jenkins |
does it have any effect on perftests? if not, we can merge. |
Looks like: https://jenkins-mch.cscs.ch/job/GridTools/job/GridTools_perftest_PR/326/env=cray,label=daint-cn/Results/ |
launch perftest |
Building the project with `Clang` generates the following warning: ``` the argument to '__builtin_assume' has side effects that will be discarded [-Wassume] ``` Seems like Clang doesn't handle the hint well unless we pass a const/pure attribute to the function call inside the assume. See: llvm/llvm-project#55636 and llvm/llvm-project#93077 With this change performance for the fn fused nabla examples is significantly improved on clang-cuda and is now much faster than (our old) nvcc, which doesn't have `assume` support.
Building the project with
Clang
generates the following warning:Seems like Clang doesn't handle the hint well unless we pass a const/pure attribute to the function call inside the assume. See: llvm/llvm-project#55636 and llvm/llvm-project#93077
With this change performance for the fn fused nabla examples is significantly improved on clang-cuda and is now much faster than (our old) nvcc, which doesn't have
assume
support.