Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 csrc/cpu/cpu_attn_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ struct VecTypeTrait<c10::BFloat16> {
};
#endif

#if !defined(__powerpc__)
#if !defined(__powerpc__) && !defined(__s390x__)
template <>
struct VecTypeTrait<c10::Half> {
using vec_t = vec_op::FP16Vec16;
Comment on lines +850 to 853

Choose a reason for hiding this comment

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

P1 Badge Restore VecTypeTraitc10::Half for s390x

The new guard in VecTypeTrait<c10::Half> (#if !defined(__powerpc__) && !defined(__s390x__)) now completely removes the specialization whenever __s390x__ is defined. The CPU attention kernels (cpu_attn_vec.hpp/cpu_attn_vec16.hpp) still instantiate VecTypeTrait<c10::Half>::vec_t when building float16 variants, so on s390 builds this alias now resolves to void and those translation units fail to compile, effectively dropping FP16 CPU support even though FP16Vec16 is still defined (aliased to FP32Vec16). The specialization should remain and use the FP32 alias instead of being disabled for s390.

Useful? React with 👍 / 👎.

Expand Down
Loading