hi,
I am tring Ahead-of-time Compilation example : resnet50.
function 'emitBundleConfig' emit BundleConfig struct, and there are many 'size_t' member. it may cause some problem when cross platform :
while build a 32-bit binary on 64-bit, (for example build armv7 binary on x86_64 ubuntu). emit resnet50.o's size_t is 64-bit, but main.cpp.o's size_t is 32-bit (which is compiled by arm compiler).
so, is it OK to modify BundleConfig's size_t to be 'uint64_t'; Or modify function 'emitBundleConfig' to emit different 'size_t', according to the target's size_t.
@xizhizhang Good catch! Thanks!
so, is it OK to modify BundleConfig's size_t to be 'uint64_t'; Or modify function 'emitBundleConfig' to emit different 'size_t', according to the target's size_t.
Yes, I think we should use uint64_t instead of size_t for the fields of BundleConfig. We should update emitBundleConfig and examples reading BundleConfig accordingly.
Are you interested in submitting a PR for this change?
@xizhizhang Good catch! Thanks!
so, is it OK to modify BundleConfig's size_t to be 'uint64_t'; Or modify function 'emitBundleConfig' to emit different 'size_t', according to the target's size_t.
Yes, I think we should use
uint64_tinstead ofsize_tfor the fields ofBundleConfig. We should updateemitBundleConfigand examples readingBundleConfigaccordingly.Are you interested in submitting a PR for this change?
yeah, I may submit it at the following weekend.
Most helpful comment
@xizhizhang Good catch! Thanks!
Yes, I think we should use
uint64_tinstead ofsize_tfor the fields ofBundleConfig. We should updateemitBundleConfigand examples readingBundleConfigaccordingly.Are you interested in submitting a PR for this change?