From 8d454aa01d2891fc1b50204a4fc4aec234e7512d Mon Sep 17 00:00:00 2001 From: Illia Silin <98187287+illsilin@users.noreply.github.com> Date: Tue, 4 Nov 2025 18:54:14 -0800 Subject: [PATCH] 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 [ROCm/composable_kernel commit: 930423ab3b0a4330bff025c9c07aefbaf4590c87] --- Jenkinsfile | 3 ++- .../ck/tensor_operation/gpu/element/element_wise_operation.hpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index aa4045186e..80db99684a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1836,10 +1836,11 @@ pipeline { } agent{ label rocmnode("gfx90a") } environment{ - setup_args = """ -DCMAKE_INSTALL_PREFIX=../install -DGPU_TARGETS="gfx90a" -DCMAKE_CXX_FLAGS=" -O3 " """ + setup_args = """ -DCMAKE_INSTALL_PREFIX=../install -DGPU_TARGETS="gfx90a" -DCK_CXX_STANDARD="17" -DCMAKE_CXX_FLAGS=" -O3 " """ execute_args = """ cd ../client_example && rm -rf build && mkdir build && cd build && \ cmake -DCMAKE_PREFIX_PATH="${env.WORKSPACE}/install;/opt/rocm" \ -DGPU_TARGETS="gfx90a" \ + -DCK_CXX_STANDARD="17" \ -DCMAKE_CXX_COMPILER="${build_compiler()}" \ -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang \ -DCMAKE_CXX_FLAGS=" -O3 " .. && make -j """ diff --git a/include/ck/tensor_operation/gpu/element/element_wise_operation.hpp b/include/ck/tensor_operation/gpu/element/element_wise_operation.hpp index 6f24bf3df8..1bb0b63792 100644 --- a/include/ck/tensor_operation/gpu/element/element_wise_operation.hpp +++ b/include/ck/tensor_operation/gpu/element/element_wise_operation.hpp @@ -73,7 +73,7 @@ struct AddReluAdd __host__ __device__ constexpr void operator()( half_t& y, const float& x0, const half_t& x1, const half_t& x2) const { - float y_float; + float y_float = 0.0; (*this)(y_float, x0, x1, x2); y = y_float; }