|
187 | 187 | # define GGML_API |
188 | 188 | #endif |
189 | 189 |
|
190 | | -#ifdef GGML_MULTIPLATFORM |
191 | | -# if defined(_WIN32) |
192 | | -# define GGML_CALL |
193 | | -# else |
194 | | -# define GGML_CALL __attribute__((__ms_abi__)) |
195 | | -# endif |
196 | | -#else |
197 | | -# define GGML_CALL |
198 | | -#endif |
199 | | - |
200 | 190 | // TODO: support for clang |
201 | 191 | #ifdef __GNUC__ |
202 | 192 | # define GGML_DEPRECATED(func, hint) func __attribute__((deprecated(hint))) |
@@ -340,7 +330,7 @@ extern "C" { |
340 | 330 | }; |
341 | 331 |
|
342 | 332 | // get ggml_status name string |
343 | | - GGML_API GGML_CALL const char * ggml_status_to_string(enum ggml_status status); |
| 333 | + GGML_API const char * ggml_status_to_string(enum ggml_status status); |
344 | 334 |
|
345 | 335 | // ieee 754-2008 half-precision float16 |
346 | 336 | // todo: make this not an integral type |
@@ -716,46 +706,46 @@ extern "C" { |
716 | 706 | GGML_API void ggml_print_object (const struct ggml_object * obj); |
717 | 707 | GGML_API void ggml_print_objects(const struct ggml_context * ctx); |
718 | 708 |
|
719 | | - GGML_API GGML_CALL int64_t ggml_nelements (const struct ggml_tensor * tensor); |
720 | | - GGML_API GGML_CALL int64_t ggml_nrows (const struct ggml_tensor * tensor); |
721 | | - GGML_API GGML_CALL size_t ggml_nbytes (const struct ggml_tensor * tensor); |
| 709 | + GGML_API int64_t ggml_nelements (const struct ggml_tensor * tensor); |
| 710 | + GGML_API int64_t ggml_nrows (const struct ggml_tensor * tensor); |
| 711 | + GGML_API size_t ggml_nbytes (const struct ggml_tensor * tensor); |
722 | 712 | GGML_API size_t ggml_nbytes_pad (const struct ggml_tensor * tensor); // same as ggml_nbytes() but padded to GGML_MEM_ALIGN |
723 | 713 |
|
724 | | - GGML_API GGML_CALL int64_t ggml_blck_size(enum ggml_type type); |
725 | | - GGML_API GGML_CALL size_t ggml_type_size(enum ggml_type type); // size in bytes for all elements in a block |
726 | | - 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 |
| 714 | + GGML_API int64_t ggml_blck_size(enum ggml_type type); |
| 715 | + GGML_API size_t ggml_type_size(enum ggml_type type); // size in bytes for all elements in a block |
| 716 | + GGML_API size_t ggml_row_size (enum ggml_type type, int64_t ne); // size in bytes for all elements in a row |
727 | 717 |
|
728 | 718 | GGML_DEPRECATED( |
729 | 719 | GGML_API double ggml_type_sizef(enum ggml_type type), // ggml_type_size()/ggml_blck_size() as float |
730 | 720 | "use ggml_row_size() instead"); |
731 | 721 |
|
732 | | - GGML_API GGML_CALL const char * ggml_type_name(enum ggml_type type); |
733 | | - GGML_API GGML_CALL const char * ggml_op_name (enum ggml_op op); |
734 | | - GGML_API const char * ggml_op_symbol(enum ggml_op op); |
| 722 | + GGML_API const char * ggml_type_name(enum ggml_type type); |
| 723 | + GGML_API const char * ggml_op_name (enum ggml_op op); |
| 724 | + GGML_API const char * ggml_op_symbol(enum ggml_op op); |
735 | 725 |
|
736 | | - GGML_API const char * ggml_unary_op_name(enum ggml_unary_op op); |
737 | | - GGML_API GGML_CALL const char * ggml_op_desc(const struct ggml_tensor * t); // unary or op name |
| 726 | + GGML_API const char * ggml_unary_op_name(enum ggml_unary_op op); |
| 727 | + GGML_API const char * ggml_op_desc(const struct ggml_tensor * t); // unary or op name |
738 | 728 |
|
739 | | - GGML_API GGML_CALL size_t ggml_element_size(const struct ggml_tensor * tensor); |
| 729 | + GGML_API size_t ggml_element_size(const struct ggml_tensor * tensor); |
740 | 730 |
|
741 | | - GGML_API GGML_CALL bool ggml_is_quantized(enum ggml_type type); |
| 731 | + GGML_API bool ggml_is_quantized(enum ggml_type type); |
742 | 732 |
|
743 | 733 | // TODO: temporary until model loading of ggml examples is refactored |
744 | 734 | GGML_API enum ggml_type ggml_ftype_to_ggml_type(enum ggml_ftype ftype); |
745 | 735 |
|
746 | | - GGML_API GGML_CALL bool ggml_is_transposed(const struct ggml_tensor * tensor); |
747 | | - GGML_API GGML_CALL bool ggml_is_permuted (const struct ggml_tensor * tensor); |
748 | | - GGML_API GGML_CALL bool ggml_is_empty (const struct ggml_tensor * tensor); |
749 | | - GGML_API bool ggml_is_scalar (const struct ggml_tensor * tensor); |
750 | | - GGML_API bool ggml_is_vector (const struct ggml_tensor * tensor); |
751 | | - GGML_API bool ggml_is_matrix (const struct ggml_tensor * tensor); |
752 | | - GGML_API bool ggml_is_3d (const struct ggml_tensor * tensor); |
753 | | - GGML_API int ggml_n_dims (const struct ggml_tensor * tensor); // returns 1 for scalars |
| 736 | + GGML_API bool ggml_is_transposed(const struct ggml_tensor * tensor); |
| 737 | + GGML_API bool ggml_is_permuted (const struct ggml_tensor * tensor); |
| 738 | + GGML_API bool ggml_is_empty (const struct ggml_tensor * tensor); |
| 739 | + GGML_API bool ggml_is_scalar (const struct ggml_tensor * tensor); |
| 740 | + GGML_API bool ggml_is_vector (const struct ggml_tensor * tensor); |
| 741 | + GGML_API bool ggml_is_matrix (const struct ggml_tensor * tensor); |
| 742 | + GGML_API bool ggml_is_3d (const struct ggml_tensor * tensor); |
| 743 | + GGML_API int ggml_n_dims (const struct ggml_tensor * tensor); // returns 1 for scalars |
754 | 744 |
|
755 | | - GGML_API GGML_CALL bool ggml_is_contiguous (const struct ggml_tensor * tensor); |
756 | | - GGML_API GGML_CALL bool ggml_is_contiguous_0(const struct ggml_tensor * tensor); // same as ggml_is_contiguous() |
757 | | - GGML_API GGML_CALL bool ggml_is_contiguous_1(const struct ggml_tensor * tensor); // contiguous for dims >= 1 |
758 | | - GGML_API GGML_CALL bool ggml_is_contiguous_2(const struct ggml_tensor * tensor); // contiguous for dims >= 2 |
| 745 | + GGML_API bool ggml_is_contiguous (const struct ggml_tensor * tensor); |
| 746 | + GGML_API bool ggml_is_contiguous_0(const struct ggml_tensor * tensor); // same as ggml_is_contiguous() |
| 747 | + GGML_API bool ggml_is_contiguous_1(const struct ggml_tensor * tensor); // contiguous for dims >= 1 |
| 748 | + GGML_API bool ggml_is_contiguous_2(const struct ggml_tensor * tensor); // contiguous for dims >= 2 |
759 | 749 |
|
760 | 750 | GGML_API bool ggml_are_same_shape (const struct ggml_tensor * t0, const struct ggml_tensor * t1); |
761 | 751 | GGML_API bool ggml_are_same_stride(const struct ggml_tensor * t0, const struct ggml_tensor * t1); |
@@ -847,7 +837,7 @@ extern "C" { |
847 | 837 | GGML_API void * ggml_get_data (const struct ggml_tensor * tensor); |
848 | 838 | GGML_API float * ggml_get_data_f32(const struct ggml_tensor * tensor); |
849 | 839 |
|
850 | | - GGML_API GGML_CALL enum ggml_unary_op ggml_get_unary_op(const struct ggml_tensor * tensor); |
| 840 | + GGML_API enum ggml_unary_op ggml_get_unary_op(const struct ggml_tensor * tensor); |
851 | 841 |
|
852 | 842 | GGML_API const char * ggml_get_name (const struct ggml_tensor * tensor); |
853 | 843 | GGML_API struct ggml_tensor * ggml_set_name ( struct ggml_tensor * tensor, const char * name); |
@@ -1561,7 +1551,7 @@ extern "C" { |
1561 | 1551 | "use ggml_rope_ext_inplace instead"); |
1562 | 1552 |
|
1563 | 1553 | // compute correction dims for YaRN RoPE scaling |
1564 | | - GGML_CALL void ggml_rope_yarn_corr_dims( |
| 1554 | + void ggml_rope_yarn_corr_dims( |
1565 | 1555 | int n_dims, int n_ctx_orig, float freq_base, float beta_fast, float beta_slow, float dims[2]); |
1566 | 1556 |
|
1567 | 1557 | // rotary position embedding backward, i.e compute dx from dy |
|
0 commit comments