Skip to content

Commit 7a007fb

Browse files
committed
ggml_tensor : use 1 bit per flag
1 parent 12e9a99 commit 7a007fb

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
@@ -4591,9 +4591,9 @@ struct ggml_tensor * ggml_new_tensor_impl(
45914591
/*.nb =*/ { 0, 0, 0, 0 },
45924592
/*.op =*/ GGML_OP_NONE,
45934593
/*.is_param =*/ false,
4594+
/*.visited =*/ false,
45944595
/*.grad =*/ NULL,
45954596
/*.src =*/ { NULL },
4596-
/*.visited =*/ false,
45974597
/*.perf_runs =*/ 0,
45984598
/*.perf_cycles =*/ 0,
45994599
/*.perf_time_us =*/ 0,

ggml.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -418,13 +418,12 @@ extern "C" {
418418
// compute data
419419
enum ggml_op op;
420420

421-
bool is_param;
421+
uint32_t is_param:1;
422+
uint32_t visited:1; // used to build graphs
422423

423424
struct ggml_tensor * grad;
424425
struct ggml_tensor * src[GGML_MAX_SRC];
425426

426-
bool visited; // used to build graphs
427-
428427
// performance
429428
int perf_runs;
430429
int64_t perf_cycles;

0 commit comments

Comments
 (0)