Skip to content

Commit e371b71

Browse files
committed
ggml_tensor : use 1 bit per flag
1 parent 261fdaa commit e371b71

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

ggml.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4592,9 +4592,9 @@ struct ggml_tensor * ggml_new_tensor_impl(
45924592
/*.op =*/ GGML_OP_NONE,
45934593
/*.op_params =*/ {0},
45944594
/*.is_param =*/ false,
4595+
/*.visited =*/ false,
45954596
/*.grad =*/ NULL,
45964597
/*.src =*/ { NULL },
4597-
/*.visited =*/ false,
45984598
/*.perf_runs =*/ 0,
45994599
/*.perf_cycles =*/ 0,
46004600
/*.perf_time_us =*/ 0,

ggml.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,13 +422,12 @@ extern "C" {
422422
// op params - allocated as int32_t for alignment
423423
int32_t op_params[GGML_MAX_OP_PARAMS / sizeof(uint32_t)];
424424

425-
bool is_param;
425+
uint32_t is_param:1;
426+
uint32_t visited:1; // used to build graphs
426427

427428
struct ggml_tensor * grad;
428429
struct ggml_tensor * src[GGML_MAX_SRC];
429430

430-
bool visited; // used to build graphs
431-
432431
// performance
433432
int perf_runs;
434433
int64_t perf_cycles;

0 commit comments

Comments
 (0)