Skip to content

Commit

Permalink
[OS][ww44] - Upstreaming compiler repository (#40)
Browse files Browse the repository at this point in the history
* [OS][ww44] - Upstreaming compiler repository

* [OS] Update submodules

* [OS] Update schema paths

* [OS] Upstreaming compiler repository - remove upa
  • Loading branch information
ksenia-shkileva authored Oct 31, 2024
1 parent 1a83394 commit 4f89b7c
Show file tree
Hide file tree
Showing 3,642 changed files with 143,128 additions and 111,895 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 2 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ Checks: >
readability-simplify-subscript-expr
CheckOptions:
- key: readability-identifier-naming.GlobalConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.ClassCase
value: CamelCase
- key: readability-identifier-naming.EnumCase
Expand Down
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ if (CMAKE_BUILD_TYPE STREQUAL "")
endif()

if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY ${IE_MAIN_VPUX_PLUGIN_BINARY_DIR})
set(CMAKE_PDB_OUTPUT_DIRECTORY ${IE_MAIN_VPUX_PLUGIN_BINARY_DIR})
set(CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY ${MAIN_VPUX_PLUGIN_BINARY_DIR})
set(CMAKE_PDB_OUTPUT_DIRECTORY ${MAIN_VPUX_PLUGIN_BINARY_DIR})
endif()

if(DEFINED ENV{THIRDPARTY_SERVER_PATH})
Expand Down Expand Up @@ -156,7 +156,6 @@ if(ENABLE_MLIR_COMPILER)
endif()

add_subdirectory(src)
add_subdirectory(scripts)

if(ENABLE_PRIVATE_TESTS)
include(cmake/lit_tests.cmake)
Expand Down
2 changes: 0 additions & 2 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@
"CMAKE_EXPORT_COMPILE_COMMANDS" : true,

"ENABLE_DEVELOPER_BUILD": true,
"ENABLE_IMD_BACKEND": false,

"ENABLE_VPUX_DOCS": false
}
Expand All @@ -137,7 +136,6 @@
"CMAKE_EXPORT_COMPILE_COMMANDS" : true,

"ENABLE_DEVELOPER_BUILD": true,
"ENABLE_IMD_BACKEND": false,

"ENABLE_VPUX_DOCS": false
}
Expand Down
24 changes: 0 additions & 24 deletions SourcePackageConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,22 @@
"^/\\.editorconfig*",
"^/\\.infrastructure/.*",
"^/\\.vscode/.*",
"^/artifacts/.*",
"^/cmake/dependencies\\.cmake",
"^/cmake/source_package\\.cmake",
"^/cmake/lit.*",
"^/cmake/oecore.arm64.toolchain\\.cmake",
"^/docs/.*",
"^/scripts/.*",
"^/src/VPUXCompilerL0/.*",
"^/src/vpux_imd_backend/.*",
"^/src/sw_runtime_kernels/.*",
"^/temp/.*",
"^/tests/.*",
"^/tests_deprecated/.*",
"^/thirdparty/json/.*",
"^/tools/.*",
"^/validation/.*",
"^/CODEOWNERS",
"^/CONTRIBUTING",
"^/Jenkinsfile",
"^/README.md",
"^/SourcePackageConfig.json",
".*\\.git.*",

"^/guides/how-to-build.md",
"^/guides/how-to-build-vpualHost.md",
"^/guides/how-to-deploy.md",
"^/guides/how-to-set-devices-and-platforms.md",
"^/guides/how-to-test.md",
"^/guides/how-to-use-imd-backend.md",
"^/guides/how-to-use-kmb-bypass.md",
"^/guides/how-to-use-profiling.md",
"^/guides/how-to-use-tbh-bypass.md",

"^/sw_runtime_kernels/jtag_tests/.*",
"^/sw_runtime_kernels/firmware_vpu_revision\\.txt",
"^/sw_runtime_kernels/kernels/3720/.*",
"^/sw_runtime_kernels/kernels/act_runtime/.*",
"^/sw_runtime_kernels/kernels/common/.*",
"^/sw_runtime_kernels/kernels/prebuild/.*\\.ld",
"^/sw_runtime_kernels/kernels/prebuild/.*\\.xdat",
"^/sw_runtime_kernels/kernels/.*\\.cpp",
Expand All @@ -50,8 +28,6 @@
"^/sw_runtime_kernels/.*\\.md",
"^/sw_runtime_kernels/kernels/inc/3720/.*",
"^/sw_runtime_kernels/kernels/inc/param_.*",
"^/sw_runtime_kernels/kernels/descrip/.*",
"^/sw_runtime_kernels/kernels/src/.*",
"^/sw_runtime_kernels/kernels/CMakeLists.txt"
]
}
29 changes: 3 additions & 26 deletions cmake/compile_options.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#
# Copyright (C) 2022 Intel Corporation.
# Copyright (C) 2022-2024 Intel Corporation.
# SPDX-License-Identifier: Apache 2.0
#

include("${CMAKE_CURRENT_LIST_DIR}/compile_options_llvm.cmake")

# put flags allowing dynamic symbols into target
macro(replace_compile_visibility_options)
# Replace compiler flags
Expand Down Expand Up @@ -94,31 +96,6 @@ function(enable_warnings_as_errors TARGET_NAME)
endif()
endfunction()

