@@ -708,9 +708,9 @@ extern "C" {
708708 GGML_API GGML_CALL size_t ggml_nbytes (const struct ggml_tensor * tensor );
709709 GGML_API size_t ggml_nbytes_pad (const struct ggml_tensor * tensor ); // same as ggml_nbytes() but padded to GGML_MEM_ALIGN
710710
711- GGML_API GGML_CALL int ggml_blck_size (enum ggml_type type );
712- GGML_API GGML_CALL size_t ggml_type_size (enum ggml_type type ); // size in bytes for all elements in a block
713- GGML_API GGML_CALL size_t ggml_row_size (enum ggml_type type , int64_t ne ); // size in bytes for all elements in a row
711+ GGML_API GGML_CALL int64_t ggml_blck_size (enum ggml_type type );
712+ GGML_API GGML_CALL size_t ggml_type_size (enum ggml_type type ); // size in bytes for all elements in a block
713+ GGML_API GGML_CALL size_t ggml_row_size (enum ggml_type type , int64_t ne ); // size in bytes for all elements in a row
714714
715715 GGML_DEPRECATED (
716716 GGML_API double ggml_type_sizef (enum ggml_type type ), // ggml_type_size()/ggml_blck_size() as float
@@ -2404,20 +2404,31 @@ extern "C" {
24042404#endif
24052405 typedef void (* ggml_to_float_t ) (const void * GGML_RESTRICT x , float * GGML_RESTRICT y , int64_t k );
24062406 typedef void (* ggml_from_float_t )(const float * GGML_RESTRICT x , void * GGML_RESTRICT y , int64_t k );
2407- typedef void (* ggml_vec_dot_t ) (int n , float * GGML_RESTRICT s , size_t bs , const void * GGML_RESTRICT x , size_t bx ,
2408- const void * GGML_RESTRICT y , size_t by , int nrc );
2407+ typedef void (* ggml_from_float_to_mat_t )
2408+ (const float * GGML_RESTRICT x , void * GGML_RESTRICT y , int64_t nr , int64_t k , int64_t bs );
2409+ typedef void (* ggml_vec_dot_t ) (int n , float * GGML_RESTRICT s , size_t bs , const void * GGML_RESTRICT x , size_t bx ,
2410+ const void * GGML_RESTRICT y , size_t by , int nrc );
2411+ typedef void (* ggml_gemv_t ) (int n , float * GGML_RESTRICT s , size_t bs , const void * GGML_RESTRICT x ,
2412+ const void * GGML_RESTRICT y , int nr , int nc );
2413+ typedef void (* ggml_gemm_t ) (int n , float * GGML_RESTRICT s , size_t bs , const void * GGML_RESTRICT x ,
2414+ const void * GGML_RESTRICT y , int nr , int nc );
24092415
24102416 typedef struct {
2411- const char * type_name ;
2412- int blck_size ;
2413- size_t type_size ;
2414- bool is_quantized ;
2415- ggml_to_float_t to_float ;
2416- ggml_from_float_t from_float ;
2417- ggml_from_float_t from_float_reference ;
2418- ggml_vec_dot_t vec_dot ;
2419- enum ggml_type vec_dot_type ;
2420- int64_t nrows ; // number of rows to process simultaneously;
2417+ const char * type_name ;
2418+ int64_t blck_size ;
2419+ int64_t blck_size_interleave ; // interleave elements in blocks
2420+ size_t type_size ;
2421+ bool is_quantized ;
2422+ ggml_to_float_t to_float ;
2423+ ggml_from_float_t from_float ;
2424+ ggml_from_float_t from_float_ref ;
2425+ ggml_from_float_to_mat_t from_float_to_mat ;
2426+ ggml_vec_dot_t vec_dot ;
2427+ enum ggml_type vec_dot_type ;
2428+ int64_t nrows ; // number of rows to process simultaneously
2429+ int64_t ncols ; // number of columns to process simultaneously
2430+ ggml_gemv_t gemv ;
2431+ ggml_gemm_t gemm ;
24212432 } ggml_type_traits_t ;
24222433
24232434 GGML_API ggml_type_traits_t ggml_internal_get_type_traits (enum ggml_type type );
0 commit comments