You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I need to reduce a 4d tensor along a dimension with the operation addition. I can either add ggml_add_ext that lets you specify a dimension for reduction, or I can add a new op ggml_reduce that lets you specify a dimension and an op as an argument (maybe +,/,-,* to start) and reduces along that dimension with that op. Which of these would be preferable?
In the meantime, I can implement this in tortoise.cpp with view slices and and a for loop, but I think a inbuilt reduction op will probably be faster.
The text was updated successfully, but these errors were encountered:
There is already ggml_sum_rows(). A ggml_sum_dim() should be possible to implement via ggml_permute() + ggml_sum_rows() + ggml_reshape() I think, without having to write new kernels
So I need to reduce a 4d tensor along a dimension with the operation addition. I can either add
ggml_add_ext
that lets you specify a dimension for reduction, or I can add a new opggml_reduce
that lets you specify a dimension and an op as an argument (maybe +,/,-,* to start) and reduces along that dimension with that op. Which of these would be preferable?In the meantime, I can implement this in tortoise.cpp with view slices and and a for loop, but I think a inbuilt reduction op will probably be faster.
The text was updated successfully, but these errors were encountered: