Skip to content

Commit aa0ea39

Browse files
authored
add habana config. (#3398)
1 parent 344551f commit aa0ea39

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

cmake/Options.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ include(CMakeDependentOption)
1010

1111
option(BUILD_WITH_CPU "Build CPU backend implementation" ON)
1212
option(BUILD_WITH_XPU "Build XPU backend implementation" OFF)
13+
option(BUILD_CFG_HABANA "Build config for Habana" OFF)
1314
option(BUILD_NO_CLANGFORMAT "Build without force clang-format" OFF)
1415
option(BUILD_STATS "Count statistics for each component during build process" OFF)
1516
option(BUILD_STRIPPED_BIN "Strip all symbols after build" OFF)
@@ -46,6 +47,7 @@ function (print_config_summary)
4647
message(STATUS "Options:")
4748
message(STATUS " BUILD_WITH_CPU : ${BUILD_WITH_CPU}")
4849
message(STATUS " BUILD_WITH_XPU : ${BUILD_WITH_XPU}")
50+
message(STATUS " BUILD_CFG_HABANA : ${BUILD_CFG_HABANA}")
4951
message(STATUS " BUILD_STATIC_ONEMKL : ${BUILD_STATIC_ONEMKL}")
5052
message(STATUS " BUILD_NO_CLANGFORMAT : ${BUILD_NO_CLANGFORMAT}")
5153
message(STATUS " BUILD_STATS : ${BUILD_STATS}")

cmake/cpu/Options.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ if(WIN32)
1919
set(BUILD_CPU_WITH_ONECCL OFF)
2020
endif()
2121

22+
if(BUILD_CFG_HABANA)
23+
set(USE_DNNL_GRAPH_COMPILER OFF)
24+
endif()
2225

2326
function (print_cpu_config_summary)
2427
# Fetch configurations of intel-ext-pt-cpu

csrc/cpu/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ endif()
3030
# use the oneDNN in llga temporarily: third_party/llga/third_party/oneDNN
3131

3232
set(DNNL_GRAPH_LIBRARY_TYPE STATIC CACHE STRING "" FORCE)
33-
if(DEFINED ENV{DNNL_GRAPH_BUILD_COMPILER_BACKEND})
33+
if((DEFINED ENV{DNNL_GRAPH_BUILD_COMPILER_BACKEND}) AND USE_DNNL_GRAPH_COMPILER)
3434
set(ONEDNN_EXPERIMENTAL_GRAPH_COMPILER_BACKEND ON CACHE BOOL "" FORCE)
3535
set(ONEDNN_EXPERIMENTAL_GRAPH_COMPILER_CPU_JIT "llvm;builtin" CACHE STRING "" FORCE)
3636
set(ONEDNN_EXPERIMENTAL_GRAPH_COMPILER_CPU_LLVM_CONFIG "llvm-config-13" CACHE STRING "" FORCE)

0 commit comments

Comments
 (0)