-
Notifications
You must be signed in to change notification settings - Fork 11.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
the new mmap method does not work on Windows 11 ? #639
Comments
Could you modify static int WinStrerror(int err, char *buf, int size) {
return FormatMessageA(
FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
buf, size, NULL);
}
static void LogWindowsError(const char* file, int line, const char* thing) {
#define LogWindowsError(thing) LogWindowsError(__FILE__, __LINE__, thing)
char s[256];
int e = GetLastError();
WinStrerror(e, s, sizeof(s));
fprintf(stderr, "%s:%d: error[%#x]: %s failed: %s\n", file, line, e, thing, s);
} Then modify |
Hi Jart But something goes bad, likely some type of overflow issue now. I have 2 cases after adding "size":
As Debug:
And the 3rd variant: the 4 bit version (used migrate script on this one):
|
@cmp-nct does it help if you drop the |
@prusnak For your reference both variants below:
|
What are you using to compile this program CMAKE or make (#103 (comment)) |
VS Code cmake |
Ohhh for me it works because I used a POSIX compatibility layer. |
You mean you compile it with gcc/mingw ? |
Just try to follow my guide it is in #103 (comment) |
I can debug the problem for you there ok. |
Changing the whole build environment plus external dependencies to your custom libs is a bit of a pain. |
Did it work using my strategy? |
^ |
I separate each function with it's own file. |
Damn it, I found the issue. Wrong compiler ! |
Try with my steps I want to see if I have bugs |
The problem was that I had a x86 compiler linked. |
Yes, the models are larger than 2^32, so I also had a problem in my library, but I fixed it. |
For future people running into the same issue: in my case the project was building in x86 despite using the x64 command prompt because I had a separate installation of cmake that was taking precedence in my path:
I regenerated the files by explicitly calling the VS cmake and it worked. |
I tried migration and to create the new weights from pth, in both cases the mmap fails.
Always says "failed to mmap"
The text was updated successfully, but these errors were encountered: