From d1fedc54faf59c6512234000247e379857ecd2bc Mon Sep 17 00:00:00 2001 From: ronnywang Date: Fri, 21 Oct 2022 15:53:53 +0800 Subject: [PATCH] [CustomDevice] turn on WITH_CUSTOM_DEVICE when WITH_PYTHON=ON (#47165) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cherry pick #47108 原 WITH_CUSTOM_DEVICE 默认打开/关闭的策略随 ON_INFER开关,由于训练和预测共同发包,现在训练包编译时会打开 ON_INFER,导致 WITH_CUSTOM_DEVICE 默认关闭,custom device 功能不可用 WITH_CUSTOM_DEVICE 默认打开/关闭的策略更改为随 WITH_PYTHON 开关 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 290310858f..f4b2ee08d9 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -336,7 +336,7 @@ endif() if(LINUX AND NOT WITH_CUSTOM_DEVICE - AND NOT ON_INFER) + AND WITH_PYTHON) set(WITH_CUSTOM_DEVICE ON CACHE BOOL "Enable Custom Device when compiling for Linux" FORCE) -- GitLab