From a6af0794c7a03bdc4b628fd82c5add7d8ff37b65 Mon Sep 17 00:00:00 2001 From: Kai Song <1136780339@qq.com> Date: Mon, 18 Nov 2024 11:52:09 +0800 Subject: [PATCH] fix bug when compile with native cuda arch --- 3rdparty/cmake/FindPytorch.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3rdparty/cmake/FindPytorch.cmake b/3rdparty/cmake/FindPytorch.cmake index 31babdca149..08bf18b001f 100644 --- a/3rdparty/cmake/FindPytorch.cmake +++ b/3rdparty/cmake/FindPytorch.cmake @@ -20,7 +20,7 @@ macro(translate_arch_string input output) string(REGEX REPLACE "([1-9])([0-9])-real" "\\1.\\2" version "${input}") elseif("${input}" MATCHES "([0-9]+)") string(REGEX REPLACE "([1-9])([0-9])" "\\1.\\2+PTX" version "${input}") - elseif(input STREQUAL "native") + elseif("${input}" STREQUAL "native") set(version "Auto") else() message(FATAL_ERROR "Invalid architecture string: ${input}")