Skip to content

Commit 4f89b7c

Browse files
[OS][ww44] - Upstreaming compiler repository (#40)
* [OS][ww44] - Upstreaming compiler repository * [OS] Update submodules * [OS] Update schema paths * [OS] Upstreaming compiler repository - remove upa
1 parent 1a83394 commit 4f89b7c

File tree

3,642 files changed

+143128
-111895
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,642 files changed

+143128
-111895
lines changed

.clang-tidy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ Checks: >
5858
readability-simplify-subscript-expr
5959
6060
CheckOptions:
61+
- key: readability-identifier-naming.GlobalConstantCase
62+
value: UPPER_CASE
6163
- key: readability-identifier-naming.ClassCase
6264
value: CamelCase
6365
- key: readability-identifier-naming.EnumCase

CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ if (CMAKE_BUILD_TYPE STREQUAL "")
4545
endif()
4646

4747
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
48-
set(CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY ${IE_MAIN_VPUX_PLUGIN_BINARY_DIR})
49-
set(CMAKE_PDB_OUTPUT_DIRECTORY ${IE_MAIN_VPUX_PLUGIN_BINARY_DIR})
48+
set(CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY ${MAIN_VPUX_PLUGIN_BINARY_DIR})
49+
set(CMAKE_PDB_OUTPUT_DIRECTORY ${MAIN_VPUX_PLUGIN_BINARY_DIR})
5050
endif()
5151

5252
if(DEFINED ENV{THIRDPARTY_SERVER_PATH})
@@ -156,7 +156,6 @@ if(ENABLE_MLIR_COMPILER)
156156
endif()
157157

158158
add_subdirectory(src)
159-
add_subdirectory(scripts)
160159

161160
if(ENABLE_PRIVATE_TESTS)
162161
include(cmake/lit_tests.cmake)

CMakePresets.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@
111111
"CMAKE_EXPORT_COMPILE_COMMANDS" : true,
112112

113113
"ENABLE_DEVELOPER_BUILD": true,
114-
"ENABLE_IMD_BACKEND": false,
115114

116115
"ENABLE_VPUX_DOCS": false
117116
}
@@ -137,7 +136,6 @@
137136
"CMAKE_EXPORT_COMPILE_COMMANDS" : true,
138137

139138
"ENABLE_DEVELOPER_BUILD": true,
140-
"ENABLE_IMD_BACKEND": false,
141139

142140
"ENABLE_VPUX_DOCS": false
143141
}

SourcePackageConfig.json

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,22 @@
44
"^/\\.editorconfig*",
55
"^/\\.infrastructure/.*",
66
"^/\\.vscode/.*",
7-
"^/artifacts/.*",
87
"^/cmake/dependencies\\.cmake",
98
"^/cmake/source_package\\.cmake",
109
"^/cmake/lit.*",
1110
"^/cmake/oecore.arm64.toolchain\\.cmake",
1211
"^/docs/.*",
1312
"^/scripts/.*",
1413
"^/src/VPUXCompilerL0/.*",
15-
"^/src/vpux_imd_backend/.*",
1614
"^/src/sw_runtime_kernels/.*",
1715
"^/temp/.*",
1816
"^/tests/.*",
19-
"^/tests_deprecated/.*",
20-
"^/thirdparty/json/.*",
2117
"^/tools/.*",
22-
"^/validation/.*",
2318
"^/CODEOWNERS",
24-
"^/CONTRIBUTING",
2519
"^/Jenkinsfile",
26-
"^/README.md",
2720
"^/SourcePackageConfig.json",
2821
".*\\.git.*",
2922

30-
"^/guides/how-to-build.md",
31-
"^/guides/how-to-build-vpualHost.md",
32-
"^/guides/how-to-deploy.md",
33-
"^/guides/how-to-set-devices-and-platforms.md",
34-
"^/guides/how-to-test.md",
35-
"^/guides/how-to-use-imd-backend.md",
36-
"^/guides/how-to-use-kmb-bypass.md",
37-
"^/guides/how-to-use-profiling.md",
38-
"^/guides/how-to-use-tbh-bypass.md",
39-
40-
"^/sw_runtime_kernels/jtag_tests/.*",
41-
"^/sw_runtime_kernels/firmware_vpu_revision\\.txt",
42-
"^/sw_runtime_kernels/kernels/3720/.*",
43-
"^/sw_runtime_kernels/kernels/act_runtime/.*",
44-
"^/sw_runtime_kernels/kernels/common/.*",
4523
"^/sw_runtime_kernels/kernels/prebuild/.*\\.ld",
4624
"^/sw_runtime_kernels/kernels/prebuild/.*\\.xdat",
4725
"^/sw_runtime_kernels/kernels/.*\\.cpp",
@@ -50,8 +28,6 @@
5028
"^/sw_runtime_kernels/.*\\.md",
5129
"^/sw_runtime_kernels/kernels/inc/3720/.*",
5230
"^/sw_runtime_kernels/kernels/inc/param_.*",
53-
"^/sw_runtime_kernels/kernels/descrip/.*",
54-
"^/sw_runtime_kernels/kernels/src/.*",
5531
"^/sw_runtime_kernels/kernels/CMakeLists.txt"
5632
]
5733
}

cmake/compile_options.cmake

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
#
2-
# Copyright (C) 2022 Intel Corporation.
2+
# Copyright (C) 2022-2024 Intel Corporation.
33
# SPDX-License-Identifier: Apache 2.0
44
#
55

6+
include("${CMAKE_CURRENT_LIST_DIR}/compile_options_llvm.cmake")
7+
68
# put flags allowing dynamic symbols into target
79
macro(replace_compile_visibility_options)
810
# Replace compiler flags
@@ -94,31 +96,6 @@ function(enable_warnings_as_errors TARGET_NAME)
9496
endif()
9597
endfunction()
9698

97-
macro(set_llvm_flags)
98-
set(LLVM_ENABLE_WARNINGS OFF CACHE BOOL "")
99-
set(LLVM_ENABLE_BINDINGS OFF CACHE BOOL "" FORCE)
100-
set(LLVM_ENABLE_RTTI ON CACHE BOOL "" FORCE)
101-
set(LLVM_ENABLE_EH ON CACHE BOOL "" FORCE)
102-
set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "" FORCE)
103-
set(LLVM_ENABLE_CRASH_OVERRIDES OFF CACHE BOOL "" FORCE)
104-
set(LLVM_ENABLE_PROJECTS "mlir" CACHE STRING "" FORCE)
105-
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR ENABLE_DEVELOPER_BUILD)
106-
set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "" FORCE)
107-
else()
108-
set(LLVM_ENABLE_ASSERTIONS OFF CACHE BOOL "" FORCE)
109-
endif()
110-
set(LLVM_INCLUDE_TESTS OFF CACHE BOOL "" FORCE)
111-
set(LLVM_INCLUDE_BENCHMARKS OFF CACHE BOOL "" FORCE)
112-
set(LLVM_TARGETS_TO_BUILD "host" CACHE STRING "" FORCE)
113-
set(CROSS_TOOLCHAIN_FLAGS_ "" CACHE STRING "" FORCE)
114-
set(CROSS_TOOLCHAIN_FLAGS_NATIVE "" CACHE STRING "" FORCE)
115-
set(LLVM_ENABLE_TERMINFO OFF CACHE BOOL "" FORCE)
116-
# we do not use examples and having it enabled
117-
# makes cmake complains about long path on Windows
118-
set(LLVM_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
119-
set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "" FORCE)
120-
endmacro()
121-
12299
macro(enable_split_dwarf)
123100
if ((CMAKE_BUILD_TYPE STREQUAL "Debug") OR (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo"))
124101
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")

cmake/compile_options_llvm.cmake

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#
2+
# Copyright (C) 2024 Intel Corporation.
3+
# SPDX-License-Identifier: Apache 2.0
4+
#
5+
6+
macro(set_llvm_flags)
7+
set(LLVM_ENABLE_WARNINGS OFF CACHE BOOL "")
8+
set(LLVM_ENABLE_BINDINGS OFF CACHE BOOL "" FORCE)
9+
set(LLVM_ENABLE_RTTI ON CACHE BOOL "" FORCE)
10+
set(LLVM_ENABLE_EH ON CACHE BOOL "" FORCE)
11+
set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "" FORCE)
12+
set(LLVM_ENABLE_CRASH_OVERRIDES OFF CACHE BOOL "" FORCE)
13+
set(LLVM_ENABLE_PROJECTS "mlir" CACHE STRING "" FORCE)
14+
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR ENABLE_DEVELOPER_BUILD)
15+
set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "" FORCE)
16+
else()
17+
set(LLVM_ENABLE_ASSERTIONS OFF CACHE BOOL "" FORCE)
18+
endif()
19+
set(LLVM_INCLUDE_TESTS OFF CACHE BOOL "" FORCE)
20+
set(LLVM_INCLUDE_BENCHMARKS OFF CACHE BOOL "" FORCE)
21+
set(LLVM_TARGETS_TO_BUILD "host" CACHE STRING "" FORCE)
22+
set(CROSS_TOOLCHAIN_FLAGS_ "" CACHE STRING "" FORCE)
23+
set(CROSS_TOOLCHAIN_FLAGS_NATIVE "" CACHE STRING "" FORCE)
24+
set(LLVM_ENABLE_TERMINFO OFF CACHE BOOL "" FORCE)
25+
# we do not use examples and having it enabled
26+
# makes cmake complains about long path on Windows
27+
set(LLVM_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
28+
set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "" FORCE)
29+
set(LLVM_BUILD_TOOLS OFF CACHE BOOL "" FORCE)
30+
set(LLVM_BUILD_UTILS ON CACHE BOOL "" FORCE)
31+
set(LLVM_INSTALL_UTILS ON CACHE BOOL "" FORCE)
32+
endmacro()

