]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
SYCL: Adjust support condition for norm operators (#11674)
authorAkarshan Biswas <redacted>
Thu, 6 Feb 2025 11:42:35 +0000 (17:12 +0530)
committerGitHub <redacted>
Thu, 6 Feb 2025 11:42:35 +0000 (11:42 +0000)
SYCL does not support non contiguous tensors for norm operations

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

index 2984ed82e8a7c649ba4e4c13853a65ab1ebfdaee..aab34a752d4a489e5b85dcfbf140ec565bc84c28 100644 (file)
@@ -4537,14 +4537,17 @@ static bool ggml_backend_sycl_device_supports_op(ggml_backend_dev_t dev, const g
         case GGML_OP_VIEW:
         case GGML_OP_PERMUTE:
         case GGML_OP_TRANSPOSE:
-        case GGML_OP_NORM:
         case GGML_OP_ADD:
         case GGML_OP_ADD1:
         case GGML_OP_LOG:
         case GGML_OP_SUB:
         case GGML_OP_MUL:
         case GGML_OP_DIV:
+            return true;
+        case GGML_OP_NORM:
         case GGML_OP_RMS_NORM:
+        case GGML_OP_GROUP_NORM:
+            return ggml_is_contiguous(op->src[0]);
         case GGML_OP_SCALE:
         case GGML_OP_SQR:
         case GGML_OP_SQRT:
@@ -4576,7 +4579,6 @@ static bool ggml_backend_sycl_device_supports_op(ggml_backend_dev_t dev, const g
         case GGML_OP_SUM_ROWS:
         case GGML_OP_ARGSORT:
         case GGML_OP_ACC:
-        case GGML_OP_GROUP_NORM:
         case GGML_OP_UPSCALE:
         case GGML_OP_PAD:
         case GGML_OP_LEAKY_RELU: