]> git.djapps.eu Git - pkg/ggml/sources/ggml/commitdiff
ggml-backend : use __declspec with msvc (#599)
authorAndrei <redacted>
Wed, 1 Nov 2023 12:08:28 +0000 (08:08 -0400)
committerGitHub <redacted>
Wed, 1 Nov 2023 12:08:28 +0000 (13:08 +0100)
src/ggml-backend.c

index 00f78432c3d17f2b92278929865015d6be48dc3e..f6e5fceed0f4df2acf14a44953eb0f51df4443b3 100644 (file)
@@ -448,7 +448,11 @@ struct ggml_backend_sched {
     struct ggml_context * ctx;
 
     // align context_buffer to GGML_MEM_ALIGN
+    #ifdef _MSC_VER
+    __declspec(align(GGML_MEM_ALIGN))
+    #else
     __attribute__((aligned(GGML_MEM_ALIGN)))
+    #endif
     char context_buffer[GGML_MAX_SPLITS*GGML_MAX_SPLIT_INPUTS*sizeof(struct ggml_tensor) + GGML_MAX_SPLITS*sizeof(struct ggml_cgraph)];
 };