diff --git a/include/ck/tensor_operation/gpu/thread/threadwise_tensor_slice_transfer_v7r3.hpp b/include/ck/tensor_operation/gpu/thread/threadwise_tensor_slice_transfer_v7r3.hpp index f8b08d6c6e..60734d3493 100644 --- a/include/ck/tensor_operation/gpu/thread/threadwise_tensor_slice_transfer_v7r3.hpp +++ b/include/ck/tensor_operation/gpu/thread/threadwise_tensor_slice_transfer_v7r3.hpp @@ -286,9 +286,25 @@ struct ThreadwiseTensorSliceTransfer_v7r3 static_for<0, nDst, 1>{}([&](auto i) { using elm_vector_t = typename remove_cvref_t::type; - elm_vectors(i).template AsType()(I0) = - oob_val ? elm_vector_t{elm_vectors(i).template AsType()[I0]} - : elm_vector_t{0}; + using scalar_t = std::remove_cvref_t< + decltype(elm_vectors(i).template AsType()[I0])>; + + // This is a bit ugly but necessary to be able to compile f8 instances for grouped + // convolution forward. For some reason for that specific type there is an ambiguity + // in the type resolution for the ternary expression. I added an explicit cast to + // disambiguate and only use it for f8 just in case it affects performance. + if constexpr(std::is_same_v) + { + elm_vectors(i).template AsType()(I0) = + oob_val ? elm_vector_t{elm_vectors(i).template AsType()[I0]} + : elm_vector_t{0}; + } + else + { + elm_vectors(i).template AsType()(I0) = + oob_val ? elm_vectors(i).template AsType()[I0] + : elm_vector_t{0}; + } }); elm_vectors_tuple_(thread_scratch_id)(iAccess) = elm_vectors;