Fix execute_process: check results using EQUAL (#5481)

This commit is contained in:
Tailing Yuan 2025-06-27 11:57:04 +08:00 committed by GitHub
parent 49af791f66
commit ef43b95aa1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -385,7 +385,7 @@ if(BUILD_PYT)
print(os.path.dirname(torch.__file__),end='');"
RESULT_VARIABLE _PYTHON_SUCCESS
OUTPUT_VARIABLE TORCH_DIR)
if(NOT _PYTHON_SUCCESS MATCHES 0)
if(NOT _PYTHON_SUCCESS EQUAL 0)
message(FATAL_ERROR "Torch config Error.")
endif()
list(APPEND CMAKE_PREFIX_PATH ${TORCH_DIR})

View File

@ -29,7 +29,7 @@ execute_process(
COMMAND ${Python3_EXECUTABLE} setup_library.py develop --user
RESULT_VARIABLE _CUTLASS_LIBRARY_SUCCESS)
if(NOT _CUTLASS_LIBRARY_SUCCESS MATCHES 0)
if(NOT _CUTLASS_LIBRARY_SUCCESS EQUAL 0)
message(
FATAL_ERROR
"Failed to set up the CUTLASS library due to ${_CUTLASS_LIBRARY_SUCCESS}."
@ -53,7 +53,7 @@ execute_process(
OUTPUT_VARIABLE _KERNEL_GEN_OUTPUT
RESULT_VARIABLE _KERNEL_GEN_SUCCESS)
if(NOT _KERNEL_GEN_SUCCESS MATCHES 0)
if(NOT _KERNEL_GEN_SUCCESS EQUAL 0)
message(
FATAL_ERROR
"Failed to generate internal CUTLASS kernel instantiations due to ${_KERNEL_GEN_SUCCESS}."