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

ggml : add AVX support and modify AVX2 code #1331

Closed
wants to merge 1 commit into from

Conversation

katsu560
Copy link
Contributor

@katsu560 katsu560 commented May 5, 2023

added AVX code from AVX2 and modified AVX2 code

added AVX support code
static inline __m256i bytes_from_bits_32(const uint8_t * x)
static inline __m256i bytes_from_nibbles_32(const uint8_t * rsi)
static inline __m256 sum_i16_pairs_float(const __m128i xh, const __m128i xl)
static inline __m256 mul_sum_i8_pairs_float(const __m256i x, const __m256i y)
static inline __m128i packNibbles_256( __m256i bytes )
static void quantize_row_q4_1(const float * restrict x, void * restrict vy, int k)
static void dequantize_row_q4_0(const void * restrict vx, float * restrict y, int k)
static void dequantize_row_q4_1(const void * restrict vx, float * restrict y, int k)
static void ggml_vec_dot_q4_1_q8_1(const int n, float * restrict s, const void * restrict vx, const void * restrict vy)
static void ggml_vec_dot_q4_2_q8_0(const int n, float * restrict s, const void * restrict vx, const void * restrict vy)
static void ggml_vec_dot_q5_0_q8_0(const int n, float * restrict s, const void * restrict vx, const void * restrict vy)
static void ggml_vec_dot_q5_1_q8_1(const int n, float * restrict s, const void * restrict vx, const void * restrict vy)
static void ggml_vec_dot_q8_0_q8_0(const int n, float * restrict s, const void * restrict vx, const void * restrict vy)

modified AVX2
static void quantize_row_q4_1(const float * restrict x, void * restrict vy, int k)
static void dequantize_row_q4_1(const void * restrict vx, float * restrict y, int k)

@ggerganov
Copy link
Owner

This probably has to be added after #1305

@katsu560 katsu560 changed the title ggml: add AVX support and modify AVX2 code ggml : add AVX support and modify AVX2 code May 7, 2023
@katsu560
Copy link
Contributor Author

katsu560 commented May 7, 2023

Hi, ggerganov. Thank you for checking my PR.
I'm sorry for adding unused function packNibbles_256 by this PR.
I deleted that function by another PR #1353.
Please confirm PR #1353.

@katsu560
Copy link
Contributor Author

katsu560 commented May 9, 2023

I posted new PR #1376 . I closed this.

@katsu560 katsu560 closed this May 9, 2023
@katsu560 katsu560 deleted the devpr branch May 9, 2023 13:00
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

Successfully merging this pull request may close these issues.

None yet

2 participants