@@ -29,29 +29,41 @@ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
29
29
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85827 for details. The issue is
30
30
# fixed in GCC 10.
31
31
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "10.0" )
32
+ include (CheckCXXCompilerFlag)
32
33
check_cxx_compiler_flag("-Wno-unused-but-set-parameter" CXX_SUPPORTS_WNO_UNUSED_BUT_SET_PARAMETER)
33
- append_if(CXX_SUPPORTS_WNO_UNUSED_BUT_SET_PARAMETER "-Wno-unused-but-set-parameter" CMAKE_CXX_FLAGS )
34
+ if (CXX_SUPPORTS_WNO_UNUSED_BUT_SET_PARAMETER)
35
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-but-set-parameter" )
36
+ endif ()
34
37
endif ()
35
38
################################################################################
36
39
37
40
############################ Build options #####################################
38
41
option (GC_ENABLE_LEGACY ON )
39
- option (GC_ENABLE_DNNL "Enable the oneDNN library integration" ON )
42
+ option (GC_ENABLE_DNNL_API "Enable the oneDNN library API integration" ON )
40
43
option (GC_ENABLE_TEST "Build the tests" ON )
41
- option (GC_ENABLE_TEST_DNNL "Build the dnnl tests" ${GC_ENABLE_DNNL } )
44
+ option (GC_ENABLE_TEST_DNNL_API "Build the dnnl tests" ${GC_ENABLE_DNNL_API } )
42
45
option (GC_ENABLE_TEST_MLIR "Build the mlir tests" ON )
43
46
option (GC_ENABLE_TOOLS "Build the tools" ON )
44
47
option (GC_ENABLE_OPT "Build gc-opt" ${GC_ENABLE_TOOLS} )
45
48
option (GC_ENABLE_IMEX "Enable Intel® Extension for MLIR" OFF )
46
49
option (GC_ENABLE_BINDINGS_PYTHON "Enable Graph Complier Python Binding" ON )
47
50
option (GC_DEV_LINK_LLVM_DYLIB "Link dynamic libraries of LLVM and MLIR. For developers only. Do not use it in packing the library." OFF )
51
+ option (GC_ENABLE_RUNTIME_NAIVE_BRGEMM "Use naive BRGEMM as runtime backend for debug purpose." OFF )
48
52
49
53
if (GC_ENABLE_LEGACY)
50
54
add_subdirectory (legacy/core)
51
55
endif ()
52
56
53
- if (GC_ENABLE_DNNL)
57
+
58
+ if (GC_ENABLE_IMEX)
59
+ # normalize the value for lit config
60
+ set (GC_ENABLE_IMEX ON )
61
+ endif ()
62
+
63
+ if (GC_ENABLE_DNNL_API)
54
64
set (GC_ONEDNN_DIALECT_LIB_NAME MLIROneDNNGraph)
65
+ # normalize the value for lit config
66
+ set (GC_ENABLE_DNNL_API ON )
55
67
endif ()
56
68
################################################################################
57
69
0 commit comments