How can we cross-compile PyTorch-0.4.1 for Jetson TX2

Has anyone tried cross compilation for Jetson TX2, with CUDA enabled. Also the setup.py takes in the compilers and CUDA libraries automatically, I want to know how to pass these as arguments. I tried setting environment variables (CC, CUDA_HOME, LD_LIBRARY_PATH), that didn’t help.