From 43eb264e14220c05d1c10e8bda8b013b0cc9dec9 Mon Sep 17 00:00:00 2001 From: SamiAario-AMD Date: Fri, 5 Sep 2025 19:48:01 +0300 Subject: [PATCH] Fix build breaks in the elementwise examples (#2789) * Include variant in elementwise_common.hpp * Disallow bf16_t for both UnarySquare and UnaryConvert in elementwise_example_unary.cpp [ROCm/composable_kernel commit: 7d81f85d157ce64199e29c79dcdb0d3cd180186d] --- example/ck_tile/21_elementwise/elementwise_common.hpp | 1 + .../ck_tile/21_elementwise/elementwise_example_unary.cpp | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/example/ck_tile/21_elementwise/elementwise_common.hpp b/example/ck_tile/21_elementwise/elementwise_common.hpp index fb6af4d3e0..fd7889bd35 100644 --- a/example/ck_tile/21_elementwise/elementwise_common.hpp +++ b/example/ck_tile/21_elementwise/elementwise_common.hpp @@ -1,6 +1,7 @@ // SPDX-License-Identifier: MIT // Copyright (c) 2025, Advanced Micro Devices, Inc. All rights reserved. +#include #include "ck_tile/core/arch/arch.hpp" auto string_to_datatype(const std::string& datatype) diff --git a/example/ck_tile/21_elementwise/elementwise_example_unary.cpp b/example/ck_tile/21_elementwise/elementwise_example_unary.cpp index a1804ea52e..54533e01b2 100644 --- a/example/ck_tile/21_elementwise/elementwise_example_unary.cpp +++ b/example/ck_tile/21_elementwise/elementwise_example_unary.cpp @@ -158,7 +158,14 @@ bool filter_then_run(const ck_tile::ArgParser& arg_parser) bool pass = true; if constexpr(std::is_same_v && - std::is_same_v) + (std::is_same_v || + std::is_same_v)) + { + throw_unsupported(); + } + else if constexpr(std::is_same_v && + (std::is_same_v || + std::is_same_v)) { throw_unsupported(); }