Skip to content

Commit 930423a

Browse files
authored
Initialize new variable to prevent c++17 compiler error (#3156)
* initialize new variable to prevent c++17 compiler error * build for gfx90a using -std=c++17 flag
1 parent 31c019f commit 930423a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Jenkinsfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1836,10 +1836,11 @@ pipeline {
18361836
}
18371837
agent{ label rocmnode("gfx90a") }
18381838
environment{
1839-
setup_args = """ -DCMAKE_INSTALL_PREFIX=../install -DGPU_TARGETS="gfx90a" -DCMAKE_CXX_FLAGS=" -O3 " """
1839+
setup_args = """ -DCMAKE_INSTALL_PREFIX=../install -DGPU_TARGETS="gfx90a" -DCK_CXX_STANDARD="17" -DCMAKE_CXX_FLAGS=" -O3 " """
18401840
execute_args = """ cd ../client_example && rm -rf build && mkdir build && cd build && \
18411841
cmake -DCMAKE_PREFIX_PATH="${env.WORKSPACE}/install;/opt/rocm" \
18421842
-DGPU_TARGETS="gfx90a" \
1843+
-DCK_CXX_STANDARD="17" \
18431844
-DCMAKE_CXX_COMPILER="${build_compiler()}" \
18441845
-DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang \
18451846
-DCMAKE_CXX_FLAGS=" -O3 " .. && make -j """

include/ck/tensor_operation/gpu/element/element_wise_operation.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ struct AddReluAdd
7373
__host__ __device__ constexpr void operator()<half_t, float, half_t, half_t>(
7474
half_t& y, const float& x0, const half_t& x1, const half_t& x2) const
7575
{
76-
float y_float;
76+
float y_float = 0.0;
7777
(*this)(y_float, x0, x1, x2);
7878
y = y_float;
7979
}

0 commit comments

Comments
 (0)