Pytorch C++ model for raspberry pi

Hi everybody!

I want to run my Pytorch model in a raspberri py with an executable. I have followed the official manual to create the executable (https://pytorch.org/tutorials/advanced/cpp_export.html).

I have noticed that all the flags in the Makefile are for PC. Is there a way to create the executable but compiling it for raspberry pi OS?

Thanks in advance

Could you provide a link to the Makefile you’re talking about. Don’t really know about any specific flags but as long ‘raspberry pi OS’ means some kind of linux I guess things should compile…

I’m not sure I’m getting it right. Are you compiling on pi for pi or are you cross compiling?

I am cross compiling. Do you mean that if I compile following the instructions on the pi, the executable would work?

Well I never did that but I’d actually assume so. Guess comilation on pi might take a long time though…