Skip to content

Commit 28bd7cd

Browse files
committed
Address review comments
1 parent b5c5b4b commit 28bd7cd

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

ggml-opencl.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#define CL_TARGET_OPENCL_VERSION 110
88
#include <clblast.h>
99

10-
#include <assert.h>
1110
#include <stdlib.h>
1211
#include <stdio.h>
1312
#include <string.h>
@@ -1033,5 +1032,5 @@ void ggml_cl_transform_tensor(const void * data, ggml_tensor * tensor) {
10331032
CL_CHECK(clFinish(queue));
10341033

10351034
tensor->data = dst;
1036-
assert(tensor->backend == GGML_BACKEND_CL);
1035+
GGML_ASSERT(tensor->backend == GGML_BACKEND_CL);
10371036
}

llama.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -730,8 +730,7 @@ struct llama_model_loader {
730730
switch(lt.ggml_tensor->backend) {
731731
case GGML_BACKEND_CPU:
732732
lt.ggml_tensor->data = lt.data;
733-
if (use_mmap && lmlock)
734-
{
733+
if (use_mmap && lmlock) {
735734
lock_size += lt.size;
736735
lmlock->grow_to(lock_size);
737736
}
@@ -1075,7 +1074,7 @@ static void llama_model_load_internal(
10751074

10761075
std::string layers_i = "layers." + std::to_string(i);
10771076

1078-
// TODO: Normalize this after OpenCL supports mat mul with repeat
1077+
// TODO: Update this after OpenCL supports multiply with repeat
10791078
if (backend == GGML_BACKEND_CUDA) {
10801079
layer.attention_norm = ml->get_tensor(layers_i + ".attention_norm.weight", {n_embd}, backend);
10811080
} else {
@@ -1103,7 +1102,7 @@ static void llama_model_load_internal(
11031102
ggml_nbytes(layer.wv) + ggml_nbytes(layer.wo) + ggml_nbytes(layer.ffn_norm) +
11041103
ggml_nbytes(layer.w1) + ggml_nbytes(layer.w2) + ggml_nbytes(layer.w3);
11051104
} else if (backend == GGML_BACKEND_CL) {
1106-
// TODO: Until OpenCL supports mat mul with repeat
1105+
// TODO: Until OpenCL supports multiply with repeat
11071106
vram_total +=
11081107
ggml_nbytes(layer.wq) + ggml_nbytes(layer.wk) +
11091108
ggml_nbytes(layer.wv) + ggml_nbytes(layer.wo) +

0 commit comments

Comments
 (0)