use ssize_t/int64 and 64bit version of ftell on windows
This commit is contained in:
@@ -483,7 +483,7 @@ int main(int argc, char *argv[]) {
|
|||||||
TransformerWeights weights;
|
TransformerWeights weights;
|
||||||
int fd = 0; // file descriptor for memory mapping
|
int fd = 0; // file descriptor for memory mapping
|
||||||
float* data = NULL; // memory mapped data pointer
|
float* data = NULL; // memory mapped data pointer
|
||||||
long file_size; // size of the checkpoint file in bytes
|
ssize_t file_size; // size of the checkpoint file in bytes
|
||||||
{
|
{
|
||||||
FILE *file = fopen(checkpoint, "rb");
|
FILE *file = fopen(checkpoint, "rb");
|
||||||
if (!file) { printf("Couldn't open file %s\n", checkpoint); return 1; }
|
if (!file) { printf("Couldn't open file %s\n", checkpoint); return 1; }
|
||||||
|
|||||||
Reference in New Issue
Block a user