Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#9036: GS & BH --> Combine llk param files using variable args #9078

Merged
merged 1 commit into from
Jun 4, 2024
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

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

#pragma once

#include "ckernel_sfpu_abs.h"
#include "llk_math_eltwise_unary_sfpu_0_param.h"
#include "llk_math_eltwise_unary_sfpu_init.h"
#include "llk_math_eltwise_unary_sfpu_params.h"
#include "ckernel_sfpu_abs.h"

namespace ckernel {

Expand All @@ -19,8 +19,10 @@ inline void llk_math_eltwise_unary_sfpu_abs_init() {

template <bool APPROXIMATE>
inline void llk_math_eltwise_unary_sfpu_abs(uint dst_index, int vector_mode = (int)VectorMode::RC) {
llk_math_eltwise_unary_sfpu_0_param<APPROXIMATE>(
ckernel::sfpu::calculate_abs<APPROXIMATE>, ckernel::sfpu::calculate_abs<APPROXIMATE>, dst_index, vector_mode);
llk_math_eltwise_unary_sfpu_params<APPROXIMATE>(
ckernel::sfpu::calculate_abs<APPROXIMATE>,
dst_index,
vector_mode);
}

} // namespace ckernel
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

#pragma once

#include "ckernel_sfpu_add1.h"
#include "llk_math_eltwise_unary_sfpu_0_param.h"
#include "llk_math_eltwise_unary_sfpu_init.h"
#include "llk_math_eltwise_unary_sfpu_params.h"
#include "ckernel_sfpu_add1.h"

namespace ckernel {

Expand All @@ -19,8 +19,10 @@ inline void llk_math_eltwise_unary_sfpu_add1_init() {

template <bool APPROXIMATE>
inline void llk_math_eltwise_unary_sfpu_add1(uint dst_index, int vector_mode = (int)VectorMode::RC) {
llk_math_eltwise_unary_sfpu_0_param<APPROXIMATE>(
ckernel::sfpu::calculate_add1<APPROXIMATE>, ckernel::sfpu::calculate_add1<APPROXIMATE>, dst_index, vector_mode);
llk_math_eltwise_unary_sfpu_params<APPROXIMATE>(
ckernel::sfpu::calculate_add1<APPROXIMATE>,
dst_index,
vector_mode);
}

} // namespace ckernel
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,16 @@
#pragma once

#include "ckernel_sfpu_binop_with_unary.h"
#include "llk_math_eltwise_unary_sfpu_1_param.h"
#include "llk_math_eltwise_unary_sfpu_params.h"
#include "llk_math_eltwise_unary_sfpu_init.h"

namespace ckernel {

// New LLK SFPU APIs

template <bool APPROXIMATE, int binop_mode>
inline void llk_math_eltwise_unary_sfpu_binop_with_scalar(
uint dst_index, uint32_t param1, int vector_mode = VectorMode::RC) {
llk_math_eltwise_unary_sfpu_1_param<APPROXIMATE>(
ckernel::sfpu::calculate_binop_with_scalar<APPROXIMATE, binop_mode, 8>,
inline void llk_math_eltwise_unary_sfpu_binop_with_scalar(uint dst_index, uint32_t param1, int vector_mode = VectorMode::RC) {
llk_math_eltwise_unary_sfpu_params<APPROXIMATE>(
ckernel::sfpu::calculate_binop_with_scalar<APPROXIMATE, binop_mode, 8>,
dst_index,
vector_mode,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

#pragma once

#include "ckernel_sfpu_cast_fp32_to_fp16a.h"
#include "llk_math_eltwise_unary_sfpu_0_param.h"
#include "llk_math_eltwise_unary_sfpu_init.h"
#include "llk_math_eltwise_unary_sfpu_params.h"
#include "ckernel_sfpu_cast_fp32_to_fp16a.h"

namespace ckernel {

Expand All @@ -19,11 +19,10 @@ inline void llk_math_eltwise_unary_sfpu_cast_fp32_to_fp16a_init() {

template <bool APPROXIMATE>
inline void llk_math_eltwise_unary_sfpu_cast_fp32_to_fp16a(uint dst_index, int vector_mode = (int)VectorMode::RC) {
llk_math_eltwise_unary_sfpu_0_param<APPROXIMATE>(
ckernel::sfpu::calculate_cast_fp32_to_fp16a<APPROXIMATE>,
llk_math_eltwise_unary_sfpu_params<APPROXIMATE>(
ckernel::sfpu::calculate_cast_fp32_to_fp16a<APPROXIMATE>,
dst_index,
vector_mode);
}

} // namespace ckernel
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

#pragma once

#include "ckernel_sfpu_clamp.h"
#include "llk_math_eltwise_unary_sfpu_3_param.h"
#include "llk_math_eltwise_unary_sfpu_init.h"
#include "llk_math_eltwise_unary_sfpu_params.h"
#include "ckernel_sfpu_clamp.h"

namespace ckernel {

Expand All @@ -18,10 +18,8 @@ inline void llk_math_eltwise_unary_sfpu_clamp_init() {
}

template <bool APPROXIMATE>
inline void llk_math_eltwise_unary_sfpu_clamp(
uint dst_index, uint param0, uint param1, uint param2, int vector_mode = (int)VectorMode::RC) {
llk_math_eltwise_unary_sfpu_3_param<APPROXIMATE>(
ckernel::sfpu::calculate_clamp<APPROXIMATE>,
inline void llk_math_eltwise_unary_sfpu_clamp(uint dst_index, uint param0, uint param1, uint param2, int vector_mode = (int)VectorMode::RC) {
llk_math_eltwise_unary_sfpu_params<APPROXIMATE>(
ckernel::sfpu::calculate_clamp<APPROXIMATE>,
dst_index,
vector_mode,
Expand All @@ -30,4 +28,4 @@ inline void llk_math_eltwise_unary_sfpu_clamp(
param2);
}

} // namespace ckernel
}
Loading
Loading