macro(set_llvm_flags)
set(LLVM_ENABLE_WARNINGS OFF CACHE BOOL "")
set(LLVM_ENABLE_BINDINGS OFF CACHE BOOL "" FORCE)
set(LLVM_ENABLE_RTTI ON CACHE BOOL "" FORCE)
set(LLVM_ENABLE_EH ON CACHE BOOL "" FORCE)
set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "" FORCE)
set(LLVM_ENABLE_CRASH_OVERRIDES OFF CACHE BOOL "" FORCE)
set(LLVM_ENABLE_PROJECTS "mlir" CACHE STRING "" FORCE)
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR ENABLE_DEVELOPER_BUILD)
set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "" FORCE)
else()
set(LLVM_ENABLE_ASSERTIONS OFF CACHE BOOL "" FORCE)
endif()
set(LLVM_INCLUDE_TESTS OFF CACHE BOOL "" FORCE)
set(LLVM_INCLUDE_BENCHMARKS OFF CACHE BOOL "" FORCE)
set(LLVM_TARGETS_TO_BUILD "host" CACHE STRING "" FORCE)
set(CROSS_TOOLCHAIN_FLAGS_ "" CACHE STRING "" FORCE)
set(CROSS_TOOLCHAIN_FLAGS_NATIVE "" CACHE STRING "" FORCE)
set(LLVM_ENABLE_TERMINFO OFF CACHE BOOL "" FORCE)
# we do not use examples and having it enabled
# makes cmake complains about long path on Windows
set(LLVM_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "" FORCE)
endmacro()

macro(enable_split_dwarf)
if ((CMAKE_BUILD_TYPE STREQUAL "Debug") OR (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo"))
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
Expand Down
32 changes: 32 additions & 0 deletions cmake/compile_options_llvm.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#
# Copyright (C) 2024 Intel Corporation.
# SPDX-License-Identifier: Apache 2.0
#

macro(set_llvm_flags)
set(LLVM_ENABLE_WARNINGS OFF CACHE BOOL "")
set(LLVM_ENABLE_BINDINGS OFF CACHE BOOL "" FORCE)
set(LLVM_ENABLE_RTTI ON CACHE BOOL "" FORCE)
set(LLVM_ENABLE_EH ON CACHE BOOL "" FORCE)
set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "" FORCE)
set(LLVM_ENABLE_CRASH_OVERRIDES OFF CACHE BOOL "" FORCE)
set(LLVM_ENABLE_PROJECTS "mlir" CACHE STRING "" FORCE)
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR ENABLE_DEVELOPER_BUILD)
set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "" FORCE)
else()
set(LLVM_ENABLE_ASSERTIONS OFF CACHE BOOL "" FORCE)
endif()
set(LLVM_INCLUDE_TESTS OFF CACHE BOOL "" FORCE)
set(LLVM_INCLUDE_BENCHMARKS OFF CACHE BOOL "" FORCE)
set(LLVM_TARGETS_TO_BUILD "host" CACHE STRING "" FORCE)
set(CROSS_TOOLCHAIN_FLAGS_ "" CACHE STRING "" FORCE)
set(CROSS_TOOLCHAIN_FLAGS_NATIVE "" CACHE STRING "" FORCE)
set(LLVM_ENABLE_TERMINFO OFF CACHE BOOL "" FORCE)
# we do not use examples and having it enabled
# makes cmake complains about long path on Windows
set(LLVM_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "" FORCE)
set(LLVM_BUILD_TOOLS OFF CACHE BOOL "" FORCE)
set(LLVM_BUILD_UTILS ON CACHE BOOL "" FORCE)
set(LLVM_INSTALL_UTILS ON CACHE BOOL "" FORCE)
endmacro()
12 changes: 2 additions & 10 deletions cmake/embed_bin_file.cmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
#
# Copyright 2022 Intel Corporation.
#
# LEGAL NOTICE: Your use of this software and any required dependent software
# (the "Software Package") is subject to the terms and conditions of
# the Intel(R) OpenVINO(TM) Distribution License for the Software Package,
# which may also include notices, disclaimers, or license terms for
# third party or open source software included in or with the Software Package,
# and your use indicates your acceptance of all such terms. Please refer
# to the "third-party-programs.txt" or other similarly-named text file
# included with the Software Package for additional details.
# Copyright (C) 2022 Intel Corporation
# SPDX-License-Identifier: Apache 2.0
#

function(vpux_embed_bin_file)
Expand Down
5 changes: 3 additions & 2 deletions cmake/features.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,11 @@ if(NOT DEFINED MV_TOOLS_PATH AND DEFINED ENV{MV_TOOLS_DIR} AND DEFINED ENV{MV_TO
endif()

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

if(THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO")
get_target_property(ov_linked_libs openvino::runtime IMPORTED_LINK_DEPENDENT_LIBRARIES_RELEASE)
if(THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO" OR "TBB::tbb" IN_LIST ov_linked_libs)
set(TBB_AVAILABLE ON)
endif()
ov_dependent_option(ENABLE_BACKGROUND_FOLDING "Enable constant folding in background" ON "TBB_AVAILABLE" OFF)
Expand Down
5 changes: 4 additions & 1 deletion cmake/flatbuffers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ function(vpux_gf_version_generate SRC_DIR DST_DIR)
OUTPUT_STRIP_TRAILING_WHITESPACE
)

set(GIT_DESCRIBE_DIRTY "v3.35.2")
if ("${GIT_DESCRIBE_DIRTY}" STREQUAL "")
message(WARNING "GraphFile version cannot be read from ${SRC_DIR}")
set(GIT_DESCRIBE_DIRTY "v3.35.2")
endif()

string(REGEX REPLACE "^v([0-9]+)\\..*" "\\1" VERSION_MAJOR "${GIT_DESCRIBE_DIRTY}")
string(REGEX REPLACE "^v[0-9]+\\.([0-9]+).*" "\\1" VERSION_MINOR "${GIT_DESCRIBE_DIRTY}")
Expand Down
20 changes: 0 additions & 20 deletions scripts/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit 4f89b7c

Please sign in to comment.