aboutsummaryrefslogtreecommitdiff
path: root/ggml.c
diff options
context:
space:
mode:
authorGeorgi Gerganov <ggerganov@gmail.com>2023-07-02 09:46:46 +0300
committerGeorgi Gerganov <ggerganov@gmail.com>2023-07-02 09:46:46 +0300
commit46088f72318981341a2d646f12f6eee6aec06d65 (patch)
tree5c744e9279ca5887c063cab2958fdd9f80734d65 /ggml.c
parent0bc2cdfc875fa7877d8e01c8bb17066f99c08f21 (diff)
ggml : fix build with OpenBLAS (close #2066)
Diffstat (limited to 'ggml.c')
-rw-r--r--ggml.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/ggml.c b/ggml.c
index 75cc44b..afeb72f 100644
--- a/ggml.c
+++ b/ggml.c
@@ -3855,28 +3855,29 @@ static_assert(sizeof(struct ggml_tensor)%GGML_MEM_ALIGN == 0, "ggml_tensor size
// Take care about compile options (e.g., GGML_USE_xxx).
static bool GGML_OP_HAS_INIT [GGML_OP_COUNT] = { 0 };
static bool GGML_OP_HAS_FINALIZE[GGML_OP_COUNT] = { 0 };
+
static void ggml_setup_op_has_task_pass(void) {
{ // INIT
- bool * I = GGML_OP_HAS_INIT;
-
- I[GGML_OP_ACC ] = true;
- I[GGML_OP_MUL_MAT ] = true;
- I[GGML_OP_OUT_PROD ] = true;
- I[GGML_OP_SET ] = true;
- I[GGML_OP_GET_ROWS_BACK ] = true;
- I[GGML_OP_DIAG_MASK_INF ] = true;
- I[GGML_OP_DIAG_MASK_ZERO ] = true;
- I[GGML_OP_CONV_1D_S1_PH ] = true;
- I[GGML_OP_CONV_1D_S2_PH ] = true;
- I[GGML_OP_CONV_2D_SK_P0 ] = true;
- I[GGML_OP_FLASH_ATTN_BACK ] = true;
- I[GGML_OP_CROSS_ENTROPY_LOSS ] = true;
+ bool * p = GGML_OP_HAS_INIT;
+
+ p[GGML_OP_ACC ] = true;
+ p[GGML_OP_MUL_MAT ] = true;
+ p[GGML_OP_OUT_PROD ] = true;
+ p[GGML_OP_SET ] = true;
+ p[GGML_OP_GET_ROWS_BACK ] = true;
+ p[GGML_OP_DIAG_MASK_INF ] = true;
+ p[GGML_OP_DIAG_MASK_ZERO ] = true;
+ p[GGML_OP_CONV_1D_S1_PH ] = true;
+ p[GGML_OP_CONV_1D_S2_PH ] = true;
+ p[GGML_OP_CONV_2D_SK_P0 ] = true;
+ p[GGML_OP_FLASH_ATTN_BACK ] = true;
+ p[GGML_OP_CROSS_ENTROPY_LOSS ] = true;
}
{ // FINALIZE
- bool * F = GGML_OP_HAS_FINALIZE;
+ bool * p = GGML_OP_HAS_FINALIZE;
- F[GGML_OP_CROSS_ENTROPY_LOSS ] = true;
+ p[GGML_OP_CROSS_ENTROPY_LOSS ] = true;
}
}