I just managed to compile libtorch under yocto. Is supposed to be huge? Mine is 2.2 gigabytes.

This seems to be unexpected as my local source build shows ~241MB and the nightly pip wheels ~490MB for

is that with debug symbols?

This could be the case, but you would need to specify some build arguments such as DEBUG=1 python install. By default debug symbols won’t be added.