Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/cpu_extension.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ if ((AVX512_FOUND AND NOT AVX512_DISABLED) OR (ASIMD_FOUND AND NOT APPLE_SILICON
FetchContent_Declare(
oneDNN
GIT_REPOSITORY https://github.com/oneapi-src/oneDNN.git
GIT_TAG v3.9
GIT_TAG v3.10
GIT_PROGRESS TRUE
GIT_SHALLOW TRUE
)
Expand Down
2 changes: 2 additions & 0 deletions csrc/cpu/cpu_attn_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -821,10 +821,12 @@ struct VecTypeTrait<c10::BFloat16> {
using vec_t = vec_op::BF16Vec16;
};

#if !defined(__powerpc__)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The fix is incomplete. The s390x architecture also lacks fp16 vector support (vec_op::FP16Vec16) and will fail to compile this specialization, similar to PowerPC. The preprocessor guard should be extended to also cover s390x. A similar guard #if defined(__powerpc64__) || defined(__s390x__) is used in csrc/cpu/dnnl_kernels.cpp, which indicates s390x has similar characteristics.

#if !defined(__powerpc__) && !defined(__s390x__)

template <>
struct VecTypeTrait<c10::Half> {
using vec_t = vec_op::FP16Vec16;
};
#endif

template <typename T>
void print_logits(const char* name, T* ptr, int32_t row, int32_t col,
Expand Down