Skip to content

Commit 89524c2

Browse files
restore ci/run.sh, rename struct defination, fix bug in ggml_sycl_op_mul_mat_sycl
1 parent 0dce40a commit 89524c2

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

ci/run.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ function gg_run {
9898
function gg_run_ctest_debug {
9999
cd ${SRC}
100100

101-
mkdir -p build-ci-debug && cd build-ci-debug
101+
rm -rf build-ci-debug && mkdir build-ci-debug && cd build-ci-debug
102102

103103
set -e
104104

@@ -126,7 +126,7 @@ function gg_sum_ctest_debug {
126126
function gg_run_ctest_release {
127127
cd ${SRC}
128128

129-
mkdir -p build-ci-release && cd build-ci-release
129+
rm -rf build-ci-release && mkdir build-ci-release && cd build-ci-release
130130

131131
set -e
132132

@@ -226,7 +226,7 @@ function gg_run_open_llama_3b_v2 {
226226
path_models="../models-mnt/open-llama/3B-v2"
227227
path_wiki="../models-mnt/wikitext/wikitext-2-raw"
228228

229-
mkdir -p build-ci-release && cd build-ci-release
229+
rm -rf build-ci-release && mkdir build-ci-release && cd build-ci-release
230230

231231
set -e
232232

@@ -407,7 +407,7 @@ function gg_run_open_llama_7b_v2 {
407407
path_models="../models-mnt/open-llama/7B-v2"
408408
path_wiki="../models-mnt/wikitext/wikitext-2-raw"
409409

410-
mkdir -p build-ci-release && cd build-ci-release
410+
rm -rf build-ci-release && mkdir build-ci-release && cd build-ci-release
411411

412412
set -e
413413

@@ -587,7 +587,7 @@ function gg_run_embd_bge_small {
587587

588588
path_models="../models-mnt/bge-small"
589589

590-
mkdir -p build-ci-release && cd build-ci-release
590+
rm -rf build-ci-release && mkdir build-ci-release && cd build-ci-release
591591

592592
set -e
593593

ggml-sycl.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3317,7 +3317,7 @@ typedef void (*ggml_sycl_op_flatten_t)(const ggml_tensor *src0,
33173317
#define QK4_0 32
33183318
#define QR4_0 2
33193319
#define QI4_0 (QK4_0 / (4 * QR4_0))
3320-
typedef struct dpct_type_471834 {
3320+
typedef struct dpct_type_block_q4_0 {
33213321
sycl::half d; // delta
33223322
uint8_t qs[QK4_0 / 2]; // nibbles / quants
33233323
} block_q4_0;
@@ -3326,7 +3326,7 @@ static_assert(sizeof(block_q4_0) == sizeof(ggml_fp16_t) + QK4_0 / 2, "wrong q4_0
33263326
#define QK4_1 32
33273327
#define QR4_1 2
33283328
#define QI4_1 (QK4_1 / (4 * QR4_1))
3329-
typedef struct dpct_type_143705 {
3329+
typedef struct dpct_type_block_q4_1 {
33303330
sycl::half2 dm; // dm.x = delta, dm.y = min
33313331
uint8_t qs[QK4_1 / 2]; // nibbles / quants
33323332
} block_q4_1;
@@ -3335,7 +3335,7 @@ static_assert(sizeof(block_q4_1) == sizeof(ggml_fp16_t) * 2 + QK4_1 / 2, "wrong
33353335
#define QK5_0 32
33363336
#define QR5_0 2
33373337
#define QI5_0 (QK5_0 / (4 * QR5_0))
3338-
typedef struct dpct_type_673649 {
3338+
typedef struct dpct_type_block_q5_0 {
33393339
sycl::half d; // delta
33403340
uint8_t qh[4]; // 5-th bit of quants
33413341
uint8_t qs[QK5_0 / 2]; // nibbles / quants
@@ -3345,7 +3345,7 @@ static_assert(sizeof(block_q5_0) == sizeof(ggml_fp16_t) + sizeof(uint32_t) + QK5
33453345
#define QK5_1 32
33463346
#define QR5_1 2
33473347
#define QI5_1 (QK5_1 / (4 * QR5_1))
3348-
typedef struct dpct_type_135589 {
3348+
typedef struct dpct_type_block_q5_1 {
33493349
sycl::half2 dm; // dm.x = delta, dm.y = min
33503350
uint8_t qh[4]; // 5-th bit of quants
33513351
uint8_t qs[QK5_1 / 2]; // nibbles / quants
@@ -3355,7 +3355,7 @@ static_assert(sizeof(block_q5_1) == 2 * sizeof(ggml_fp16_t) + sizeof(uint32_t) +
33553355
#define QK8_0 32
33563356
#define QR8_0 1
33573357
#define QI8_0 (QK8_0 / (4 * QR8_0))
3358-
typedef struct dpct_type_122878 {
3358+
typedef struct dpct_type_block_q8_0 {
33593359
sycl::half d; // delta
33603360
int8_t qs[QK8_0]; // quants
33613361
} block_q8_0;
@@ -3364,7 +3364,7 @@ static_assert(sizeof(block_q8_0) == sizeof(ggml_fp16_t) + QK8_0, "wrong q8_0 blo
33643364
#define QK8_1 32
33653365
#define QR8_1 1
33663366
#define QI8_1 (QK8_1 / (4 * QR8_1))
3367-
typedef struct dpct_type_143721 {
3367+
typedef struct dpct_type_block_q8_1 {
33683368
sycl::half2 ds; // ds.x = delta, ds.y = sum
33693369
int8_t qs[QK8_0]; // quants
33703370
} block_q8_1;
@@ -3398,7 +3398,7 @@ typedef float (*vec_dot_q_mul_mat_sycl_t)(
33983398

33993399
#define QR2_K 4
34003400
#define QI2_K (QK_K / (4*QR2_K))
3401-
typedef struct dpct_type_619598 {
3401+
typedef struct dpct_type_block_q2_K {
34023402
uint8_t scales[QK_K/16]; // scales and mins, quantized with 4 bits
34033403
uint8_t qs[QK_K/4]; // quants
34043404
sycl::half2 dm; // super-block scale for quantized scales/mins
@@ -3407,7 +3407,7 @@ static_assert(sizeof(block_q2_K) == 2*sizeof(ggml_fp16_t) + QK_K/16 + QK_K/4, "w
34073407

34083408
#define QR3_K 4
34093409
#define QI3_K (QK_K / (4*QR3_K))
3410-
typedef struct dpct_type_138576 {
3410+
typedef struct dpct_type_block_q3_K {
34113411
uint8_t hmask[QK_K/8]; // quants - high bit
34123412
uint8_t qs[QK_K/4]; // quants - low 2 bits
34133413
#ifdef GGML_QKK_64
@@ -3429,7 +3429,7 @@ typedef struct {
34293429
} block_q4_K;
34303430
static_assert(sizeof(block_q4_K) == sizeof(sycl::half2) + QK_K/2 + 2, "wrong q4_K block size/padding");
34313431
#else
3432-
typedef struct dpct_type_154943 {
3432+
typedef struct dpct_type_block_q4_K {
34333433
sycl::half2 dm; // super-block scale for quantized scales/mins
34343434
uint8_t scales[3*QK_K/64]; // scales, quantized with 6 bits
34353435
uint8_t qs[QK_K/2]; // 4--bit quants
@@ -3448,7 +3448,7 @@ typedef struct {
34483448
} block_q5_K;
34493449
static_assert(sizeof(block_q5_K) == sizeof(ggml_fp16_t) + QK_K/2 + QK_K/8 + QK_K/16, "wrong q5_K block size/padding");
34503450
#else
3451-
typedef struct dpct_type_866817 {
3451+
typedef struct dpct_type_block_q5_K {
34523452
sycl::half2 dm; // super-block scale for quantized scales/mins
34533453
uint8_t scales[K_SCALE_SIZE]; // scales and mins, quantized with 6 bits
34543454
uint8_t qh[QK_K/8]; // quants, high bit
@@ -3459,7 +3459,7 @@ static_assert(sizeof(block_q5_K) == 2*sizeof(ggml_fp16_t) + K_SCALE_SIZE + QK_K/
34593459

34603460
#define QR6_K 2
34613461
#define QI6_K (QK_K / (4*QR6_K))
3462-
typedef struct dpct_type_107281 {
3462+
typedef struct dpct_type_block_q6_K {
34633463
uint8_t ql[QK_K/2]; // quants, lower 4 bits
34643464
uint8_t qh[QK_K/4]; // quants, upper 2 bits
34653465
int8_t scales[QK_K/16]; // scales
@@ -3469,15 +3469,15 @@ static_assert(sizeof(block_q6_K) == sizeof(ggml_fp16_t) + 13*QK_K/16, "wrong q6_
34693469

34703470
#define QR2_XXS 8
34713471
#define QI2_XXS (QK_K / (4*QR2_XXS))
3472-
typedef struct dpct_type_101531 {
3472+
typedef struct dpct_type_block_iq2_xxs {
34733473
sycl::half d;
34743474
uint16_t qs[QK_K/8];
34753475
} block_iq2_xxs;
34763476
static_assert(sizeof(block_iq2_xxs) == sizeof(ggml_fp16_t) + QK_K/8*sizeof(uint16_t), "wrong iq2_xxs block size/padding");
34773477

34783478
#define QR2_XS 8
34793479
#define QI2_XS (QK_K / (4*QR2_XS))
3480-
typedef struct dpct_type_117772 {
3480+
typedef struct dpct_type_block_iq2_xs {
34813481
sycl::half d;
34823482
uint16_t qs[QK_K/8];
34833483
uint8_t scales[QK_K/32];
@@ -3486,7 +3486,7 @@ static_assert(sizeof(block_iq2_xs) == sizeof(ggml_fp16_t) + QK_K/8*sizeof(uint16
34863486

34873487
#define QR3_XXS 8
34883488
#define QI3_XXS (QK_K / (4*QR3_XXS))
3489-
typedef struct dpct_type_504194 {
3489+
typedef struct dpct_type_block_iq3_xxs {
34903490
sycl::half d;
34913491
uint8_t qs[3*(QK_K/8)];
34923492
} block_iq3_xxs;
@@ -14157,7 +14157,7 @@ inline void ggml_sycl_op_mul_mat_sycl(
1415714157
*g_sycl_handles[id], oneapi::mkl::transpose::trans,
1415814158
oneapi::mkl::transpose::nontrans, row_diff, src1_ncols, ne10,
1415914159
dpct::get_value(&alpha, *g_sycl_handles[id]), src0_ddf_i, ne00,
14160-
src1_ddf_i, ne10, dpct::get_value(&beta, *g_sycl_handles[id]),
14160+
src1_ddf1_i, ne10, dpct::get_value(&beta, *g_sycl_handles[id]),
1416114161
dst_dd_i, ldc)));
1416214162
}
1416314163
(void) dst;

0 commit comments

Comments
 (0)