Skip to content

Commit

Permalink
Address clang-format errors
Browse files Browse the repository at this point in the history
Signed-off-by: Shawn Du <[email protected]>
  • Loading branch information
ShawnD200 committed Nov 30, 2024
1 parent cb4b451 commit b5bc729
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
12 changes: 8 additions & 4 deletions csrc/cpu/attention.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,16 @@ struct KernelVecType<c10::Half> {

template <>
struct KernelVecType<c10::BFloat16> {
using q_load_vec_type = vec_op::AttnVecTypeISA<c10::BFloat16>::q_load_vec_type;
using q_load_vec_type =
vec_op::AttnVecTypeISA<c10::BFloat16>::q_load_vec_type;
using q_vec_type = vec_op::AttnVecTypeISA<c10::BFloat16>::q_vec_type;
using k_load_vec_type = vec_op::AttnVecTypeISA<c10::BFloat16>::k_load_vec_type;
using k_load_vec_type =
vec_op::AttnVecTypeISA<c10::BFloat16>::k_load_vec_type;
using k_vec_type = vec_op::AttnVecTypeISA<c10::BFloat16>::k_vec_type;
using qk_acc_vec_type = vec_op::AttnVecTypeISA<c10::BFloat16>::qk_acc_vec_type;
using v_load_vec_type = vec_op::AttnVecTypeISA<c10::BFloat16>::v_load_vec_type;
using qk_acc_vec_type =
vec_op::AttnVecTypeISA<c10::BFloat16>::qk_acc_vec_type;
using v_load_vec_type =
vec_op::AttnVecTypeISA<c10::BFloat16>::v_load_vec_type;
};

template <typename T>
Expand Down
9 changes: 6 additions & 3 deletions csrc/cpu/quant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,24 @@ struct KernelVecType;
template <>
struct KernelVecType<float> {
using load_vec_type = vec_op::QuantVecTypeISA<float>::load_vec_type;
using azp_adj_load_vec_type = vec_op::QuantVecTypeISA<float>::azp_adj_load_vec_type;
using azp_adj_load_vec_type =
vec_op::QuantVecTypeISA<float>::azp_adj_load_vec_type;
using cvt_vec_type = vec_op::QuantVecTypeISA<float>::cvt_vec_type;
};

template <>
struct KernelVecType<c10::BFloat16> {
using load_vec_type = vec_op::QuantVecTypeISA<c10::BFloat16>::load_vec_type;
using azp_adj_load_vec_type = vec_op::QuantVecTypeISA<c10::BFloat16>::azp_adj_load_vec_type;
using azp_adj_load_vec_type =
vec_op::QuantVecTypeISA<c10::BFloat16>::azp_adj_load_vec_type;
using cvt_vec_type = vec_op::QuantVecTypeISA<c10::BFloat16>::cvt_vec_type;
};

template <>
struct KernelVecType<c10::Half> {
using load_vec_type = vec_op::QuantVecTypeISA<c10::Half>::load_vec_type;
using azp_adj_load_vec_type = vec_op::QuantVecTypeISA<c10::Half>::azp_adj_load_vec_type;
using azp_adj_load_vec_type =
vec_op::QuantVecTypeISA<c10::Half>::azp_adj_load_vec_type;
using cvt_vec_type = vec_op::QuantVecTypeISA<c10::Half>::cvt_vec_type;
};

Expand Down

0 comments on commit b5bc729

Please sign in to comment.