cmake/embed_bin_file.cmake

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
#
2-
# Copyright 2022 Intel Corporation.
3-
#
4-
# LEGAL NOTICE: Your use of this software and any required dependent software
5-
# (the "Software Package") is subject to the terms and conditions of
6-
# the Intel(R) OpenVINO(TM) Distribution License for the Software Package,
7-
# which may also include notices, disclaimers, or license terms for
8-
# third party or open source software included in or with the Software Package,
9-
# and your use indicates your acceptance of all such terms. Please refer
10-
# to the "third-party-programs.txt" or other similarly-named text file
11-
# included with the Software Package for additional details.
2+
# Copyright (C) 2022 Intel Corporation
3+
# SPDX-License-Identifier: Apache 2.0
124
#
135

146
function(vpux_embed_bin_file)

cmake/features.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,11 @@ if(NOT DEFINED MV_TOOLS_PATH AND DEFINED ENV{MV_TOOLS_DIR} AND DEFINED ENV{MV_TO
5656
endif()
5757

5858
ov_option(ENABLE_NPU_LOADER "Enable npu-loader" OFF)
59-
ov_option(ENABLE_NPU_LSP_SERVER "Enable npu-lsp-server" OFF)
59+
ov_option(ENABLE_NPU_LSP_SERVER "Enable npu-lsp-server" ON)
6060
ov_option(ENABLE_NPU_PROTOPIPE "Enable protopipe" ON)
6161

62-
if(THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO")
62+
get_target_property(ov_linked_libs openvino::runtime IMPORTED_LINK_DEPENDENT_LIBRARIES_RELEASE)
63+
if(THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO" OR "TBB::tbb" IN_LIST ov_linked_libs)
6364
set(TBB_AVAILABLE ON)
6465
endif()
6566
ov_dependent_option(ENABLE_BACKGROUND_FOLDING "Enable constant folding in background" ON "TBB_AVAILABLE" OFF)

cmake/flatbuffers.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ function(vpux_gf_version_generate SRC_DIR DST_DIR)
7474
OUTPUT_STRIP_TRAILING_WHITESPACE
7575
)
7676

77-
set(GIT_DESCRIBE_DIRTY "v3.35.2")
77+
if ("${GIT_DESCRIBE_DIRTY}" STREQUAL "")
78+
message(WARNING "GraphFile version cannot be read from ${SRC_DIR}")
79+
set(GIT_DESCRIBE_DIRTY "v3.35.2")
80+
endif()
7881

7982
string(REGEX REPLACE "^v([0-9]+)\\..*" "\\1" VERSION_MAJOR "${GIT_DESCRIBE_DIRTY}")
8083
string(REGEX REPLACE "^v[0-9]+\\.([0-9]+).*" "\\1" VERSION_MINOR "${GIT_DESCRIBE_DIRTY}")

scripts/CMakeLists.txt

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)