Conversation
| GGML_TYPE_COUNT, | ||
| */ | ||
|
|
||
| #define TENSOR_TYPE_AS_STR(TYPE) TYPE == GGML_TYPE_F32 ? "FP32" : TYPE == GGML_TYPE_F16 ? "FP16" : TYPE == GGML_TYPE_Q4_0 ? "Q4_0" : TYPE == GGML_TYPE_Q4_1 ? "Q4_1" : "UNKNOWN" |
There was a problem hiding this comment.
warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses]
| #define TENSOR_TYPE_AS_STR(TYPE) TYPE == GGML_TYPE_F32 ? "FP32" : TYPE == GGML_TYPE_F16 ? "FP16" : TYPE == GGML_TYPE_Q4_0 ? "Q4_0" : TYPE == GGML_TYPE_Q4_1 ? "Q4_1" : "UNKNOWN" | |
| #define TENSOR_TYPE_AS_STR(TYPE) TYPE == GGML_TYPE_F32 ? "FP32" : (TYPE) == GGML_TYPE_F16 ? "FP16" : TYPE == GGML_TYPE_Q4_0 ? "Q4_0" : TYPE == GGML_TYPE_Q4_1 ? "Q4_1" : "UNKNOWN" |
| GGML_TYPE_COUNT, | ||
| */ | ||
|
|
||
| #define TENSOR_TYPE_AS_STR(TYPE) TYPE == GGML_TYPE_F32 ? "FP32" : TYPE == GGML_TYPE_F16 ? "FP16" : TYPE == GGML_TYPE_Q4_0 ? "Q4_0" : TYPE == GGML_TYPE_Q4_1 ? "Q4_1" : "UNKNOWN" |
There was a problem hiding this comment.
warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses]
| #define TENSOR_TYPE_AS_STR(TYPE) TYPE == GGML_TYPE_F32 ? "FP32" : TYPE == GGML_TYPE_F16 ? "FP16" : TYPE == GGML_TYPE_Q4_0 ? "Q4_0" : TYPE == GGML_TYPE_Q4_1 ? "Q4_1" : "UNKNOWN" | |
| #define TENSOR_TYPE_AS_STR(TYPE) TYPE == GGML_TYPE_F32 ? "FP32" : TYPE == GGML_TYPE_F16 ? "FP16" : (TYPE) == GGML_TYPE_Q4_0 ? "Q4_0" : TYPE == GGML_TYPE_Q4_1 ? "Q4_1" : "UNKNOWN" |
| GGML_TYPE_COUNT, | ||
| */ | ||
|
|
||
| #define TENSOR_TYPE_AS_STR(TYPE) TYPE == GGML_TYPE_F32 ? "FP32" : TYPE == GGML_TYPE_F16 ? "FP16" : TYPE == GGML_TYPE_Q4_0 ? "Q4_0" : TYPE == GGML_TYPE_Q4_1 ? "Q4_1" : "UNKNOWN" |
There was a problem hiding this comment.
warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses]
| #define TENSOR_TYPE_AS_STR(TYPE) TYPE == GGML_TYPE_F32 ? "FP32" : TYPE == GGML_TYPE_F16 ? "FP16" : TYPE == GGML_TYPE_Q4_0 ? "Q4_0" : TYPE == GGML_TYPE_Q4_1 ? "Q4_1" : "UNKNOWN" | |
| #define TENSOR_TYPE_AS_STR(TYPE) TYPE == GGML_TYPE_F32 ? "FP32" : TYPE == GGML_TYPE_F16 ? "FP16" : TYPE == GGML_TYPE_Q4_0 ? "Q4_0" : (TYPE) == GGML_TYPE_Q4_1 ? "Q4_1" : "UNKNOWN" |
| #define TENSOR_TYPE_AS_STR(TYPE) TYPE == GGML_TYPE_F32 ? "FP32" : TYPE == GGML_TYPE_F16 ? "FP16" : TYPE == GGML_TYPE_Q4_0 ? "Q4_0" : TYPE == GGML_TYPE_Q4_1 ? "Q4_1" : "UNKNOWN" | ||
|
|
||
| #define TENSOR_DUMP(TENSOR) printf("%15s: type = %i (%5s) ne = %5d x %5d x %5d, nb = (%5li, %5li, %5li) - ", #TENSOR, \ | ||
| TENSOR->type,TENSOR_TYPE_AS_STR(TENSOR->type),\ |
There was a problem hiding this comment.
warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses]
| TENSOR->type,TENSOR_TYPE_AS_STR(TENSOR->type),\ | |
| (TENSOR)->type,TENSOR_TYPE_AS_STR(TENSOR->type),\ |
| #define TENSOR_TYPE_AS_STR(TYPE) TYPE == GGML_TYPE_F32 ? "FP32" : TYPE == GGML_TYPE_F16 ? "FP16" : TYPE == GGML_TYPE_Q4_0 ? "Q4_0" : TYPE == GGML_TYPE_Q4_1 ? "Q4_1" : "UNKNOWN" | ||
|
|
||
| #define TENSOR_DUMP(TENSOR) printf("%15s: type = %i (%5s) ne = %5d x %5d x %5d, nb = (%5li, %5li, %5li) - ", #TENSOR, \ | ||
| TENSOR->type,TENSOR_TYPE_AS_STR(TENSOR->type),\ |
There was a problem hiding this comment.
warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses]
| TENSOR->type,TENSOR_TYPE_AS_STR(TENSOR->type),\ | |
| TENSOR->type,TENSOR_TYPE_AS_STR((TENSOR)->type),\ |
|
|
||
| #define TENSOR_DUMP(TENSOR) printf("%15s: type = %i (%5s) ne = %5d x %5d x %5d, nb = (%5li, %5li, %5li) - ", #TENSOR, \ | ||
| TENSOR->type,TENSOR_TYPE_AS_STR(TENSOR->type),\ | ||
| (int) TENSOR->ne[0], (int) TENSOR->ne[1], (int) TENSOR->ne[2], TENSOR->nb[0], TENSOR->nb[1], TENSOR->nb[2]); \ |
There was a problem hiding this comment.
warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses]
| (int) TENSOR->ne[0], (int) TENSOR->ne[1], (int) TENSOR->ne[2], TENSOR->nb[0], TENSOR->nb[1], TENSOR->nb[2]); \ | |
| (int) TENSOR->ne[0], (int) TENSOR->ne[1], (int) TENSOR->ne[2], (TENSOR)->nb[0], TENSOR->nb[1], TENSOR->nb[2]); \ |
|
|
||
| #define TENSOR_DUMP(TENSOR) printf("%15s: type = %i (%5s) ne = %5d x %5d x %5d, nb = (%5li, %5li, %5li) - ", #TENSOR, \ | ||
| TENSOR->type,TENSOR_TYPE_AS_STR(TENSOR->type),\ | ||
| (int) TENSOR->ne[0], (int) TENSOR->ne[1], (int) TENSOR->ne[2], TENSOR->nb[0], TENSOR->nb[1], TENSOR->nb[2]); \ |
There was a problem hiding this comment.
warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses]
| (int) TENSOR->ne[0], (int) TENSOR->ne[1], (int) TENSOR->ne[2], TENSOR->nb[0], TENSOR->nb[1], TENSOR->nb[2]); \ | |
| (int) TENSOR->ne[0], (int) TENSOR->ne[1], (int) TENSOR->ne[2], TENSOR->nb[0], (TENSOR)->nb[1], TENSOR->nb[2]); \ |
|
|
||
| #define TENSOR_DUMP(TENSOR) printf("%15s: type = %i (%5s) ne = %5d x %5d x %5d, nb = (%5li, %5li, %5li) - ", #TENSOR, \ | ||
| TENSOR->type,TENSOR_TYPE_AS_STR(TENSOR->type),\ | ||
| (int) TENSOR->ne[0], (int) TENSOR->ne[1], (int) TENSOR->ne[2], TENSOR->nb[0], TENSOR->nb[1], TENSOR->nb[2]); \ |
There was a problem hiding this comment.
warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses]
| (int) TENSOR->ne[0], (int) TENSOR->ne[1], (int) TENSOR->ne[2], TENSOR->nb[0], TENSOR->nb[1], TENSOR->nb[2]); \ | |
| (int) TENSOR->ne[0], (int) TENSOR->ne[1], (int) TENSOR->ne[2], TENSOR->nb[0], TENSOR->nb[1], (TENSOR)->nb[2]); \ |
|
|
||
| if (arg == "-t" || arg == "--threads") { | ||
| if (++i >= argc) { | ||
| invalid_param = true; |
There was a problem hiding this comment.
warning: Value stored to 'invalid_param' is never read [clang-analyzer-deadcode.DeadStores]
invalid_param = true;
^Additional context
examples/benchmark/benchmark-matmult-test.cpp:72: Value stored to 'invalid_param' is never read
invalid_param = true;
^| benchmark_params.n_threads = std::stoi(argv[i]); | ||
| } else if (arg == "-i" || arg == "--iter") { | ||
| if (++i >= argc) { | ||
| invalid_param = true; |
There was a problem hiding this comment.
warning: Value stored to 'invalid_param' is never read [clang-analyzer-deadcode.DeadStores]
invalid_param = true;
^Additional context
examples/benchmark/benchmark-matmult-test.cpp:78: Value stored to 'invalid_param' is never read
invalid_param = true;
^
No description provided.