Skip to content

Commit 4d2e2ab

Browse files
qnixsynapseorca-zhang
authored andcommitted
SYCL: Adjust support condition for norm operators (ggml-org#11674)
SYCL does not support non contiguous tensors for norm operations
1 parent 7ccdcdb commit 4d2e2ab

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
@@ -4537,14 +4537,17 @@ static bool ggml_backend_sycl_device_supports_op(ggml_backend_dev_t dev, const g
45374537
case GGML_OP_VIEW:
45384538
case GGML_OP_PERMUTE:
45394539
case GGML_OP_TRANSPOSE:
4540-
case GGML_OP_NORM:
45414540
case GGML_OP_ADD:
45424541
case GGML_OP_ADD1:
45434542
case GGML_OP_LOG:
45444543
case GGML_OP_SUB:
45454544
case GGML_OP_MUL:
45464545
case GGML_OP_DIV:
4546+
return true;
4547+
case GGML_OP_NORM:
45474548
case GGML_OP_RMS_NORM:
4549+
case GGML_OP_GROUP_NORM:
4550+
return ggml_is_contiguous(op->src[0]);
45484551
case GGML_OP_SCALE:
45494552
case GGML_OP_SQR:
45504553
case GGML_OP_SQRT:
@@ -4576,7 +4579,6 @@ static bool ggml_backend_sycl_device_supports_op(ggml_backend_dev_t dev, const g
45764579
case GGML_OP_SUM_ROWS:
45774580
case GGML_OP_ARGSORT:
45784581
case GGML_OP_ACC:
4579-
case GGML_OP_GROUP_NORM:
45804582
case GGML_OP_UPSCALE:
45814583
case GGML_OP_PAD:
45824584
case GGML_OP_LEAKY_RELU:

0 commit comments

Comments
 (0)