Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ktransformers
Commits
c513ae59
Commit
c513ae59
authored
Mar 01, 2025
by
moonshadow-25
Browse files
iq1s files
parent
9781d1e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
14 deletions
+3
-14
third_party/llamafile/sgemm.h
third_party/llamafile/sgemm.h
+1
-1
third_party/llamafile/tinyblas_cpu_sgemm.inc
third_party/llamafile/tinyblas_cpu_sgemm.inc
+2
-13
No files found.
third_party/llamafile/sgemm.h
View file @
c513ae59
...
@@ -13,7 +13,7 @@ extern "C" {
...
@@ -13,7 +13,7 @@ extern "C" {
struct
ggml_tensor
;
struct
ggml_tensor
;
struct
ggml_compute_params
;
struct
ggml_compute_params
;
/*moonll old
/*moonll old
add more params
add more params
typeb...
*/
*/
bool
iqk_mul_mat
(
long
,
long
,
long
,
int
,
const
void
*
,
long
,
int
,
const
void
*
,
long
,
float
*
,
long
,
int
,
int
);
bool
iqk_mul_mat
(
long
,
long
,
long
,
int
,
const
void
*
,
long
,
int
,
const
void
*
,
long
,
float
*
,
long
,
int
,
int
);
bool
iqk_mul_mat_zen4
(
long
,
long
,
long
,
int
,
const
void
*
,
long
,
int
,
const
void
*
,
long
,
float
*
,
long
,
int
,
int
);
bool
iqk_mul_mat_zen4
(
long
,
long
,
long
,
int
,
const
void
*
,
long
,
int
,
const
void
*
,
long
,
float
*
,
long
,
int
,
int
);
...
...
third_party/llamafile/tinyblas_cpu_sgemm.inc
View file @
c513ae59
...
@@ -327,21 +327,10 @@ bool llamafile_sgemm(long m, long n, long k, const void* A, long lda, const void
...
@@ -327,21 +327,10 @@ bool llamafile_sgemm(long m, long n, long k, const void* A, long lda, const void
/*
/*
moonll
moonll
more Btype accept
more Btype accept
if (Btype == GGML_TYPE_Q8_K && Ctype == GGML_TYPE_F32) {
if (iqk_mul_mat(m, n, k * QK_K, Atype, A,lda,Btype, B,ldb, (float*)C, ldc, ith, nth)) {
return true;
}
}
if ((Btype == GGML_TYPE_Q8_0 || Btype == GGML_TYPE_Q8_1) && Ctype == GGML_TYPE_F32) {
// assert(QK8_0 == QK8_1 == QK4_0 == QK4_1 == QK5_0 == QK5_1 == 32);
assert((QK8_0 == 32) && (QK8_1 == 32) && (QK4_0 == 32) && (QK4_1 == 32) && (QK5_0 == 32) && (QK5_1 == 32));
if (iqk_mul_mat(m, n, k * QK8_0, Atype, A,lda,Btype, B,ldb, (float*)C, ldc, ith, nth)) {
return true;
}
}*/
}*/
// if (X86_CHECK(AVX2) && X86_CHECK(FMA)) {
if
(
Ctype
==
GGML_TYPE_F32
){
if
(
Ctype
==
GGML_TYPE_F32
){
// printf("typea: %d,qkk: %d, etypeb: %d\n",Atype, ggml_blck_size(ggml_type(Atype)),Btype);
if
(
iqk_mul_mat
(
m
,
n
,
k
*
ggml_blck_size
(
ggml_type
(
Atype
)),
Atype
,
A
,
lda
,
Btype
,
B
,
ldb
,
(
float
*
)
C
,
ldc
,
ith
,
nth
))
{
if
(
iqk_mul_mat
(
m
,
n
,
k
*
ggml_blck_size
(
ggml_type
(
Atype
)),
Atype
,
A
,
lda
,
Btype
,
B
,
ldb
,
(
float
*
)
C
,
ldc
,
ith
,
nth
))
{
return
true
;
return
true
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment