Skip to content

Commit ee19491

Browse files
qnixsynapseNeoZhangJianyu
authored andcommitted
SYCL: Adjust support condition for norm operators (ggml-org#11674)
SYCL does not support non contiguous tensors for norm operations
1 parent c77e367 commit ee19491

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ggml/src/ggml-sycl/ggml-sycl.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4440,14 +4440,17 @@ static bool ggml_backend_sycl_device_supports_op(ggml_backend_dev_t dev, const g
44404440
case GGML_OP_VIEW:
44414441
case GGML_OP_PERMUTE:
44424442
case GGML_OP_TRANSPOSE:
4443-
case GGML_OP_NORM:
44444443
case GGML_OP_ADD:
44454444
case GGML_OP_ADD1:
44464445
case GGML_OP_LOG:
44474446
case GGML_OP_SUB:
44484447
case GGML_OP_MUL:
44494448
case GGML_OP_DIV:
4449+
return true;
4450+
case GGML_OP_NORM:
44504451
case GGML_OP_RMS_NORM:
4452+
case GGML_OP_GROUP_NORM:
4453+
return ggml_is_contiguous(op->src[0]);
44514454
case GGML_OP_SCALE:
44524455
case GGML_OP_SQR:
44534456
case GGML_OP_SQRT:
@@ -4479,7 +4482,6 @@ static bool ggml_backend_sycl_device_supports_op(ggml_backend_dev_t dev, const g
44794482
case GGML_OP_SUM_ROWS:
44804483
case GGML_OP_ARGSORT:
44814484
case GGML_OP_ACC:
4482-
case GGML_OP_GROUP_NORM:
44834485
case GGML_OP_UPSCALE:
44844486
case GGML_OP_PAD:
44854487
case GGML_OP_LEAKY_RELU:

0 commit comments

Comments
 (0)