Skip to content

Commit bb5c3e2

Browse files
committed
remove constants
1 parent 08737ef commit bb5c3e2

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

ggml-opencl.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,48 +16,48 @@ typedef uchar uint8_t;
1616
typedef int int32_t;
1717
typedef uint uint32_t;
1818

19-
constant uint QK4_0 = 32;
19+
//constant uint QK4_0 = 32;
2020
struct block_q4_0
2121
{
2222
float d;
23-
uint8_t qs[QK4_0 / 2];
23+
uint8_t qs[16]; // QK4_0 / 2
2424
};
2525

26-
constant uint QK4_1 = 32;
26+
//constant uint QK4_1 = 32;
2727
struct block_q4_1
2828
{
2929
float d;
3030
float m;
31-
uint8_t qs[QK4_1 / 2];
31+
uint8_t qs[16]; // QK4_1 / 2
3232
};
3333

34-
constant uint QK5_0 = 32;
34+
//constant uint QK5_0 = 32;
3535
struct __attribute__ ((packed)) block_q5_0
3636
{
3737
half d;
3838
uint32_t qh;
39-
uint8_t qs[QK5_0 / 2];
39+
uint8_t qs[16]; // QK5_0 / 2
4040
};
4141

42-
constant uint QK5_1 = 32;
42+
//constant uint QK5_1 = 32;
4343
struct block_q5_1
4444
{
4545
half d;
4646
half m;
4747
uint32_t qh;
48-
uint8_t qs[QK5_1 / 2];
48+
uint8_t qs[16]; // QK5_1 / 2
4949
};
5050

51-
constant uint QK8_0 = 32;
51+
//constant uint QK8_0 = 32;
5252
struct block_q8_0
5353
{
5454
float d;
55-
uint8_t qs[QK8_0];
55+
uint8_t qs[16]; // QK8_0 / 2
5656
};
5757

5858

5959
__kernel void dequantize_row_q4_0(__global struct block_q4_0* x, __global float* y) {
60-
constant uint qk = QK4_0;
60+
constant uint qk = 32; // QK4_0;
6161

6262
const uint i = get_global_id(0) / qk;
6363
const uint j = get_local_id(0);
@@ -72,7 +72,7 @@ __kernel void dequantize_row_q4_0(__global struct block_q4_0* x, __global float*
7272
}
7373

7474
__kernel void dequantize_row_q4_1(__global struct block_q4_1* x, __global float* y) {
75-
constant uint qk = QK4_1;
75+
constant uint qk = 32; // QK4_1;
7676

7777
const uint i = get_global_id(0) / qk;
7878
const uint j = get_local_id(0);
@@ -88,7 +88,7 @@ __kernel void dequantize_row_q4_1(__global struct block_q4_1* x, __global float*
8888
}
8989

9090
__kernel void dequantize_row_q5_0(__global struct block_q5_0* x, __global float* y) {
91-
constant uint qk = QK5_0;
91+
constant uint qk = 32; // QK5_0;
9292

9393
const uint i = get_global_id(0) / qk;
9494
const uint j = get_local_id(0);
@@ -108,7 +108,7 @@ __kernel void dequantize_row_q5_0(__global struct block_q5_0* x, __global float*
108108
}
109109

110110
__kernel void dequantize_row_q5_1(__global struct block_q5_1* x, __global float* y) {
111-
constant uint qk = QK5_1;
111+
constant uint qk = 32; // QK5_1;
112112

113113
const uint i = get_global_id(0) / qk;
114114
const uint j = get_local_id(0);
@@ -129,7 +129,7 @@ __kernel void dequantize_row_q5_1(__global struct block_q5_1* x, __global float*
129129
}
130130

131131
__kernel void dequantize_row_q8_0(__global struct block_q8_0* x, __global float* y) {
132-
constant uint qk = QK8_0;
132+
constant uint qk = 32; // QK8_0;
133133
const uint i = get_global_id(0) / qk;
134134
const uint j = get_local_id(0);
135135

0 commit comments

Comments
 (0)