fwrite(&nb, sizeof(uint64_t), 1, fout);
}
- // store the pointer address
- {
- const uint64_t ptr = (uint64_t) tensor->data;
-
- fwrite(&ptr, sizeof(uint64_t), 1, fout);
- }
-
fwrite(tensor->name, sizeof(char), GGML_MAX_NAME, fout);
// dump the data
fwrite(&nb, sizeof(uint64_t), 1, fout);
}
- // store the pointer address
- {
- const uint64_t ptr = (uint64_t) tensor->data;
-
- fwrite(&ptr, sizeof(uint64_t), 1, fout);
- }
-
fwrite(tensor->name, sizeof(char), GGML_MAX_NAME, fout);
// output the op arguments
tensor->op = (enum ggml_op) op;
- uint64_t ptr_cur = *(const uint64_t *) ptr; ptr += sizeof(ptr_cur);
-
memcpy(tensor->name, ptr, GGML_MAX_NAME); ptr += GGML_MAX_NAME;
tensor->data = (void *) ptr;
nb[j] = nb_cur;
}
- uint64_t ptr_cur = *(const uint64_t *) ptr; ptr += sizeof(ptr_cur); // TODO: not yet used
-
const char * ptr_name = ptr; ptr += GGML_MAX_NAME;
const int32_t * ptr_arg_idx = (const int32_t *) ptr; ptr += (2 + GGML_MAX_OPT)*sizeof(int32_t);