cmake: fix ONNX_NAMESPACE if USE_SYSTEM_ONNX (#54973)

Summary:
`ONNX_NAMESPACE` is empty by default if `USE_SYSTEM_ONNX ON`, while it should be equal to `onnx`.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/54973

Reviewed By: glaringlee

Differential Revision: D27466020

Pulled By: walterddr

fbshipit-source-id: 47cde3604acbda3f45bec5893036b39fd1eb58c9
This commit is contained in:
SpaceIm 2021-03-31 08:27:38 -07:00 committed by Facebook GitHub Bot
parent 449a9514d1
commit aeedd5c7df

View File

@ -368,7 +368,7 @@ cmake_dependent_option(
if(NOT USE_SYSTEM_ONNX)
set(ONNX_NAMESPACE "onnx_torch" CACHE STRING "A namespace for ONNX; needed to build with other frameworks that share ONNX.")
elseif()
else()
set(ONNX_NAMESPACE "onnx" CACHE STRING "A namespace for ONNX; needed to build with other frameworks that share ONNX.")
endif()
set(SELECTED_OP_LIST "" CACHE STRING