Skip to content

Commit d5d219e

Browse files
[OS][ww24] - Upstreaming compiler repository (#99)
* [OS][ww24] - Upstreaming compiler repository * [OS][ww24] - Upstreaming compiler repository - clang * [OS][ww24] - Upstreaming compiler repository - OV flags for github actions * FileCheck error: <stdin> is empty
1 parent 32ea004 commit d5d219e

File tree

2,269 files changed

+75181
-34875
lines changed

Some content is hidden

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

2,269 files changed

+75181
-34875
lines changed

.github/workflows/job_build_mlir_linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ jobs:
179179
-DENABLE_MLIR_COMPILER=ON \
180180
-DENABLE_PLUGINS_XML=ON \
181181
-DENABLE_PYTHON=ON \
182-
-DENABLE_WHEEL=ON \
182+
-DENABLE_WHEEL=OFF \
183183
-DENABLE_TBBBIND_2_5=ON \
184184
-DENABLE_DEBUG_CAPS=ON \
185185
-DENABLE_NPU_DEBUG_CAPS=ON \

.github/workflows/ubuntu_22.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
build-cache: false
3030
build-cache-key-suffix: cache_${{ github.ref_name }}
3131
build-mlir: true
32-
build-driver: true
32+
build-driver: false
3333
run-unit-tests: true
3434
run-lit-tests: true
3535
run-compilation-tests: true

.github/workflows/ubuntu_24.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
build-cache: false
3030
build-cache-key-suffix: cache_${{ github.ref_name }}
3131
build-mlir: true
32-
build-driver: true
32+
build-driver: false
3333
run-unit-tests: false
3434
run-lit-tests: false
3535
run-compilation-tests: true

cmake/compile_options_llvm.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@ macro(set_llvm_flags)
2929
set(LLVM_BUILD_TOOLS OFF CACHE BOOL "" FORCE)
3030
set(LLVM_BUILD_UTILS ON CACHE BOOL "" FORCE)
3131
set(LLVM_INSTALL_UTILS ON CACHE BOOL "" FORCE)
32+
set(LLVM_ABI_BREAKING_CHECKS "FORCE_OFF" CACHE STRING "" FORCE)
3233
endmacro()

cmake/features.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ endif()
4848

4949
ov_option(ENABLE_DEVELOPER_BUILD "Enable developer build with extra validation/logging functionality" OFF)
5050

51+
if(NOT DEFINED ENABLE_PRIVATE_COMPILER_OPTIONS)
52+
set(ENABLE_PRIVATE_COMPILER_OPTIONS ${ENABLE_DEVELOPER_BUILD})
53+
endif()
54+
ov_option(ENABLE_PRIVATE_COMPILER_OPTIONS "Enable the private compiler options, which are accessible via the NPU_COMPILATION_MODE_PARAMS property" ${ENABLE_PRIVATE_COMPILER_OPTIONS})
55+
if(ENABLE_PRIVATE_COMPILER_OPTIONS)
56+
add_definitions(-DPRIVATE_COMPILER_OPTIONS_ENABLED)
57+
endif()
58+
5159
if(NOT DEFINED MV_TOOLS_PATH AND DEFINED ENV{MV_TOOLS_DIR} AND DEFINED ENV{MV_TOOLS_VERSION})
5260
set(MV_TOOLS_PATH $ENV{MV_TOOLS_DIR}/$ENV{MV_TOOLS_VERSION})
5361
endif()

cmake/prep_ldscript.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import os
2+
import sys
3+
4+
5+
def usage():
6+
print(f"Usage: python {sys.argv[0]} FILENAME [FILENAME...] OUTPUT_FILENAME")
7+
sys.exit(1)
8+
9+
10+
def prep_ldscript_header(filename_ld, filename_h, varname):
11+
with open(filename_ld, "r") as infile:
12+
text = infile.read()
13+
lines = [line.strip() for line in text.split("\n")]
14+
lines = [line for line in lines if line]
15+
16+
vardef_begin = f'const char* {varname} = R"ldscript(\n'
17+
vardef_end = '\n)ldscript";\n'
18+
19+
result = "#pragma once\n\n" + vardef_begin + "\n".join(lines) + vardef_end
20+
21+
with open(filename_h, "w") as outfile:
22+
outfile.write(result)
23+
print(f" Generated header file as {filename_h}")
24+
25+
26+
def main():
27+
if len(sys.argv) < 3:
28+
usage()
29+
input_ld = sys.argv[1]
30+
output_h = sys.argv[2]
31+
varname = "SHAVE_LD_SCRIPT"
32+
33+
prep_ldscript_header(input_ld, output_h, varname)
34+
35+
36+
if __name__ == "__main__":
37+
main()

src/vpux_compiler/CMakeLists.txt

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -47,34 +47,6 @@ if(NOT ENABLE_MLIR_COMPILER)
4747
return()
4848
endif()
4949

50-
#
51-
# Embed VPUNN models
52-
#
53-
54-
find_package(Git REQUIRED)
55-
56-
execute_process(
57-
COMMAND ${GIT_EXECUTABLE} lfs pull
58-
WORKING_DIRECTORY "${IE_MAIN_VPUX_PLUGIN_SOURCE_DIR}/thirdparty/vpucostmodel")
59-
60-
vpux_embed_bin_file(
61-
SOURCE_FILE "${IE_MAIN_VPUX_PLUGIN_SOURCE_DIR}/thirdparty/vpucostmodel/models/vpu_2_7_159.vpunn"
62-
HEADER_FILE "${PROJECT_BINARY_DIR}/${gen_base_dst_include_dir}/dialect/VPU/generated/cost_model_data_2_7.hpp.inc"
63-
VARIABLE_NAME "COST_MODEL_2_7")
64-
vpux_embed_bin_file(
65-
SOURCE_FILE "${IE_MAIN_VPUX_PLUGIN_SOURCE_DIR}/thirdparty/vpucostmodel/models/vpu_2_7_159.fast.vpunn"
66-
HEADER_FILE "${PROJECT_BINARY_DIR}/${gen_base_dst_include_dir}/dialect/VPU/generated/cost_model_data_2_7_fast.hpp.inc"
67-
VARIABLE_NAME "COST_MODEL_2_7_FAST")
68-
69-
vpux_embed_bin_file(
70-
SOURCE_FILE "${IE_MAIN_VPUX_PLUGIN_SOURCE_DIR}/thirdparty/vpucostmodel/models/vpu_40_159_strict.vpunn"
71-
HEADER_FILE "${PROJECT_BINARY_DIR}/${gen_base_dst_include_dir}/dialect/VPU/generated/cost_model_data_4_0.hpp.inc"
72-
VARIABLE_NAME "COST_MODEL_4_0")
73-
vpux_embed_bin_file(
74-
SOURCE_FILE "${IE_MAIN_VPUX_PLUGIN_SOURCE_DIR}/thirdparty/vpucostmodel/models/vpu_40_159_strict.fast.vpunn"
75-
HEADER_FILE "${PROJECT_BINARY_DIR}/${gen_base_dst_include_dir}/dialect/VPU/generated/cost_model_data_4_0_fast.hpp.inc"
76-
VARIABLE_NAME "COST_MODEL_4_0_FAST")
77-
7850
#
7951
# OBJECT target
8052
#
Binary file not shown.
28.5 KB
Loading

src/vpux_compiler/docs/guides/primer_mlir.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ static ::mlir::LogicalResult __mlir_ods_local_type_constraint_ops4(
633633
unsigned valueIndex) {
634634
// The type has to be a `mlir::TensorType` and it must have a rank (i.e. the number of dimensions is known)
635635
// Note: `mlir::TensorType` inherits from `mlir::ShapedType`, which is why the cast to the latter can be executed
636-
if (!((((type.isa<::mlir::TensorType>())) && ((type.cast<::mlir::ShapedType>().hasRank()))) && ([](::mlir::Type elementType) { return (true); }(type.cast<::mlir::ShapedType>().getElementType())))) {
636+
if (!((((type.isa<::mlir::TensorType>())) && ((mlir::cast<::mlir::ShapedType>(type).hasRank()))) && ([](::mlir::Type elementType) { return (true); }(mlir::cast<::mlir::ShapedType>(type).getElementType())))) {
637637
return op->emitOpError(valueKind) << " #" << valueIndex
638638
<< " must be ranked tensor of any type values, but got " << type;
639639
}

0 commit comments

Comments
 (0)