Cross-compiling for ARM and other archs


I have been able to build my own custom model-runner based on the glow-provided model-runner and image-classifier (refer to Glow with generic model builder). Using the custom builder, I am able to output a bundle. I am also able to use the bundle to run the custom network (built a custom runner based on ResNet50 example).

My question now is: is it possible to cross-build for ARM and other architectures, or must I build on the target? In general, it looks like we should be able to build for anything that LLVM supports, but I certainly do not want to build on the target.

I am focusing only on the cpu backend for now.

The more precise question can be phrased as follows. I understand that the *.weights file is just a binary weights file, so we should be able to load it on any architecture. How can we make sure that the *.o bundle file is compatible with the target architecture? How can we direct the builder to compile it for a specific target?

Any pointers would be appreciated.

1 Like

Ah, never mind! There is the -target option that seems to be the same as the default LLVM option.