From 2451027e004e3dc8dc44e486bfcdfd511f26df45 Mon Sep 17 00:00:00 2001 From: Huy Do Date: Wed, 6 Nov 2024 19:36:10 -0800 Subject: [PATCH 1/5] Update torchao pinned commit to latest --- .ci/docker/ci_commit_pins/torchao.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/docker/ci_commit_pins/torchao.txt b/.ci/docker/ci_commit_pins/torchao.txt index 768110b82ff..d05c23f21c5 100644 --- a/.ci/docker/ci_commit_pins/torchao.txt +++ b/.ci/docker/ci_commit_pins/torchao.txt @@ -1 +1 @@ -0916b5b29b092afcbf2b898caae49abe80662bac +71a442ae775e0ea5a541dcce637b128070d1243c From de0311c14b81c6d93842a1bd5857b927cb6ed3d7 Mon Sep 17 00:00:00 2001 From: Huy Do Date: Fri, 8 Nov 2024 18:58:55 -0800 Subject: [PATCH 2/5] Correctly set _GLIBCXX_USE_CXX11_ABI pybind compile options --- CMakeLists.txt | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 156fb24e6b6..32b5f9a9a80 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -716,15 +716,27 @@ if(EXECUTORCH_BUILD_PYBIND) endif() # compile options for pybind - set(_pybind_compile_options - -Wno-deprecated-declarations - -fPIC - -frtti - -fexceptions - # libtorch is built with the old ABI, so we need to do the same for any - # .cpp files that include torch, c10, or ATen targets. - -D_GLIBCXX_USE_CXX11_ABI=0 - ) + if(EXECUTORCH_DO_NOT_USE_CXX11_ABI) + set(_pybind_compile_options + -Wno-deprecated-declarations + -fPIC + -frtti + -fexceptions + # libtorch is built with the old ABI, so we need to do the same for any + # .cpp files that include torch, c10, or ATen targets. Note that PyTorch + # nightly binary is built with _GLIBCXX_USE_CXX11_ABI set to 0 while its + # CI build sets this to 1 (default) + -D_GLIBCXX_USE_CXX11_ABI=0 + ) + else() + set(_pybind_compile_options + -Wno-deprecated-declarations + -fPIC + -frtti + -fexceptions + ) + endif() + # util lib add_library( util ${CMAKE_CURRENT_SOURCE_DIR}/extension/evalue_util/print_evalue.cpp From 521ded9e2eef777185ad5d9acda5984302c3eb39 Mon Sep 17 00:00:00 2001 From: Huy Do Date: Fri, 8 Nov 2024 19:00:27 -0800 Subject: [PATCH 3/5] Remove unwanted change --- .ci/docker/ci_commit_pins/torchao.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/docker/ci_commit_pins/torchao.txt b/.ci/docker/ci_commit_pins/torchao.txt index d05c23f21c5..768110b82ff 100644 --- a/.ci/docker/ci_commit_pins/torchao.txt +++ b/.ci/docker/ci_commit_pins/torchao.txt @@ -1 +1 @@ -71a442ae775e0ea5a541dcce637b128070d1243c +0916b5b29b092afcbf2b898caae49abe80662bac From 7dea5c0b0c008b9a5c489d895e35519460e6b887 Mon Sep 17 00:00:00 2001 From: Huy Do Date: Fri, 8 Nov 2024 19:15:27 -0800 Subject: [PATCH 4/5] Update CMakeLists.txt Co-authored-by: Nikita Shulga <2453524+malfet@users.noreply.github.com> --- CMakeLists.txt | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 32b5f9a9a80..33391d1f73e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -716,25 +716,19 @@ if(EXECUTORCH_BUILD_PYBIND) endif() # compile options for pybind + set(_pybind_compile_options + -Wno-deprecated-declarations + -fPIC + -frtti + -fexceptions + ) if(EXECUTORCH_DO_NOT_USE_CXX11_ABI) - set(_pybind_compile_options - -Wno-deprecated-declarations - -fPIC - -frtti - -fexceptions - # libtorch is built with the old ABI, so we need to do the same for any - # .cpp files that include torch, c10, or ATen targets. Note that PyTorch - # nightly binary is built with _GLIBCXX_USE_CXX11_ABI set to 0 while its - # CI build sets this to 1 (default) - -D_GLIBCXX_USE_CXX11_ABI=0 - ) + # libtorch is built with the old ABI, so we need to do the same for any + # .cpp files that include torch, c10, or ATen targets. Note that PyTorch + # nightly binary is built with _GLIBCXX_USE_CXX11_ABI set to 0 while its + # CI build sets this to 1 (default) + list(APPEND _pybind_compile_options -D_GLIBCXX_USE_CXX11_ABI=0) else() - set(_pybind_compile_options - -Wno-deprecated-declarations - -fPIC - -frtti - -fexceptions - ) endif() # util lib From 51d6fbad7e8106bdcb795856c28419dac959697c Mon Sep 17 00:00:00 2001 From: Huy Do Date: Fri, 8 Nov 2024 19:16:10 -0800 Subject: [PATCH 5/5] Update CMakeLists.txt to remove the empty else branch --- CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 33391d1f73e..6b76f27eb0d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -728,7 +728,6 @@ if(EXECUTORCH_BUILD_PYBIND) # nightly binary is built with _GLIBCXX_USE_CXX11_ABI set to 0 while its # CI build sets this to 1 (default) list(APPEND _pybind_compile_options -D_GLIBCXX_USE_CXX11_ABI=0) - else() endif() # util lib