Mac os m1 silicon

hi,how can I compile the libtorch on Apple M1 Max or transform the x86 to arm?