From 9c8d106d5feb1ec03448ecaf895853cb213bc2ee Mon Sep 17 00:00:00 2001 From: anush elangovan Date: Sun, 24 Jul 2022 16:53:08 -0700 Subject: [PATCH] Add option to expose custom PyTorch repo/branch With source builds now you can point to any PyTorch repo/SHA. e.g: -DPYTORCH_REPO=vivekkhandelwal1/pytorch -DPYTORCH_BRANCH=upsampling-patch-olda will build from https://github.com/vivekkhandelwal1/pytorch/tree/upsampling-patch-old --- python/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index c74c40a21d2..51b154932b1 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -65,6 +65,8 @@ option(TORCH_MLIR_USE_INSTALLED_PYTORCH "Build from local PyTorch in environment if(TORCH_MLIR_ENABLE_JIT_IR_IMPORTER) if (NOT TORCH_MLIR_USE_INSTALLED_PYTORCH) # Source builds + set(ENV{PYTORCH_REPO} ${PYTORCH_REPO}) + set(ENV{PYTORCH_BRANCH} ${PYTORCH_BRANCH}) set(ENV{MACOSX_DEPLOYMENT_TARGET} ${MACOSX_DEPLOYMENT_TARGET}) set(ENV{CMAKE_OSX_ARCHITECTURES} ${CMAKE_OSX_ARCHITECTURES}) set(ENV{CMAKE_C_COMPILER_LAUNCHER} ${CMAKE_C_COMPILER_LAUNCHER})