From d73e6cb59d97897cedc28a811aa5183050ca3649 Mon Sep 17 00:00:00 2001 From: Lu Fang Date: Tue, 19 Feb 2019 14:35:07 -0800 Subject: [PATCH] Automatic update of fbcode/onnx to 4c091e048ca42682d63ccd3c1811560bc12b732d (#17264) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/17264 Previous import was 822d8df0a2a32233c6022f50a158817a0f19bdc7 Included changes: - **[4c091e0](https://github.com/onnx/onnx/commit/4c091e0)**: Support defined ONNX_ML in parent cmake files (#1821) - **[57372f3](https://github.com/onnx/onnx/commit/57372f3)**: Delete OpsetVersionConverter.md which is a duplicate of VersionConverter.md (#1818) - **[ab1c57e](https://github.com/onnx/onnx/commit/ab1c57e)**: [ONNXIFI]Add extension to be implementable (#1796) - **[b92eee8](https://github.com/onnx/onnx/commit/b92eee8)**: Revert "Implement Op Annotation's for ONNX (#1648)" (#1812) - **[61f1e9e](https://github.com/onnx/onnx/commit/61f1e9e)**: Enable ONNX_ML by default (#1810) - **[4f064a1](https://github.com/onnx/onnx/commit/4f064a1)**: fix Greater and Less doc (#1811) - **[0628582](https://github.com/onnx/onnx/commit/0628582)**: Implement Op Annotation's for ONNX (#1648) - **[ad9d2f7](https://github.com/onnx/onnx/commit/ad9d2f7)**: Versioning doc update for Opset 9 (#1805) - **[e71e3be](https://github.com/onnx/onnx/commit/e71e3be)**: add dilation case for ConvTranspose op (#1797) Reviewed By: yinghai Differential Revision: D14135024 fbshipit-source-id: 1e4f9dda89abf48994798d080dd5d58207a6e4b6 --- cmake/Dependencies.cmake | 9 +++++++++ third_party/onnx | 2 +- tools/build_pytorch_libs.py | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake index 7ab15fb5cf0..0dca0da02fc 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake @@ -1027,6 +1027,15 @@ if (CAFFE2_CMAKE_BUILDING_WITH_MAIN_REPO) if (CAFFE2_LINK_LOCAL_PROTOBUF) set(ONNX_PROTO_POST_BUILD_SCRIPT ${PROJECT_SOURCE_DIR}/cmake/ProtoBufPatch.cmake) endif() + # Set the ONNX_ML flag for ONNX submodule + if (DEFINED ENV{ONNX_ML}) + set(ONNX_ML $ENV{ONNX_ML}) + if (ONNX_ML) + add_definitions(-DONNX_ML=1) + endif() + else() + set(ONNX_ML OFF) + endif() # Add op schemas in "ai.onnx.pytorch" domain add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/../caffe2/onnx/torch_ops") add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../third_party/onnx) diff --git a/third_party/onnx b/third_party/onnx index 15c33c94585..4c091e048ca 160000 --- a/third_party/onnx +++ b/third_party/onnx @@ -1 +1 @@ -Subproject commit 15c33c945851907411619f599900c3852108e7e3 +Subproject commit 4c091e048ca42682d63ccd3c1811560bc12b732d diff --git a/tools/build_pytorch_libs.py b/tools/build_pytorch_libs.py index fc60213fd8b..f331c093e72 100644 --- a/tools/build_pytorch_libs.py +++ b/tools/build_pytorch_libs.py @@ -162,6 +162,7 @@ def run_cmake(version, INSTALL_TEST=build_test, BUILD_CAFFE2_OPS=not check_negative_env_flag('BUILD_CAFFE2_OPS'), ONNX_NAMESPACE=os.getenv("ONNX_NAMESPACE", "onnx_torch"), + ONNX_ML=os.getenv("ONNX_ML", False), USE_CUDA=USE_CUDA, USE_DISTRIBUTED=USE_DISTRIBUTED, USE_FBGEMM=not (check_env_flag('NO_FBGEMM') or check_negative_env_flag('USE_FBGEMM')),