-
Notifications
You must be signed in to change notification settings - Fork 126
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
fix model loading on architectures where size_t is 32bits #825
Conversation
@snukky do we have any regression tests that use the *.bin models? |
Let's merge the unit test one first PR: #826 |
Also, modify the changelog please. |
@emjotde We have these that use
|
I updated the changelog. As roman said, the regression tests include plenty of binarizations and model loadings and since those past, I think it's fine. BTW @emjotde did the big MPI fixes land? |
RE: MPI, yes. that was the last sync. |
I have to take a look what is going on with binary file loading in general on windows, then this PR should be ready to go in. |
Description
When porting marian to architectures of different width (x86_32/arm32/wasm) the binary file format would fail to load. The reason for that is that
size_t
on those architectures translates touint32_t
, whereas most commonly the binary models are built onx86_64
. This pull request makes sure that when binary model is loaded or stored, all headers are of typeuint64_t
. This pull request would not change the existing functionality but would make porting to architectures of different width easier, as the programmer would not be facing cryptic errors when loading binary models.