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

#if defined(AVX) && !defined(F16C) #481

Closed
voha85 opened this issue Mar 24, 2023 · 0 comments
Closed

#if defined(AVX) && !defined(F16C) #481

voha85 opened this issue Mar 24, 2023 · 0 comments

Comments

@voha85
Copy link

voha85 commented Mar 24, 2023

#if defined(AVX) && !defined(F16C)
__m256 _mm256_cvtph_ps(__m128i x) {
ggml_fp16_t const * src = (ggml_fp16_t const *)&x;
float dst[8];
for (int i = 0; i < 8; ++i)
dst[i] = GGML_FP16_TO_FP32(src[i]);
return (__m256)&dst;
}
__m128i _mm256_cvtps_ph(__m256 x, int imm) {
float const * src = (float const *)&x;
ggml_fp16_t dst[8];
for (int i = 0; i < 8; ++i)
dst[i] = GGML_FP32_TO_FP16(src[i]);
return (__m128i)&dst;
}
#endif

@voha85 voha85 closed this as completed Mar 24, 2023
@voha85 voha85 reopened this Mar 24, 2023
@voha85 voha85 changed the title @gjmulder @xiliuya #if defined(AVX) && !defined(F16C) Mar 24, 2023
@voha85 voha85 closed this as completed Mar 24, 2023
Deadsg pushed a commit to Deadsg/llama.cpp that referenced this issue Dec 19, 2023
Added `RouteErrorHandler` for server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant