Skip to content

Commit 9bebc82

Browse files
committed
ggml : adapt AMX to tensor->grad removal (#0)
ggml-ci
1 parent d6163c6 commit 9bebc82

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

ggml/src/ggml-amx/ggml-amx.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,16 +317,13 @@ static bool ggml_backend_amx_device_supports_op(ggml_backend_dev_t dev, const st
317317
const enum ggml_type type = src0->type;
318318
const int64_t ne0 = op->ne[0];
319319

320-
bool is_training = src0->grad || src1->grad;
321-
322320
// amx kernels enables for Q4_0, Q4_1, Q8_0, F16
323321
// Q4_K, Q5_K, Q6_K, IQ4_XS enabled for QK_K = 256
324322
bool has_amx_kernels = qtype_has_amx_kernels(type) || (type == GGML_TYPE_F16);
325323

326324
bool can_use_amx =
327325
is_contiguous_2d(src0) && // src0 must be contiguous
328326
is_contiguous_2d(src1) && // src1 must be contiguous
329-
!is_training && // inference only
330327
src1->type == GGML_TYPE_F32 && // src1 must be float32
331328
has_amx_kernels && // with amx kernel impls
332329
ne0 % (TILE_N * 2) == 0; // out_features is 32x

0 commit comments

Comments
 (0)