Is it possible to build pytorch from source on one machine, and install the wheel on another machine

Hi, Is it possible to build pytorch from source on one machine, and install the wheel on another machine.

The second machine has different GPU, gcc, etc. But these two machines have same cuda and cudnn version.