-
Notifications
You must be signed in to change notification settings - Fork 103
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
Changes to fix data types mismatches for armv7 build #395
base: main
Are you sure you want to change the base?
Conversation
@@ -255,7 +255,7 @@ CacheEntry::SerializeResponseOutput( | |||
// Pack everything into provided buffer | |||
uint64_t position = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out of curiosity, why this line doesn't cause issues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oandreeva-nv you have a good point. I'll elaborate a bit more on this one. The real issue is with the following lines. SerializeResponseOutput is expecting a size_t pointer:
CacheEntry::SerializeResponseOutput( const InferenceResponse::Output& output, Byte* buffer, size_t* output_size)
For our platform there is a mismatch between these two types:
error: cannot convert ‘uint64_t*’ {aka ‘long long unsigned int*’} to ‘size_t*’ {aka ‘unsigned int*’}
@@ -255,7 +255,7 @@ CacheEntry::SerializeResponseOutput( | |||
// Pack everything into provided buffer | |||
uint64_t position = 0; | |||
// Total serialized output size | |||
memcpy(buffer + position, &total_byte_size, sizeof(uint64_t)); | |||
memcpy(buffer + position, &total_byte_size, sizeof(size_t)); | |||
position += sizeof(uint64_t); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
We are running the server and core in a armv7 device.
Build for platform linux/arm/v7 failed because the code was using 64 bit size variables and we have 32 bit.