ggml : assert when using ggml_mul with non-F32 src1
This commit is contained in:
parent
f3e90f27de
commit
c290f3eee6
2 changed files with 3 additions and 1 deletions
|
@ -327,7 +327,7 @@ for part_name in part_names:
|
|||
if ftype == 1 and data_dtype == np.float32 and name.endswith(".weight") and n_dims == 2:
|
||||
data = data.astype(np.float16)
|
||||
|
||||
print( name + ", shape " + str(len(data.shape)) + ", " + str(old_dtype) + " --> " + str(data.dtype))
|
||||
print(name + ", shape " + str(len(data.shape)) + ", " + str(old_dtype) + " --> " + str(data.dtype))
|
||||
|
||||
gguf_writer.write_tensor_to_file(data)
|
||||
|
||||
|
|
2
ggml.c
2
ggml.c
|
@ -9140,6 +9140,8 @@ static void ggml_compute_forward_mul(
|
|||
const struct ggml_tensor * src0,
|
||||
const struct ggml_tensor * src1,
|
||||
struct ggml_tensor * dst) {
|
||||
GGML_ASSERT(src1->type == GGML_TYPE_F32 && "only f32 src1 supported for now");
|
||||
|
||||
switch (src0->type) {
|
||||
case GGML_TYPE_F32:
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue