Unverified Commit 37052173 authored by Max Podkorytov's avatar Max Podkorytov
Browse files

run clang-format

parent 0d96a891
......@@ -1375,15 +1375,19 @@ bool run(const ck_tile::ArgParser& arg_parser)
ck_tile::identity{},
ck_tile::identity{});
#ifndef CK_TILE_SCORE_MOD_F
#error "must be defined"
#else
#define XSTR(x) STR(x)
#define STR(x) #x
#pragma message "host score_mod_f: " XSTR(CK_TILE_SCORE_MOD_F)
#endif
auto score_mod = [] (auto s, ck_tile::index_t b, ck_tile::index_t h, ck_tile::index_t q_idx, ck_tile::index_t v_idx) {
#ifndef CK_TILE_SCORE_MOD_F
#error "must be defined"
#else
#define XSTR(x) STR(x)
#define STR(x) #x
#pragma message "host score_mod_f: " XSTR(CK_TILE_SCORE_MOD_F)
#endif
auto score_mod = [](auto s,
ck_tile::index_t b,
ck_tile::index_t h,
ck_tile::index_t q_idx,
ck_tile::index_t v_idx) {
ck_tile::detail::swallow(s, b, h, q_idx, v_idx);
return CK_TILE_SCORE_MOD_F;
};
......@@ -1396,9 +1400,7 @@ bool run(const ck_tile::ArgParser& arg_parser)
});
auto scale_def = ck_tile::scales(scale_s);
s_host_ref.ForEach([&](auto& self, auto i) {
self(i) = scale_def(self(i));
});
s_host_ref.ForEach([&](auto& self, auto i) { self(i) = scale_def(self(i)); });
if(bias.type == bias_enum::elementwise_bias)
{
......
......@@ -1305,12 +1305,13 @@ struct FmhaFwdKernel
// may have state inside
auto score_mod_def = ScoreModFunction_{};
auto score_mod_arg = [b=i_batch, h=i_nhead, score_mod_def](
typename ScoreModFunction_::TScore s,
auto score_mod_arg =
[b = i_batch, h = i_nhead, score_mod_def](typename ScoreModFunction_::TScore s,
ck_tile::index_t q_idx,
ck_tile::index_t v_idx) {
auto new_score = score_mod_def(s, b, h, q_idx, v_idx);\
// printf("device score_mod at (%d %d %d %d), score before: %f, score after: %f score_clip: %f\n",
auto new_score = score_mod_def(
s, b, h, q_idx, v_idx); // printf("device score_mod at (%d %d %d %d), score
// before: %f, score after: %f score_clip: %f\n",
// b, h, q_idx, v_idx, s, new_score, new_score_after_clip);
return new_score;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment