Skip to content

Commit 03d8801

Browse files
[OS][ww04] - Upstreaming compiler repository (#45)
* [OS][ww04] Upstreaming compiler repository - submodules * [OS][ww04] Upstreaming compiler repository - cmake * [OS][ww04] Upstreaming compiler repository - cmake files * [OS][ww04] Upstreaming compiler repository - scripts * [OS][ww04] Upstreaming compiler repository - tools * [OS][ww04] Upstreaming compiler repository - tests * [OS][ww04] Upstreaming compiler repository -src * [OS][ww04] Upstreaming compiler repository - sw_runtime_kernels * [OS][ww04] Upstreaming compiler repository - small changes
1 parent 150e202 commit 03d8801

File tree

3,571 files changed

+142698
-90451
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,571 files changed

+142698
-90451
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
- [ ] BUG
1515
- [ ] Feature
1616

17-
## Related PRs
18-
19-
* [PR-xxx](https://github.com/intel-innersource/applications.ai.vpu-accelerators.vpux-plugin/pull/xxx) description
20-
2117
## Code Review Survey (Copy and Complete in your code review)
2218

2319
- number_minutes_spent_on_review[0]

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ if(ENABLE_PRIVATE_TESTS)
9393
enable_testing()
9494
endif()
9595

96-
print_enabled_kmb_features()
96+
print_enabled_npu_features()
9797

9898
#
9999
# Build configuration
@@ -114,6 +114,10 @@ if (ENABLE_SPLIT_DWARF)
114114
enable_split_dwarf()
115115
endif()
116116

117+
if(ENABLE_DEVELOPER_BUILD OR uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
118+
enable_asserts()
119+
endif()
120+
117121
#
118122
# Sub-directories
119123
#

CMakePresets.json

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@
112112

113113
"ENABLE_DEVELOPER_BUILD": true,
114114

115-
"ENABLE_VPUX_DOCS": false
115+
"ENABLE_VPUX_DOCS": false,
116+
"ENABLE_NPU_MICRO_BENCHMARKS": true
116117
}
117118
},
118119
{
@@ -137,7 +138,8 @@
137138

138139
"ENABLE_DEVELOPER_BUILD": true,
139140

140-
"ENABLE_VPUX_DOCS": false
141+
"ENABLE_VPUX_DOCS": false,
142+
"ENABLE_NPU_MICRO_BENCHMARKS": true
141143
}
142144
},
143145
{
@@ -215,7 +217,7 @@
215217
{
216218
"name": "cid",
217219
"hidden": true,
218-
"description": "Cid build necessary options. Please note the path of NPU plugin when use.",
220+
"description": "cid build necessary options. Please note the path of NPU plugin when use.",
219221
"cacheVariables": {
220222
"BUILD_SHARED_LIBS": false,
221223
"ENABLE_OV_IR_FRONTEND": true,
@@ -270,20 +272,22 @@
270272
"ENABLE_OPENCV": false,
271273

272274
"ENABLE_MULTI": false,
275+
"ENABLE_HETERO": false,
273276
"ENABLE_AUTO": false,
274277
"ENABLE_AUTO_BATCH": false,
278+
"ENABLE_TEMPLATE": false,
275279
"ENABLE_PROXY": false,
276-
"ENABLE_HETERO": false,
277280
"ENABLE_INTEL_CPU": false,
278281
"ENABLE_INTEL_GPU": false,
279-
"ENABLE_TEMPLATE": false,
280282

283+
"ENABLE_NPU_PLUGIN_ENGINE": false,
281284
"ENABLE_ZEROAPI_BACKEND": false,
282285
"ENABLE_DRIVER_COMPILER_ADAPTER": false,
283286
"ENABLE_INTEL_NPU_INTERNAL": false,
287+
"ENABLE_INTEL_NPU_PROTOPIPE": false,
284288

285-
"ENABLE_NPU_PROTOPIPE": false,
286-
"ENABLE_NPU_LSP_SERVER":false
289+
"ENABLE_PRIVATE_TESTS": false,
290+
"ENABLE_NPU_LSP_SERVER": false
287291
}
288292
},
289293
{
@@ -297,9 +301,7 @@
297301
"type": "STRING",
298302
"value": "Release"
299303
},
300-
301304
"CMAKE_TOOLCHAIN_FILE":"${sourceDir}\\cmake\\toolchains\\onecoreuap.toolchain.cmake",
302-
303305
"ENABLE_LTO": false,
304306
"ENABLE_FASTER_BUILD": false,
305307
"ENABLE_CPPLINT": false,
@@ -326,20 +328,22 @@
326328
"ENABLE_OPENCV": false,
327329

328330
"ENABLE_MULTI": false,
331+
"ENABLE_HETERO": false,
329332
"ENABLE_AUTO": false,
330333
"ENABLE_AUTO_BATCH": false,
334+
"ENABLE_TEMPLATE": false,
331335
"ENABLE_PROXY": false,
332-
"ENABLE_HETERO": false,
333336
"ENABLE_INTEL_CPU": false,
334337
"ENABLE_INTEL_GPU": false,
335-
"ENABLE_TEMPLATE": false,
336338

339+
"ENABLE_NPU_PLUGIN_ENGINE": false,
337340
"ENABLE_ZEROAPI_BACKEND": false,
338341
"ENABLE_DRIVER_COMPILER_ADAPTER": false,
339342
"ENABLE_INTEL_NPU_INTERNAL": false,
343+
"ENABLE_INTEL_NPU_PROTOPIPE": false,
340344

341-
"ENABLE_NPU_PROTOPIPE": false,
342-
"ENABLE_NPU_LSP_SERVER":false
345+
"ENABLE_PRIVATE_TESTS": false,
346+
"ENABLE_NPU_LSP_SERVER": false
343347
}
344348
},
345349
{

cmake/compile_options.cmake

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,34 @@ macro(enable_split_dwarf)
109109
endif()
110110
endif()
111111
endmacro()
112+
113+
function(append_avx2_flags TARGET_NAME)
114+
if(ENABLE_AVX2)
115+
ov_avx2_optimization_flags(avx2_flags)
116+
target_compile_options(${TARGET_NAME} PUBLIC "${avx2_flags}")
117+
endif()
118+
endfunction()
119+
120+
# the implementation is taken from llvm/cmake/modules/HandleLLVMOptions.cmake
121+
macro(enable_asserts)
122+
if(NOT MSVC)
123+
add_compile_definitions(_DEBUG)
124+
endif()
125+
if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" )
126+
add_compile_options($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:-UNDEBUG>)
127+
if (MSVC)
128+
foreach (flags_var_to_scrub
129+
CMAKE_CXX_FLAGS_RELEASE
130+
CMAKE_CXX_FLAGS_RELWITHDEBINFO
131+
CMAKE_CXX_FLAGS_MINSIZEREL
132+
CMAKE_C_FLAGS_RELEASE
133+
CMAKE_C_FLAGS_RELWITHDEBINFO
134+
CMAKE_C_FLAGS_MINSIZEREL)
135+
string (REGEX REPLACE "(^| )[/-]D *NDEBUG($| )" " "
136+
"${flags_var_to_scrub}" "${${flags_var_to_scrub}}")
137+
endforeach()
138+
endif()
139+
endif()
140+
add_compile_definitions(_GLIBCXX_ASSERTIONS)
141+
add_compile_definitions(_LIBCPP_ENABLE_ASSERTIONS)
142+
endmacro()

cmake/features.cmake

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ endif()
5757

5858
ov_option(ENABLE_NPU_LOADER "Enable npu-loader" OFF)
5959
ov_option(ENABLE_NPU_LSP_SERVER "Enable npu-lsp-server" ON)
60-
ov_option(ENABLE_NPU_PROTOPIPE "Enable protopipe" ON)
6160

6261
get_target_property(ov_linked_libs openvino::runtime IMPORTED_LINK_DEPENDENT_LIBRARIES_RELEASE)
6362
if(THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO" OR "TBB::tbb" IN_LIST ov_linked_libs)
@@ -78,6 +77,8 @@ ov_option(ENABLE_SPLIT_DWARF "Use -gsplit-dwarf when compiling the project and -
7877

7978
ov_option(LIT_TESTS_USE_LINKS "Create symlink to lit-tests in the binary directory instead of copying them" OFF)
8079

80+
ov_option(ENABLE_NPU_MICRO_BENCHMARKS "NPU micro benchmarks" OFF)
81+
8182
if(ENABLE_VPUX_DOCS)
8283
find_package(Doxygen)
8384
if(DOXYGEN_FOUND)
@@ -97,8 +98,8 @@ if(ENABLE_VPUX_DOCS)
9798
endif()
9899
endif()
99100

100-
function (print_enabled_kmb_features)
101-
message(STATUS "KMB Plugin enabled features: ")
101+
function (print_enabled_npu_features)
102+
message(STATUS "NPU Plugin enabled features: ")
102103
message(STATUS "")
103104
foreach(var IN LISTS OV_OPTIONS)
104105
message(STATUS " ${var} = ${${var}}")

0 commit comments

Comments
 (0)