GridTools / gridtools

Libraries and utilities to develop performance portable applications for weather and climate.
https://gridtools.github.io/gridtools
Other
60 stars 21 forks source link

Fix Clang warning with __builtin_assume #1788

Closed iomaganaris closed 2 months ago

iomaganaris commented 3 months ago

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: https://github.com/llvm/llvm-project/issues/55636 and https://github.com/llvm/llvm-project/pull/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.

gridtoolsjenkins commented 3 months ago

Hi there, this is jenkins continuous integration... Do you want me to verify this patch?

iomaganaris commented 3 months ago

launch jenkins

iomaganaris commented 3 months ago

launch perftests

iomaganaris commented 3 months ago

launch jenkins

iomaganaris commented 3 months ago

launch perftests

iomaganaris commented 3 months ago

launch jenkins

havogt commented 2 months ago

launch jenkins

havogt commented 2 months ago

does it have any effect on perftests? if not, we can merge.

fthaler commented 2 months ago

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/ But not sure if it is up to date with master references.

fthaler commented 2 months ago

launch perftest