Skip to content

Commit

Permalink
ggml-backend : use __declspec with msvc (#599)
Browse files Browse the repository at this point in the history
  • Loading branch information
abetlen committed Nov 1, 2023
1 parent 08d748b commit 522b374
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ggml-backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)];
};

Expand Down

0 comments on commit 522b374

Please sign in to comment.