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

Possibly missing type conversions in ggml_set_i32 and ggml_set_f32 #329

Closed
goerch opened this issue Jul 2, 2023 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@goerch
Copy link
Contributor

goerch commented Jul 2, 2023

Randomly noticed that ggml_set_f32's signature is

struct ggml_tensor * ggml_set_f32(struct ggml_tensor * tensor, float value);

and it forwards the value without explicit conversion to

inline static void ggml_vec_set_f16(const int n, ggml_fp16_t * x, const int32_t v);

This doesn't feel right given the existence of GGML_FP32_TO_FP16?

@ggerganov ggerganov added the bug Something isn't working label Jul 2, 2023
@ggerganov
Copy link
Owner

Good catch - it's a bug

goerch added a commit to goerch/ggml that referenced this issue Jul 7, 2023
`ggml_set_i32`/`ggml_set_f32` are in line with `ggml_set_i32_1d`/`ggml_set_f32_1d` then.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants