Skip to content

Commit 1f8ff68

Browse files
nikhil-armpytorchmergebot
authored andcommitted
[Fix]: Disable KleidiAI if unsupported gcc/clang compiler is detected (pytorch#146836)
Fixes: pytorch#146740 Description: 1. KleidiAI officially supports GCC>=11 and Clang>=11. Certain hardware features are tied to compiler version and KleidiAI compilation will fail in such cases. Change-Id: Ib43d6b5bf66ef5ea48c481a2774801c573ec205c Pull Request resolved: pytorch#146836 Approved by: https://github.com/malfet
1 parent 447a142 commit 1f8ff68

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,13 @@ if(ANDROID
697697
endif()
698698
endif()
699699

700+
if(USE_KLEIDIAI AND CMAKE_C_COMPILER_VERSION)
701+
if(CMAKE_C_COMPILER_VERSION VERSION_LESS 11)
702+
set(USE_KLEIDIAI OFF)
703+
message(WARNING "Disabling KleidiAI: Requires atleast GCC 11 or Clang 11")
704+
endif()
705+
endif()
706+
700707
# INTERN_BUILD_ATEN_OPS is used to control whether to build ATen/TH operators.
701708
set(INTERN_BUILD_ATEN_OPS ON)
702709

0 commit comments

Comments
 (0)