File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ const char* unused_tensors[] = {
107107};
108108
109109bool is_unused_tensor (std::string name) {
110- for (int i = 0 ; i < sizeof (unused_tensors) / sizeof (const char *); i++) {
110+ for (size_t i = 0 ; i < sizeof (unused_tensors) / sizeof (const char *); i++) {
111111 if (starts_with (name, unused_tensors[i])) {
112112 return true ;
113113 }
Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ struct TensorStorage {
119119
120120 size_t file_index = 0 ;
121121 int index_in_zip = -1 ; // >= means stored in a zip file
122- size_t offset = 0 ; // offset in file
122+ uint64_t offset = 0 ; // offset in file
123123
124124 TensorStorage () = default ;
125125
@@ -164,10 +164,10 @@ struct TensorStorage {
164164
165165 std::vector<TensorStorage> chunk (size_t n) {
166166 std::vector<TensorStorage> chunks;
167- size_t chunk_size = nbytes_to_read () / n;
167+ uint64_t chunk_size = nbytes_to_read () / n;
168168 // printf("%d/%d\n", chunk_size, nbytes_to_read());
169169 reverse_ne ();
170- for (int i = 0 ; i < n; i++) {
170+ for (size_t i = 0 ; i < n; i++) {
171171 TensorStorage chunk_i = *this ;
172172 chunk_i.ne [0 ] = ne[0 ] / n;
173173 chunk_i.offset = offset + i * chunk_size;
You can’t perform that action at this time.
0 commit comments