Skip to content

Commit

Permalink
Remove not needed build_forward_expand from add-rel-pos unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
YavorGIvanov committed Aug 21, 2023
1 parent d4b3b46 commit 415dbf1
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions tests/test-rel-pos.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,10 @@ int main(int argc, const char** argv) {

struct ggml_tensor * out = ggml_add_rel_pos(ctx, in, rw_f32, rh_f32);
struct ggml_cgraph gf = ggml_build_forward(out);
ggml_build_forward_expand(&gf, rw_f32);
ggml_build_forward_expand(&gf, rh_f32);
ggml_graph_compute_with_ctx(ctx, &gf, 1);

out_inplace = ggml_add_rel_pos_inplace(ctx, out_inplace, rw_f32, rh_f32);
struct ggml_cgraph gf_2 = ggml_build_forward(out_inplace);
ggml_build_forward_expand(&gf_2, rw_f32);
ggml_build_forward_expand(&gf_2, rh_f32);
ggml_graph_compute_with_ctx(ctx, &gf_2, 1);

check_tensor(out, (float*)expected_out, 9, 4, 1);
Expand Down

0 comments on commit 415dbf1

Please sign in to comment.