From 9799e16c97694c127fb6b409ac641f380156c739 Mon Sep 17 00:00:00 2001 From: Weiqun Zhang Date: Wed, 17 Apr 2024 09:48:59 -0700 Subject: [PATCH] Update HIP CIs for rocm 6.1.0 We can no longer use `-fno-operator-names` because rocm 6.1.0 uses operator names such as `or` in macros. --- .github/workflows/hip.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/hip.yml b/.github/workflows/hip.yml index 0a66bac0ab3..2cd9c0eae92 100644 --- a/.github/workflows/hip.yml +++ b/.github/workflows/hip.yml @@ -34,7 +34,11 @@ jobs: # ^ # /opt/rocm-4.1.1/hip/include/hip/hcc_detail/hip_runtime.h:176:9: note: macro 'select_impl_' defined here # #define select_impl_(_1, _2, impl_, ...) impl_ - env: {CXXFLAGS: "-fno-operator-names -Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -Wnon-virtual-dtor -Wno-deprecated-declarations -Wno-gnu-zero-variadic-macro-arguments"} + # Have to remove "-fno-operator-names to avoid + # /opt/rocm-6.1.0/include/rocprim/device/detail/device_adjacent_difference.hpp:198:26: error: token is not a valid binary operator in a preprocessor subexpression + # 198 | #if defined(__gfx1102__) or defined(__gfx1030__) + # | ~~~~~~~~~~~~~~~~~~~~~^~ + env: {CXXFLAGS: "-Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -Wnon-virtual-dtor -Wno-deprecated-declarations -Wno-gnu-zero-variadic-macro-arguments"} run: | export CCACHE_COMPRESS=1 export CCACHE_COMPRESSLEVEL=10 @@ -98,7 +102,11 @@ jobs: # ^ # /opt/rocm-4.1.1/hip/include/hip/hcc_detail/hip_runtime.h:176:9: note: macro 'select_impl_' defined here # #define select_impl_(_1, _2, impl_, ...) impl_ - env: {CXXFLAGS: "-fno-operator-names -Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -Wnon-virtual-dtor -Wno-deprecated-declarations -Wno-gnu-zero-variadic-macro-arguments"} + # Have to remove "-fno-operator-names to avoid + # /opt/rocm-6.1.0/include/rocprim/device/detail/device_adjacent_difference.hpp:198:26: error: token is not a valid binary operator in a preprocessor subexpression + # 198 | #if defined(__gfx1102__) or defined(__gfx1030__) + # | ~~~~~~~~~~~~~~~~~~~~~^~ + env: {CXXFLAGS: "-Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -Wnon-virtual-dtor -Wno-deprecated-declarations -Wno-gnu-zero-variadic-macro-arguments"} run: | export CCACHE_COMPRESS=1 export CCACHE_COMPRESSLEVEL=10 @@ -158,7 +166,7 @@ jobs: ccache -z ./configure --dim 2 --with-hip yes --enable-eb yes --enable-xsdk-defaults yes --with-mpi no --with-omp no --single-precision yes --single-precision-particles yes - make -j4 WARN_ALL=TRUE XTRA_CXXFLAGS="-fno-operator-names" AMD_ARCH=gfx90a CCACHE=ccache + make -j4 WARN_ALL=TRUE AMD_ARCH=gfx90a CCACHE=ccache make install ccache -s @@ -189,7 +197,7 @@ jobs: ccache -z cd Tests/LinearSolvers/NodeEB - make -j4 USE_HIP=TRUE USE_MPI=FALSE BL_NO_FORT=TRUE WARN_ALL=TRUE WARN_ERROR=TRUE XTRA_CXXFLAGS=-fno-operator-names AMD_ARCH=gfx90a CCACHE=ccache + make -j4 USE_HIP=TRUE USE_MPI=FALSE BL_NO_FORT=TRUE WARN_ALL=TRUE WARN_ERROR=TRUE AMD_ARCH=gfx90a CCACHE=ccache ccache -s du -hs ~/.cache/ccache