From dfd4cdacb41014b37a2bb6813fbd7a035802bff8 Mon Sep 17 00:00:00 2001 From: Jack Khuu Date: Tue, 8 Oct 2024 22:01:50 -0700 Subject: [PATCH] Allow deprecated declarations what using Parallel ExecuTorch (#1031) Summary: With the recent BC/FC work by ExecuTorch, many APIs have been marked as deprecated. While the functionality itself is not broken, this results in some build systems treating deprecatd APIs as a failure case. Specifically `_unsafe_reset_threadpool` This PR add compile flag to not error on deprecation warnings Differential Revision: D64020498 --- torchao/experimental/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/torchao/experimental/CMakeLists.txt b/torchao/experimental/CMakeLists.txt index 64a0400015..2c75b9e1d0 100644 --- a/torchao/experimental/CMakeLists.txt +++ b/torchao/experimental/CMakeLists.txt @@ -50,6 +50,7 @@ if(TORCHAO_OP_TARGET STREQUAL "aten") add_library(torchao_ops_${TORCHAO_OP_TARGET} SHARED) elseif(TORCHAO_OP_TARGET STREQUAL "executorch") add_library(torchao_ops_${TORCHAO_OP_TARGET} STATIC) + add_compile_options("-Wno-error=deprecated") else() message(FATAL_ERROR "Unknown TORCHAO_OP_TARGET: ${TORCHAO_OP_TARGET}. Please choose one of: aten, executorch.") endif()