diff options
Diffstat (limited to 'dynamic-layers')
56 files changed, 1745 insertions, 1170 deletions
diff --git a/dynamic-layers/clang-layer/recipes-core/dnn/files/run-ptest b/dynamic-layers/clang-layer/recipes-core/dnn/files/run-ptest new file mode 100755 index 00000000..82d4df58 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-core/dnn/files/run-ptest | |||
@@ -0,0 +1,15 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | cd tests | ||
4 | ./api-c | ||
5 | if [ $? -eq 0 ]; then | ||
6 | echo 'PASS: api-c' | ||
7 | else | ||
8 | echo 'FAIL: api-c' | ||
9 | fi | ||
10 | ./test_c_symbols-c | ||
11 | if [ $? -eq 0 ]; then | ||
12 | echo 'PASS: test_c_symbols-c' | ||
13 | else | ||
14 | echo 'FAIL: test_c_symbols-c' | ||
15 | fi | ||
diff --git a/dynamic-layers/clang-layer/recipes-core/dnn/onednn_3.5.3.bb b/dynamic-layers/clang-layer/recipes-core/dnn/onednn_3.5.3.bb new file mode 100644 index 00000000..7a627e83 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-core/dnn/onednn_3.5.3.bb | |||
@@ -0,0 +1,57 @@ | |||
1 | HOMEPAGE = "https://www.oneapi.com" | ||
2 | SUMMARY = "Deep Neural Network Library" | ||
3 | DESCRIPTION = "This software is a user mode library that accelerates\ | ||
4 | deep-learning applications and frameworks on Intel architecture." | ||
5 | LICENSE = "Apache-2.0 & BSD-3-Clause & BSL-1.0" | ||
6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3b64000f6e7d52516017622a37a94ce9 \ | ||
7 | file://tests/gtests/gtest/LICENSE;md5=cbbd27594afd089daa160d3a16dd515a \ | ||
8 | file://src/cpu/x64/xbyak/COPYRIGHT;md5=3b9bf048d063d54cdb28964db558bcc7 \ | ||
9 | file://src/common/ittnotify/LICENSE.BSD;md5=e671ff178b24a95a382ba670503c66fb \ | ||
10 | " | ||
11 | SECTION = "lib" | ||
12 | |||
13 | inherit pkgconfig cmake ptest | ||
14 | |||
15 | DNN_BRANCH = "rls-v${@'.'.join(d.getVar('PV').split('.')[0:2])}" | ||
16 | |||
17 | S = "${WORKDIR}/git" | ||
18 | SRCREV = "66f0cb9eb66affd2da3bf5f8d897376f04aae6af" | ||
19 | SRC_URI = "git://github.com/oneapi-src/oneDNN.git;branch=${DNN_BRANCH};protocol=https \ | ||
20 | file://run-ptest \ | ||
21 | " | ||
22 | |||
23 | UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>(\d+(\.\d+)+))$" | ||
24 | |||
25 | CVE_PRODUCT = "intel:math_kernel_library" | ||
26 | |||
27 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
28 | COMPATIBLE_HOST:libc-musl = 'null' | ||
29 | |||
30 | EXTRA_OECMAKE += " \ | ||
31 | -DDNNL_LIBRARY_TYPE=SHARED \ | ||
32 | -DDNNL_BUILD_EXAMPLES=ON \ | ||
33 | -DDNNL_BUILD_TESTS=ON \ | ||
34 | -DDNNL_CPU_RUNTIME=OMP \ | ||
35 | -DDNNL_ARCH_OPT_FLAGS="" \ | ||
36 | -DCMAKE_SKIP_RPATH=ON \ | ||
37 | -DONEDNN_BUILD_GRAPH=OFF \ | ||
38 | " | ||
39 | |||
40 | PACKAGECONFIG ??= "gpu" | ||
41 | PACKAGECONFIG[gpu] = "-DDNNL_GPU_RUNTIME=OCL, , opencl-headers virtual/opencl-icd, intel-compute-runtime" | ||
42 | |||
43 | do_install:append () { | ||
44 | install -d ${D}${bindir}/mkl-dnn/tests/benchdnn/inputs | ||
45 | install -m 0755 ${B}/tests/benchdnn/benchdnn ${D}${bindir}/mkl-dnn/tests/benchdnn | ||
46 | cp -r ${B}/tests/benchdnn/inputs/* ${D}${bindir}/mkl-dnn/tests/benchdnn/inputs | ||
47 | } | ||
48 | |||
49 | do_install_ptest () { | ||
50 | install -d ${D}${PTEST_PATH}/tests | ||
51 | install -m 0755 ${B}/tests/api-c ${D}${PTEST_PATH}/tests | ||
52 | install -m 0755 ${B}/tests/test_c_symbols-c ${D}${PTEST_PATH}/tests | ||
53 | } | ||
54 | |||
55 | PACKAGES =+ "${PN}-test" | ||
56 | |||
57 | FILES:${PN}-test = "${bindir}/mkl-dnn/*" | ||
diff --git a/dynamic-layers/clang-layer/recipes-devtools/clang/clang_%.bbappend b/dynamic-layers/clang-layer/recipes-devtools/clang/clang_%.bbappend deleted file mode 100644 index 0ee2bd00..00000000 --- a/dynamic-layers/clang-layer/recipes-devtools/clang/clang_%.bbappend +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/files:" | ||
2 | |||
3 | LLVM_TARGETS_TO_BUILD = "X86" | ||
4 | |||
5 | LIBCPLUSPLUS = "" | ||
6 | |||
diff --git a/dynamic-layers/clang-layer/recipes-devtools/clang/files/0001-dont-export-targets-for-binaries.patch b/dynamic-layers/clang-layer/recipes-devtools/clang/files/0001-dont-export-targets-for-binaries.patch deleted file mode 100644 index da2475f9..00000000 --- a/dynamic-layers/clang-layer/recipes-devtools/clang/files/0001-dont-export-targets-for-binaries.patch +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | From 559fb8f82295ec4dc64a132b6566939b85c1b6fe Mon Sep 17 00:00:00 2001 | ||
2 | From: Anuj Mittal <anuj.mittal@intel.com> | ||
3 | Date: Thu, 15 Aug 2019 22:34:31 +0800 | ||
4 | Subject: [PATCH] dont export targets for binaries | ||
5 | |||
6 | The projects using LLVM cmake modules look for target binaries in | ||
7 | sysroot as a result which isn't desirable in this case and isn't needed | ||
8 | either. | ||
9 | |||
10 | Upstream-Status: Inappropriate [cross-compile specific] | ||
11 | |||
12 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
13 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
14 | --- | ||
15 | llvm/cmake/modules/AddLLVM.cmake | 9 --------- | ||
16 | llvm/cmake/modules/TableGen.cmake | 6 ------ | ||
17 | 2 files changed, 15 deletions(-) | ||
18 | |||
19 | diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake | ||
20 | index 619e986b8aa..d2bc1a25dd9 100644 | ||
21 | --- a/llvm/cmake/modules/AddLLVM.cmake | ||
22 | +++ b/llvm/cmake/modules/AddLLVM.cmake | ||
23 | @@ -898,12 +898,6 @@ macro(add_llvm_tool name) | ||
24 | |||
25 | if ( ${name} IN_LIST LLVM_TOOLCHAIN_TOOLS OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY) | ||
26 | if( LLVM_BUILD_TOOLS ) | ||
27 | - set(export_to_llvmexports) | ||
28 | - if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR | ||
29 | - NOT LLVM_DISTRIBUTION_COMPONENTS) | ||
30 | - set(export_to_llvmexports EXPORT LLVMExports) | ||
31 | - set_property(GLOBAL PROPERTY LLVM_HAS_EXPORTS True) | ||
32 | - endif() | ||
33 | |||
34 | install(TARGETS ${name} | ||
35 | ${export_to_llvmexports} | ||
36 | @@ -917,9 +911,6 @@ macro(add_llvm_tool name) | ||
37 | endif() | ||
38 | endif() | ||
39 | endif() | ||
40 | - if( LLVM_BUILD_TOOLS ) | ||
41 | - set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name}) | ||
42 | - endif() | ||
43 | set_target_properties(${name} PROPERTIES FOLDER "Tools") | ||
44 | endmacro(add_llvm_tool name) | ||
45 | |||
46 | diff --git a/llvm/cmake/modules/TableGen.cmake b/llvm/cmake/modules/TableGen.cmake | ||
47 | index 36c026b5c0f..537acd696d8 100644 | ||
48 | --- a/llvm/cmake/modules/TableGen.cmake | ||
49 | +++ b/llvm/cmake/modules/TableGen.cmake | ||
50 | @@ -148,15 +148,9 @@ macro(add_tablegen target project) | ||
51 | endif() | ||
52 | |||
53 | if (${project} STREQUAL LLVM AND NOT LLVM_INSTALL_TOOLCHAIN_ONLY AND LLVM_BUILD_UTILS) | ||
54 | - set(export_to_llvmexports) | ||
55 | - if(${target} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR | ||
56 | - NOT LLVM_DISTRIBUTION_COMPONENTS) | ||
57 | - set(export_to_llvmexports EXPORT LLVMExports) | ||
58 | - endif() | ||
59 | |||
60 | install(TARGETS ${target} | ||
61 | ${export_to_llvmexports} | ||
62 | RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR}) | ||
63 | endif() | ||
64 | - set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${target}) | ||
65 | endmacro() | ||
66 | -- | ||
67 | 2.17.1 | ||
68 | |||
diff --git a/dynamic-layers/clang-layer/recipes-devtools/clang/files/0001-skip-building-tests.patch b/dynamic-layers/clang-layer/recipes-devtools/clang/files/0001-skip-building-tests.patch deleted file mode 100644 index 9a7b8445..00000000 --- a/dynamic-layers/clang-layer/recipes-devtools/clang/files/0001-skip-building-tests.patch +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | From 48e50f06b1bbed94cdf5207587161d4bfce7366e Mon Sep 17 00:00:00 2001 | ||
2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
3 | Date: Wed, 21 Aug 2019 14:35:31 +0800 | ||
4 | Subject: [PATCH] llvm-spirv: skip building tests | ||
5 | |||
6 | Some of these need clang to be built and since we're building this in-tree, | ||
7 | that leads to problems when compiling libcxx, compiler-rt which aren't built | ||
8 | in-tree. | ||
9 | |||
10 | Instead of using SPIRV_SKIP_CLANG_BUILD to skip clang build and adding this to | ||
11 | all components, disable the building of tests altogether. | ||
12 | |||
13 | Upstream-Status: Inappropriate | ||
14 | |||
15 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
16 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
17 | --- | ||
18 | CMakeLists.txt | 10 ---------- | ||
19 | 1 file changed, 10 deletions(-) | ||
20 | |||
21 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
22 | index 1208741..20ca3e6 100644 | ||
23 | --- a/CMakeLists.txt | ||
24 | +++ b/CMakeLists.txt | ||
25 | @@ -15,13 +15,6 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) | ||
26 | set(CMAKE_CXX_STANDARD 11) | ||
27 | set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
28 | |||
29 | - if(LLVM_INCLUDE_TESTS) | ||
30 | - set(LLVM_TEST_COMPONENTS | ||
31 | - llvm-as | ||
32 | - llvm-dis | ||
33 | - ) | ||
34 | - endif(LLVM_INCLUDE_TESTS) | ||
35 | - | ||
36 | find_package(LLVM 9.0.0 REQUIRED | ||
37 | COMPONENTS | ||
38 | Analysis | ||
39 | @@ -56,9 +49,6 @@ set(LLVM_SPIRV_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include) | ||
40 | |||
41 | add_subdirectory(lib/SPIRV) | ||
42 | add_subdirectory(tools/llvm-spirv) | ||
43 | -if(LLVM_INCLUDE_TESTS) | ||
44 | - add_subdirectory(test) | ||
45 | -endif(LLVM_INCLUDE_TESTS) | ||
46 | |||
47 | install( | ||
48 | FILES | ||
49 | -- | ||
50 | 2.17.1 | ||
51 | |||
diff --git a/dynamic-layers/clang-layer/recipes-devtools/clang/files/BasicBlockUtils-Add-metadata-fixing-in-SplitBlockPre.patch b/dynamic-layers/clang-layer/recipes-devtools/clang/files/BasicBlockUtils-Add-metadata-fixing-in-SplitBlockPre.patch deleted file mode 100644 index cd519971..00000000 --- a/dynamic-layers/clang-layer/recipes-devtools/clang/files/BasicBlockUtils-Add-metadata-fixing-in-SplitBlockPre.patch +++ /dev/null | |||
@@ -1,111 +0,0 @@ | |||
1 | From eeb816d95f0910bd246e37bb2bb3923acf0edf6b Mon Sep 17 00:00:00 2001 | ||
2 | From: Aleksander Us <aleksander.us@intel.com> | ||
3 | Date: Mon, 26 Aug 2019 15:47:41 +0300 | ||
4 | Subject: [PATCH] [BasicBlockUtils] Add metadata fixing in | ||
5 | SplitBlockPredecessors. | ||
6 | |||
7 | In case when BB is header of some loop and predecessor is latch of | ||
8 | this loop, metadata was not attached to newly created basic block. | ||
9 | This led to loss of loop metadata for other passes. | ||
10 | |||
11 | Upstream-Status: Submitted [https://reviews.llvm.org/D66892] | ||
12 | |||
13 | https://github.com/intel/llvm-patches/commit/8af4449e2d201707f7f2f832b473a0439e255f32 | ||
14 | |||
15 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
16 | --- | ||
17 | lib/Transforms/Utils/BasicBlockUtils.cpp | 23 ++++++++---- | ||
18 | test/Transforms/LoopSimplify/loop_metadata.ll | 36 +++++++++++++++++++ | ||
19 | 2 files changed, 52 insertions(+), 7 deletions(-) | ||
20 | create mode 100644 test/Transforms/LoopSimplify/loop_metadata.ll | ||
21 | |||
22 | diff --git a/lib/Transforms/Utils/BasicBlockUtils.cpp b/lib/Transforms/Utils/BasicBlockUtils.cpp | ||
23 | index 5fa371377c8..3a90ae061fb 100644 | ||
24 | --- a/lib/Transforms/Utils/BasicBlockUtils.cpp | ||
25 | +++ b/lib/Transforms/Utils/BasicBlockUtils.cpp | ||
26 | @@ -579,24 +579,33 @@ BasicBlock *llvm::SplitBlockPredecessors(BasicBlock *BB, | ||
27 | |||
28 | // The new block unconditionally branches to the old block. | ||
29 | BranchInst *BI = BranchInst::Create(BB, NewBB); | ||
30 | + bool IsBBHeader = LI && LI->isLoopHeader(BB); | ||
31 | + Loop *BBLoop = LI ? LI->getLoopFor(BB) : nullptr; | ||
32 | // Splitting the predecessors of a loop header creates a preheader block. | ||
33 | - if (LI && LI->isLoopHeader(BB)) | ||
34 | + if (IsBBHeader) | ||
35 | // Using the loop start line number prevents debuggers stepping into the | ||
36 | // loop body for this instruction. | ||
37 | - BI->setDebugLoc(LI->getLoopFor(BB)->getStartLoc()); | ||
38 | + BI->setDebugLoc(BBLoop->getStartLoc()); | ||
39 | else | ||
40 | BI->setDebugLoc(BB->getFirstNonPHIOrDbg()->getDebugLoc()); | ||
41 | |||
42 | // Move the edges from Preds to point to NewBB instead of BB. | ||
43 | - for (unsigned i = 0, e = Preds.size(); i != e; ++i) { | ||
44 | + for (BasicBlock *Pred : Preds) { | ||
45 | + Instruction *PI = Pred->getTerminator(); | ||
46 | // This is slightly more strict than necessary; the minimum requirement | ||
47 | // is that there be no more than one indirectbr branching to BB. And | ||
48 | // all BlockAddress uses would need to be updated. | ||
49 | - assert(!isa<IndirectBrInst>(Preds[i]->getTerminator()) && | ||
50 | + assert(!isa<IndirectBrInst>(PI) && | ||
51 | "Cannot split an edge from an IndirectBrInst"); | ||
52 | - assert(!isa<CallBrInst>(Preds[i]->getTerminator()) && | ||
53 | - "Cannot split an edge from a CallBrInst"); | ||
54 | - Preds[i]->getTerminator()->replaceUsesOfWith(BB, NewBB); | ||
55 | + assert(!isa<CallBrInst>(PI) && "Cannot split an edge from a CallBrInst"); | ||
56 | + if (IsBBHeader && BBLoop->contains(Pred) && BBLoop->isLoopLatch(Pred)) { | ||
57 | + // Update loop metadata if it exists. | ||
58 | + if (MDNode *LoopMD = PI->getMetadata(LLVMContext::MD_loop)) { | ||
59 | + BI->setMetadata(LLVMContext::MD_loop, LoopMD); | ||
60 | + PI->setMetadata(LLVMContext::MD_loop, nullptr); | ||
61 | + } | ||
62 | + } | ||
63 | + PI->replaceUsesOfWith(BB, NewBB); | ||
64 | } | ||
65 | |||
66 | // Insert a new PHI node into NewBB for every PHI node in BB and that new PHI | ||
67 | diff --git a/test/Transforms/LoopSimplify/loop_metadata.ll b/test/Transforms/LoopSimplify/loop_metadata.ll | ||
68 | new file mode 100644 | ||
69 | index 00000000000..c15c92fe3ae | ||
70 | --- /dev/null | ||
71 | +++ b/test/Transforms/LoopSimplify/loop_metadata.ll | ||
72 | @@ -0,0 +1,36 @@ | ||
73 | +; RUN: opt -S -loop-simplify < %s | FileCheck %s | ||
74 | + | ||
75 | +; CHECK: for.cond.loopexit: | ||
76 | +; CHECK: br label %for.cond, !llvm.loop !0 | ||
77 | +; CHECK: br i1 %cmp1, label %for.body1, label %for.cond.loopexit | ||
78 | + | ||
79 | +define void @foo() { | ||
80 | +entry: | ||
81 | + br label %for.cond | ||
82 | + | ||
83 | +for.cond: ; preds = %for.cond1, %entry | ||
84 | + %j = phi i32 [ 0, %entry ], [ %add, %for.cond1 ] | ||
85 | + %cmp = icmp ult i32 %j, 8 | ||
86 | + br i1 %cmp, label %for.body, label %for.end | ||
87 | + | ||
88 | +for.body: ; preds = %for.cond | ||
89 | + %dummy1 = add i32 1, 1 | ||
90 | + %add = add nuw nsw i32 %j, 1 | ||
91 | + br label %for.cond1 | ||
92 | + | ||
93 | +for.cond1: ; preds = %for.body1, %for.body | ||
94 | + %i.0 = phi i32 [ 1, %for.body ], [ %inc, %for.body1 ] | ||
95 | + %cmp1 = icmp ult i32 %i.0, 8 | ||
96 | + br i1 %cmp1, label %for.body1, label %for.cond, !llvm.loop !0 | ||
97 | + | ||
98 | +for.body1: ; preds = %for.cond1 | ||
99 | + %dummy2 = add i32 1, 1 | ||
100 | + %inc = add nuw nsw i32 %i.0, 1 | ||
101 | + br label %for.cond1 | ||
102 | + | ||
103 | +for.end: ; preds = %for.cond | ||
104 | + ret void | ||
105 | +} | ||
106 | + | ||
107 | +!0 = distinct !{!0, !1} | ||
108 | +!1 = !{!"llvm.loop.unroll.full"} | ||
109 | -- | ||
110 | 2.18.0 | ||
111 | |||
diff --git a/dynamic-layers/clang-layer/recipes-devtools/clang/files/IndVarSimplify-Do-not-use-SCEV-expander-for-IVCount-.patch b/dynamic-layers/clang-layer/recipes-devtools/clang/files/IndVarSimplify-Do-not-use-SCEV-expander-for-IVCount-.patch deleted file mode 100644 index 48307deb..00000000 --- a/dynamic-layers/clang-layer/recipes-devtools/clang/files/IndVarSimplify-Do-not-use-SCEV-expander-for-IVCount-.patch +++ /dev/null | |||
@@ -1,146 +0,0 @@ | |||
1 | From 35e218a886f4c066eabd18685240d55270bd5a6d Mon Sep 17 00:00:00 2001 | ||
2 | From: Aleksander Us <aleksander.us@intel.com> | ||
3 | Date: Mon, 26 Aug 2019 15:45:47 +0300 | ||
4 | Subject: [PATCH] [IndVarSimplify] Do not use SCEV expander for IVCount in | ||
5 | LFTR when possible. | ||
6 | |||
7 | SCEV analysis cannot properly cache instruction with poison flags | ||
8 | (for example, add nsw outside of loop will not be reused by expander). | ||
9 | This can lead to generating of additional instructions by SCEV expander. | ||
10 | |||
11 | Example IR: | ||
12 | |||
13 | ... | ||
14 | %maxval = add nuw nsw i32 %a1, %a2 | ||
15 | ... | ||
16 | for.body: | ||
17 | ... | ||
18 | %cmp22 = icmp ult i32 %ivadd, %maxval | ||
19 | br i1 %cmp22, label %for.body, label %for.end | ||
20 | ... | ||
21 | |||
22 | SCEV expander will generate copy of %maxval in preheader but without | ||
23 | nuw/nsw flags. This can be avoided by explicit check that iv count | ||
24 | value gives the same SCEV expressions as calculated by LFTR. | ||
25 | |||
26 | Upstream-Status: Submitted [https://reviews.llvm.org/D66890] | ||
27 | |||
28 | https://github.com/intel/llvm-patches/commit/fd6a6c97341a56fd21bc32bc940afea751312e8f | ||
29 | |||
30 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
31 | --- | ||
32 | lib/Transforms/Scalar/IndVarSimplify.cpp | 12 +++++++++- | ||
33 | test/Transforms/IndVarSimplify/add_nsw.ll | 23 ++++++++++++++++++++ | ||
34 | test/Transforms/IndVarSimplify/lftr-reuse.ll | 9 +++----- | ||
35 | test/Transforms/IndVarSimplify/udiv.ll | 1 + | ||
36 | 4 files changed, 38 insertions(+), 7 deletions(-) | ||
37 | create mode 100644 test/Transforms/IndVarSimplify/add_nsw.ll | ||
38 | |||
39 | diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp | ||
40 | index f9fc698a4a9..5e04dac8aa6 100644 | ||
41 | --- a/lib/Transforms/Scalar/IndVarSimplify.cpp | ||
42 | +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp | ||
43 | @@ -2375,6 +2375,17 @@ static Value *genLoopLimit(PHINode *IndVar, BasicBlock *ExitingBB, | ||
44 | if (UsePostInc) | ||
45 | IVLimit = SE->getAddExpr(IVLimit, SE->getOne(IVLimit->getType())); | ||
46 | |||
47 | + // If computed limit is equal to old limit then do not use SCEV expander | ||
48 | + // because it can lost NUW/NSW flags and create extra instructions. | ||
49 | + BranchInst *BI = cast<BranchInst>(ExitingBB->getTerminator()); | ||
50 | + if (ICmpInst *Cmp = dyn_cast<ICmpInst>(BI->getOperand(0))) { | ||
51 | + Value *Limit = Cmp->getOperand(0); | ||
52 | + if (!L->isLoopInvariant(Limit)) | ||
53 | + Limit = Cmp->getOperand(1); | ||
54 | + if (SE->getSCEV(Limit) == IVLimit) | ||
55 | + return Limit; | ||
56 | + } | ||
57 | + | ||
58 | // Expand the code for the iteration count. | ||
59 | assert(SE->isLoopInvariant(IVLimit, L) && | ||
60 | "Computed iteration count is not loop invariant!"); | ||
61 | @@ -2383,7 +2394,6 @@ static Value *genLoopLimit(PHINode *IndVar, BasicBlock *ExitingBB, | ||
62 | // SCEV expression (IVInit) for a pointer type IV value (IndVar). | ||
63 | Type *LimitTy = ExitCount->getType()->isPointerTy() ? | ||
64 | IndVar->getType() : ExitCount->getType(); | ||
65 | - BranchInst *BI = cast<BranchInst>(ExitingBB->getTerminator()); | ||
66 | return Rewriter.expandCodeFor(IVLimit, LimitTy, BI); | ||
67 | } | ||
68 | } | ||
69 | diff --git a/test/Transforms/IndVarSimplify/add_nsw.ll b/test/Transforms/IndVarSimplify/add_nsw.ll | ||
70 | new file mode 100644 | ||
71 | index 00000000000..abd1cbb6c51 | ||
72 | --- /dev/null | ||
73 | +++ b/test/Transforms/IndVarSimplify/add_nsw.ll | ||
74 | @@ -0,0 +1,23 @@ | ||
75 | +; RUN: opt -indvars -S %s | FileCheck %s | ||
76 | + | ||
77 | +target datalayout = "e-p:32:32-i64:64-n8:16:32" | ||
78 | + | ||
79 | +; CHECK: for.body.preheader: | ||
80 | +; CHECK-NOT: add | ||
81 | +; CHECK: for.body: | ||
82 | + | ||
83 | +define void @foo(i32 %a1, i32 %a2) { | ||
84 | +entry: | ||
85 | + %maxval = add nuw nsw i32 %a1, %a2 | ||
86 | + %cmp = icmp slt i32 %maxval, 1 | ||
87 | + br i1 %cmp, label %for.end, label %for.body | ||
88 | + | ||
89 | +for.body: ; preds = %entry, %for.body | ||
90 | + %j.02 = phi i32 [ 0, %entry ], [ %add31, %for.body ] | ||
91 | + %add31 = add nuw nsw i32 %j.02, 1 | ||
92 | + %cmp22 = icmp slt i32 %add31, %maxval | ||
93 | + br i1 %cmp22, label %for.body, label %for.end | ||
94 | + | ||
95 | +for.end: ; preds = %for.body | ||
96 | + ret void | ||
97 | +} | ||
98 | diff --git a/test/Transforms/IndVarSimplify/lftr-reuse.ll b/test/Transforms/IndVarSimplify/lftr-reuse.ll | ||
99 | index 14ae9738696..509d662b767 100644 | ||
100 | --- a/test/Transforms/IndVarSimplify/lftr-reuse.ll | ||
101 | +++ b/test/Transforms/IndVarSimplify/lftr-reuse.ll | ||
102 | @@ -67,11 +67,9 @@ define void @expandOuterRecurrence(i32 %arg) nounwind { | ||
103 | ; CHECK-NEXT: [[CMP1:%.*]] = icmp slt i32 0, [[SUB1]] | ||
104 | ; CHECK-NEXT: br i1 [[CMP1]], label [[OUTER_PREHEADER:%.*]], label [[EXIT:%.*]] | ||
105 | ; CHECK: outer.preheader: | ||
106 | -; CHECK-NEXT: [[TMP0:%.*]] = add i32 [[ARG]], -1 | ||
107 | ; CHECK-NEXT: br label [[OUTER:%.*]] | ||
108 | ; CHECK: outer: | ||
109 | -; CHECK-NEXT: [[INDVARS_IV:%.*]] = phi i32 [ [[TMP0]], [[OUTER_PREHEADER]] ], [ [[INDVARS_IV_NEXT:%.*]], [[OUTER_INC:%.*]] ] | ||
110 | -; CHECK-NEXT: [[I:%.*]] = phi i32 [ [[I_INC:%.*]], [[OUTER_INC]] ], [ 0, [[OUTER_PREHEADER]] ] | ||
111 | +; CHECK-NEXT: [[I:%.*]] = phi i32 [ [[I_INC:%.*]], [[OUTER_INC:%.*]] ], [ 0, [[OUTER_PREHEADER]] ] | ||
112 | ; CHECK-NEXT: [[SUB2:%.*]] = sub nsw i32 [[ARG]], [[I]] | ||
113 | ; CHECK-NEXT: [[SUB3:%.*]] = sub nsw i32 [[SUB2]], 1 | ||
114 | ; CHECK-NEXT: [[CMP2:%.*]] = icmp slt i32 0, [[SUB3]] | ||
115 | @@ -81,14 +79,13 @@ define void @expandOuterRecurrence(i32 %arg) nounwind { | ||
116 | ; CHECK: inner: | ||
117 | ; CHECK-NEXT: [[J:%.*]] = phi i32 [ 0, [[INNER_PH]] ], [ [[J_INC:%.*]], [[INNER]] ] | ||
118 | ; CHECK-NEXT: [[J_INC]] = add nuw nsw i32 [[J]], 1 | ||
119 | -; CHECK-NEXT: [[EXITCOND:%.*]] = icmp ne i32 [[J_INC]], [[INDVARS_IV]] | ||
120 | +; CHECK-NEXT: [[EXITCOND:%.*]] = icmp ne i32 [[J_INC]], [[SUB3]] | ||
121 | ; CHECK-NEXT: br i1 [[EXITCOND]], label [[INNER]], label [[OUTER_INC_LOOPEXIT:%.*]] | ||
122 | ; CHECK: outer.inc.loopexit: | ||
123 | ; CHECK-NEXT: br label [[OUTER_INC]] | ||
124 | ; CHECK: outer.inc: | ||
125 | ; CHECK-NEXT: [[I_INC]] = add nuw nsw i32 [[I]], 1 | ||
126 | -; CHECK-NEXT: [[INDVARS_IV_NEXT]] = add i32 [[INDVARS_IV]], -1 | ||
127 | -; CHECK-NEXT: [[EXITCOND1:%.*]] = icmp ne i32 [[I_INC]], [[TMP0]] | ||
128 | +; CHECK-NEXT: [[EXITCOND1:%.*]] = icmp ne i32 [[I_INC]], [[SUB1]] | ||
129 | ; CHECK-NEXT: br i1 [[EXITCOND1]], label [[OUTER]], label [[EXIT_LOOPEXIT:%.*]] | ||
130 | ; CHECK: exit.loopexit: | ||
131 | ; CHECK-NEXT: br label [[EXIT]] | ||
132 | diff --git a/test/Transforms/IndVarSimplify/udiv.ll b/test/Transforms/IndVarSimplify/udiv.ll | ||
133 | index b3f2c2a6a66..3530343ef4a 100644 | ||
134 | --- a/test/Transforms/IndVarSimplify/udiv.ll | ||
135 | +++ b/test/Transforms/IndVarSimplify/udiv.ll | ||
136 | @@ -133,6 +133,7 @@ declare i32 @printf(i8* nocapture, ...) nounwind | ||
137 | ; CHECK-LABEL: @foo( | ||
138 | ; CHECK: for.body.preheader: | ||
139 | ; CHECK-NOT: udiv | ||
140 | +; CHECK: for.body: | ||
141 | |||
142 | define void @foo(double* %p, i64 %n) nounwind { | ||
143 | entry: | ||
144 | -- | ||
145 | 2.18.0 | ||
146 | |||
diff --git a/dynamic-layers/clang-layer/recipes-devtools/clang/llvm-project-source.bbappend b/dynamic-layers/clang-layer/recipes-devtools/clang/llvm-project-source.bbappend deleted file mode 100644 index 8a2cc37f..00000000 --- a/dynamic-layers/clang-layer/recipes-devtools/clang/llvm-project-source.bbappend +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/files:" | ||
2 | |||
3 | SRC_URI_append_intel-x86-common = " \ | ||
4 | file://0001-dont-export-targets-for-binaries.patch \ | ||
5 | file://BasicBlockUtils-Add-metadata-fixing-in-SplitBlockPre.patch;patchdir=llvm \ | ||
6 | file://IndVarSimplify-Do-not-use-SCEV-expander-for-IVCount-.patch;patchdir=llvm \ | ||
7 | git://github.com/KhronosGroup/SPIRV-LLVM-Translator.git;protocol=https;branch=llvm_release_90;destsuffix=git/llvm/projects/llvm-spirv;name=spirv \ | ||
8 | file://0001-skip-building-tests.patch;patchdir=llvm/projects/llvm-spirv \ | ||
9 | " | ||
10 | |||
11 | SRCREV_spirv = "70420631144a6a25613ae37178f2cc1d3607b65b" | ||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/0002-Build-not-able-to-locate-cpp_generation_tool.patch b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/0002-Build-not-able-to-locate-cpp_generation_tool.patch new file mode 100644 index 00000000..45288ce1 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/0002-Build-not-able-to-locate-cpp_generation_tool.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 8c330d0cb5167612296801f0202b0de35e9ca88d Mon Sep 17 00:00:00 2001 | ||
2 | From: Dongwon Kim <dongwon.kim@intel.com> | ||
3 | Date: Sat, 21 Aug 2021 16:09:39 -0700 | ||
4 | Subject: [PATCH 2/5] Build not able to locate cpp_generation_tool. | ||
5 | |||
6 | Upstream-Status: Inappropriate [oe specific] | ||
7 | |||
8 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
9 | Signed-off-by: Dongwon Kim <dongwon.kim@intel.com> | ||
10 | --- | ||
11 | shared/source/built_ins/kernels/CMakeLists.txt | 10 +++++----- | ||
12 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
13 | |||
14 | Index: git/shared/source/built_ins/kernels/CMakeLists.txt | ||
15 | =================================================================== | ||
16 | --- git.orig/shared/source/built_ins/kernels/CMakeLists.txt | ||
17 | +++ git/shared/source/built_ins/kernels/CMakeLists.txt | ||
18 | @@ -122,9 +122,9 @@ function(compile_builtin core_type platf | ||
19 | endif() | ||
20 | add_custom_command( | ||
21 | OUTPUT ${OUTPUT_FILE_CPP} | ||
22 | - COMMAND $<TARGET_FILE:cpp_generate_tool> --file ${BINARY_OUTPUT}.bin --output ${OUTPUT_FILE_CPP} --array ${mode}_${BASENAME} --device ${RELEASE_FILENAME} | ||
23 | + COMMAND cpp_generate_tool --file ${BINARY_OUTPUT}.bin --output ${OUTPUT_FILE_CPP} --array ${mode}_${BASENAME} --device ${RELEASE_FILENAME} | ||
24 | WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
25 | - DEPENDS ${OUTPUT_FILES_BINARIES} $<TARGET_FILE:cpp_generate_tool> | ||
26 | + DEPENDS ${OUTPUT_FILES_BINARIES} cpp_generate_tool | ||
27 | ) | ||
28 | list(APPEND BUILTINS_COMMANDS "${OUTPUT_FILE_CPP}") | ||
29 | else() | ||
30 | @@ -176,9 +176,9 @@ function(generate_cpp_spirv builtin) | ||
31 | endif() | ||
32 | add_custom_command( | ||
33 | OUTPUT ${OUTPUT_FILE_CPP} | ||
34 | - COMMAND $<TARGET_FILE:cpp_generate_tool> --file ${GENERATED_SPV_INPUT} --output ${OUTPUT_FILE_CPP} --array ${BASENAME} | ||
35 | + COMMAND cpp_generate_tool --file ${GENERATED_SPV_INPUT} --output ${OUTPUT_FILE_CPP} --array ${BASENAME} | ||
36 | WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
37 | - DEPENDS ${GENERATED_SPV_INPUT} $<TARGET_FILE:cpp_generate_tool> | ||
38 | + DEPENDS ${GENERATED_SPV_INPUT} cpp_generate_tool | ||
39 | ) | ||
40 | set(OUTPUT_LIST_CPP_FILES ${OUTPUT_LIST_CPP_FILES} ${OUTPUT_FILE_CPP} PARENT_SCOPE) | ||
41 | else() | ||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/0003-external-ocloc.patch b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/0003-external-ocloc.patch new file mode 100644 index 00000000..2001d839 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/0003-external-ocloc.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From 0006db5f55a9f08bd3452558a53704cd3bbb790f Mon Sep 17 00:00:00 2001 | ||
2 | From: Dongwon Kim <dongwon.kim@intel.com> | ||
3 | Date: Wed, 2 Mar 2022 15:52:45 -0800 | ||
4 | Subject: [PATCH 3/5] external ocloc | ||
5 | |||
6 | Upstream-Status: Inappropriate | ||
7 | |||
8 | Signed-off-by: Dongwon Kim <dongwon.kim@intel.com> | ||
9 | --- | ||
10 | cmake/ocloc_cmd_prefix.cmake | 14 ++++++++------ | ||
11 | 1 file changed, 8 insertions(+), 6 deletions(-) | ||
12 | |||
13 | Index: git/cmake/ocloc_cmd_prefix.cmake | ||
14 | =================================================================== | ||
15 | --- git.orig/cmake/ocloc_cmd_prefix.cmake | ||
16 | +++ git/cmake/ocloc_cmd_prefix.cmake | ||
17 | @@ -4,13 +4,15 @@ | ||
18 | # SPDX-License-Identifier: MIT | ||
19 | # | ||
20 | |||
21 | -if(WIN32) | ||
22 | - set(ocloc_cmd_prefix ocloc) | ||
23 | -else() | ||
24 | - if(DEFINED NEO__IGC_LIBRARY_PATH) | ||
25 | - set(ocloc_cmd_prefix ${CMAKE_COMMAND} -E env "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${NEO__IGC_LIBRARY_PATH}:$<TARGET_FILE_DIR:ocloc_lib>" $<TARGET_FILE:ocloc>) | ||
26 | +if(NOT DEFINED ocloc_cmd_prefix) | ||
27 | + if(WIN32) | ||
28 | + set(ocloc_cmd_prefix ocloc) | ||
29 | else() | ||
30 | - set(ocloc_cmd_prefix ${CMAKE_COMMAND} -E env "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$<TARGET_FILE_DIR:ocloc_lib>" $<TARGET_FILE:ocloc>) | ||
31 | + if(DEFINED NEO__IGC_LIBRARY_PATH) | ||
32 | + set(ocloc_cmd_prefix LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${NEO__IGC_LIBRARY_PATH}:$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>) | ||
33 | + else() | ||
34 | + set(ocloc_cmd_prefix LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>) | ||
35 | + endif() | ||
36 | endif() | ||
37 | endif() | ||
38 | |||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/dont-use-ld-library-path.patch b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/dont-use-ld-library-path.patch deleted file mode 100644 index b886b95d..00000000 --- a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/dont-use-ld-library-path.patch +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | From 2475dfc1350f73a243c9fc223a9f06af85321d56 Mon Sep 17 00:00:00 2001 | ||
2 | From: Anuj Mittal <anuj.mittal@intel.com> | ||
3 | Date: Tue, 2 Jul 2019 08:36:34 +0800 | ||
4 | Subject: [PATCH] don't use LD_LIBRARY_PATH for native offline compiler | ||
5 | |||
6 | Let us supply the correct path for it to be able to find the correct | ||
7 | libraries. | ||
8 | |||
9 | Upstream-Status: Inappropriate | ||
10 | |||
11 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
12 | |||
13 | --- | ||
14 | runtime/built_ins/kernels/CMakeLists.txt | 2 +- | ||
15 | runtime/scheduler/scheduler_binary.cmake | 2 +- | ||
16 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
17 | |||
18 | diff --git a/runtime/built_ins/kernels/CMakeLists.txt b/runtime/built_ins/kernels/CMakeLists.txt | ||
19 | index 5dc9fe1b..e258847d 100644 | ||
20 | --- a/runtime/built_ins/kernels/CMakeLists.txt | ||
21 | +++ b/runtime/built_ins/kernels/CMakeLists.txt | ||
22 | @@ -51,7 +51,7 @@ function(compile_builtin gen_type platform_type builtin) | ||
23 | if(DEFINED IGDRCL__IGC_LIBRARY_PATH) | ||
24 | set(cloc_cmd_prefix LD_LIBRARY_PATH=${IGDRCL__IGC_LIBRARY_PATH} $<TARGET_FILE:ocloc>) | ||
25 | else() | ||
26 | - set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:ocloc> $<TARGET_FILE:ocloc>) | ||
27 | + set(cloc_cmd_prefix ocloc) | ||
28 | endif() | ||
29 | endif() | ||
30 | list(APPEND __cloc__options__ "-cl-kernel-arg-info") | ||
31 | diff --git a/runtime/scheduler/scheduler_binary.cmake b/runtime/scheduler/scheduler_binary.cmake | ||
32 | index 1b12592b..ed9f375d 100644 | ||
33 | --- a/runtime/scheduler/scheduler_binary.cmake | ||
34 | +++ b/runtime/scheduler/scheduler_binary.cmake | ||
35 | @@ -37,7 +37,7 @@ function(compile_kernel target gen_type platform_type kernel) | ||
36 | if(DEFINED IGDRCL__IGC_LIBRARY_PATH) | ||
37 | set(cloc_cmd_prefix LD_LIBRARY_PATH=${IGDRCL__IGC_LIBRARY_PATH} $<TARGET_FILE:ocloc>) | ||
38 | else() | ||
39 | - set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:ocloc> $<TARGET_FILE:ocloc>) | ||
40 | + set(cloc_cmd_prefix ocloc) | ||
41 | endif() | ||
42 | endif() | ||
43 | list(APPEND __cloc__options__ "-cl-kernel-arg-info") | ||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_19.35.13977.bb b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_19.35.13977.bb deleted file mode 100644 index 8c023480..00000000 --- a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_19.35.13977.bb +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | SUMMARY = "The Intel(R) Graphics Compute Runtime for OpenCL(TM)" | ||
2 | DESCRIPTION = "The Intel(R) Graphics Compute Runtime for OpenCL(TM) \ | ||
3 | is an open source project to converge Intel's development efforts \ | ||
4 | on OpenCL(TM) compute stacks supporting the GEN graphics hardware \ | ||
5 | architecture." | ||
6 | |||
7 | LICENSE = "MIT" | ||
8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=ae27f47fd6755510247c19e547e4c804 \ | ||
9 | file://third_party/opencl_headers/LICENSE;md5=dcefc90f4c3c689ec0c2489064e7273b" | ||
10 | |||
11 | SRC_URI = "git://github.com/intel/compute-runtime.git;protocol=https \ | ||
12 | " | ||
13 | |||
14 | SRC_URI_append_class-target = " \ | ||
15 | file://dont-use-ld-library-path.patch \ | ||
16 | " | ||
17 | |||
18 | SRCREV = "cb4e5576cb5414ab3af54c49819a4ced305b965b" | ||
19 | |||
20 | S = "${WORKDIR}/git" | ||
21 | |||
22 | DEPENDS += " intel-graphics-compiler gmmlib clang" | ||
23 | DEPENDS_append_class-target = " intel-compute-runtime-native" | ||
24 | |||
25 | RDEPENDS_${PN} += " intel-graphics-compiler gmmlib" | ||
26 | |||
27 | inherit cmake pkgconfig | ||
28 | |||
29 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
30 | COMPATIBLE_HOST_libc-musl = "null" | ||
31 | |||
32 | EXTRA_OECMAKE = " \ | ||
33 | -DBUILD_TYPE=Release \ | ||
34 | -DSKIP_UNIT_TESTS=1 \ | ||
35 | -DCCACHE_ALLOWED=FALSE \ | ||
36 | " | ||
37 | |||
38 | LDFLAGS_append_class-native = " -fuse-ld=lld" | ||
39 | TOOLCHAIN_class-native = "clang" | ||
40 | |||
41 | FILES_${PN} += "${libdir}/intel-opencl/libigdrcl.so" | ||
42 | |||
43 | BBCLASSEXTEND = "native nativesdk" | ||
44 | |||
45 | EXCLUDE_FROM_WORLD = "1" | ||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_25.13.33276.16.bb b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_25.13.33276.16.bb new file mode 100644 index 00000000..635e8c2f --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_25.13.33276.16.bb | |||
@@ -0,0 +1,63 @@ | |||
1 | SUMMARY = "The Intel(R) Graphics Compute Runtime for OpenCL(TM)" | ||
2 | DESCRIPTION = "The Intel(R) Graphics Compute Runtime for OpenCL(TM) \ | ||
3 | is an open source project to converge Intel's development efforts \ | ||
4 | on OpenCL(TM) compute stacks supporting the GEN graphics hardware \ | ||
5 | architecture." | ||
6 | |||
7 | LICENSE = "MIT & Apache-2.0" | ||
8 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eca6ec6997e18db166db7109cdbe611c \ | ||
9 | file://third_party/opencl_headers/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" | ||
10 | |||
11 | SRC_URI = "git://github.com/intel/compute-runtime.git;protocol=https;branch=releases/25.13 \ | ||
12 | file://0002-Build-not-able-to-locate-cpp_generation_tool.patch \ | ||
13 | file://0003-external-ocloc.patch \ | ||
14 | " | ||
15 | |||
16 | SRCREV = "a9961bdfaa07250fd52ff930bf8f31fb4e3b7799" | ||
17 | |||
18 | S = "${WORKDIR}/git" | ||
19 | |||
20 | DEPENDS += " intel-graphics-compiler gmmlib libva qemu-native" | ||
21 | |||
22 | RDEPENDS:${PN} += " intel-graphics-compiler gmmlib" | ||
23 | |||
24 | inherit cmake pkgconfig qemu | ||
25 | |||
26 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
27 | COMPATIBLE_HOST:libc-musl = "null" | ||
28 | |||
29 | EXTRA_OECMAKE = " \ | ||
30 | -DIGC_DIR=${STAGING_INCDIR}/igc \ | ||
31 | -DBUILD_TYPE=Release \ | ||
32 | -DSKIP_UNIT_TESTS=1 \ | ||
33 | -DCCACHE_ALLOWED=FALSE \ | ||
34 | -DNEO_DISABLE_LD_LLD=ON \ | ||
35 | -DNEO_DISABLE_LD_GOLD=ON \ | ||
36 | " | ||
37 | |||
38 | EXTRA_OECMAKE:append:class-target = " \ | ||
39 | -Docloc_cmd_prefix=ocloc \ | ||
40 | -DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper \ | ||
41 | " | ||
42 | |||
43 | PACKAGECONFIG ??= "" | ||
44 | PACKAGECONFIG[levelzero] = "-DBUILD_WITH_L0=ON, -DBUILD_WITH_L0=OFF, level-zero" | ||
45 | |||
46 | do_configure:prepend:class-target () { | ||
47 | # Write out a qemu wrapper that will be used by cmake. | ||
48 | qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${B}/bin'),d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}" | ||
49 | cat > ${WORKDIR}/qemuwrapper << EOF | ||
50 | #!/bin/sh | ||
51 | $qemu_binary "\$@" | ||
52 | EOF | ||
53 | chmod +x ${WORKDIR}/qemuwrapper | ||
54 | } | ||
55 | |||
56 | FILES:${PN} += " \ | ||
57 | ${libdir}/intel-opencl/libigdrcl.so \ | ||
58 | ${libdir}/libocloc.so \ | ||
59 | " | ||
60 | |||
61 | FILES:${PN}-dev = "${includedir}" | ||
62 | |||
63 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)" | ||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-BiF-CMakeLists.txt-remove-opt-from-DEPENDS.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-BiF-CMakeLists.txt-remove-opt-from-DEPENDS.patch new file mode 100644 index 00000000..456a8c65 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-BiF-CMakeLists.txt-remove-opt-from-DEPENDS.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 1b98a931c3bf8daccc48cd618335ff35e3d382da Mon Sep 17 00:00:00 2001 | ||
2 | From: Anuj Mittal <anuj.mittal@intel.com> | ||
3 | Date: Tue, 12 Oct 2021 23:46:42 +0800 | ||
4 | Subject: [PATCH] BiF/CMakeLists.txt: remove opt from DEPENDS | ||
5 | |||
6 | Otherwise it starts failing with: | ||
7 | |||
8 | | ninja: error: 'IGC/VectorCompiler/lib/BiF/opt', needed by 'IGC/VectorCompiler/lib/BiF/VCBiFPrintfOCL32.opt.bc', missing and no known rule to make it | ||
9 | |||
10 | We don't need to explicitly make sure opt is built when | ||
11 | using prebuilt binaries. | ||
12 | |||
13 | Upstream-Status: Inappropriate | ||
14 | |||
15 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
16 | --- | ||
17 | IGC/VectorCompiler/lib/BiF/cmake/Functions.cmake | 2 +- | ||
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
19 | |||
20 | Index: git/IGC/VectorCompiler/lib/BiF/cmake/Functions.cmake | ||
21 | =================================================================== | ||
22 | --- git.orig/IGC/VectorCompiler/lib/BiF/cmake/Functions.cmake | ||
23 | +++ git/IGC/VectorCompiler/lib/BiF/cmake/Functions.cmake | ||
24 | @@ -121,7 +121,7 @@ function(vc_build_bif RES_FILE CMCL_SRC_ | ||
25 | COMMENT "vc_build_bif: Translating CMCL builtins: ${BIF_CLANG_BC_NAME_FINAL} -> ${BIF_OPT_BC_NAME}" | ||
26 | COMMAND CMCLTranslatorTool ${OPT_OPAQUE_ARG} -o ${BIF_CMCL_BC_PATH} ${BIF_CLANG_BC_PATH_FINAL} | ||
27 | COMMAND ${LLVM_OPT_EXE} ${OPT_OPAQUE_ARG} --O2 -o ${BIF_OPT_BC_PATH} ${BIF_CMCL_BC_PATH} | ||
28 | - DEPENDS CMCLTranslatorTool ${LLVM_OPT_EXE} ${OPT_BC_DEPENDS}) | ||
29 | + DEPENDS CMCLTranslatorTool ${BIF_CLANG_BC_PATH_FINAL}) | ||
30 | |||
31 | add_custom_target(${TARGET_NAME} | ||
32 | DEPENDS ${BIF_OPT_BC_PATH} | ||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-Build-not-able-to-locate-BiFManager-bin.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-Build-not-able-to-locate-BiFManager-bin.patch new file mode 100644 index 00000000..87b094aa --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-Build-not-able-to-locate-BiFManager-bin.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From 048512728eea53b3772a3f80ac9743bfc462487e Mon Sep 17 00:00:00 2001 | ||
2 | From: Yogesh Tyagi <yogesh.tyagi@intel.com> | ||
3 | Date: Thu, 2 Jan 2025 15:59:27 +0530 | ||
4 | Subject: [PATCH] Build not able to locate BiFManager-bin | ||
5 | |||
6 | Upstream-Status: Inappropriate [oe specific] | ||
7 | |||
8 | Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com> | ||
9 | --- | ||
10 | IGC/BiFModule/CMakeLists.txt | 4 ++-- | ||
11 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
12 | |||
13 | Index: git/IGC/BiFModule/CMakeLists.txt | ||
14 | =================================================================== | ||
15 | --- git.orig/IGC/BiFModule/CMakeLists.txt | ||
16 | +++ git/IGC/BiFModule/CMakeLists.txt | ||
17 | @@ -655,8 +655,8 @@ set(IGC_BUILD__PROJ__BiFModuleCache_OCL | ||
18 | |||
19 | add_custom_command( | ||
20 | OUTPUT "${IGC_BUILD__BIF_DIR}/OCLBiFImpl.h" "${IGC_BUILD__BIF_DIR}/OCLBiFImpl.bifbc" | ||
21 | - COMMAND $<TARGET_FILE:BiFManager-bin> "${IGC_BUILD__BIF_DIR}/OCLBiFImpl.bc" "${IGC_BUILD__BIF_DIR}/IGCsize_t_32.bc" "${IGC_BUILD__BIF_DIR}/IGCsize_t_64.bc" "${IGC_BUILD__BIF_DIR}/OCLBiFImpl.bifbc" "${IGC_BUILD__BIF_DIR}/OCLBiFImpl.h" | ||
22 | - DEPENDS "${IGC_BUILD__BIF_DIR}/OCLBiFImpl.bc" "${IGC_BUILD__BIF_DIR}/IGCsize_t_32.bc" "${IGC_BUILD__BIF_DIR}/IGCsize_t_64.bc"$<TARGET_FILE:BiFManager-bin> | ||
23 | + COMMAND BiFManager-bin "${IGC_BUILD__BIF_DIR}/OCLBiFImpl.bc" "${IGC_BUILD__BIF_DIR}/IGCsize_t_32.bc" "${IGC_BUILD__BIF_DIR}/IGCsize_t_64.bc" "${IGC_BUILD__BIF_DIR}/OCLBiFImpl.bifbc" "${IGC_BUILD__BIF_DIR}/OCLBiFImpl.h" | ||
24 | + DEPENDS "${IGC_BUILD__BIF_DIR}/OCLBiFImpl.bc" "${IGC_BUILD__BIF_DIR}/IGCsize_t_32.bc" "${IGC_BUILD__BIF_DIR}/IGCsize_t_64.bc" BiFManager-bin | ||
25 | COMMENT "BiF: ${IGC_BUILD__BIF_DIR}/OCLBiFImpl.bc: Spliting output .bc." | ||
26 | COMMAND_EXPAND_LISTS | ||
27 | ) | ||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-external-SPIRV-Tools-change-path-to-tools-and-header.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-external-SPIRV-Tools-change-path-to-tools-and-header.patch new file mode 100644 index 00000000..fc66b71d --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-external-SPIRV-Tools-change-path-to-tools-and-header.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From 251e2854dd206ebf66e5908d3277e4585fe2a63b Mon Sep 17 00:00:00 2001 | ||
2 | From: Anuj Mittal <anuj.mittal@intel.com> | ||
3 | Date: Mon, 9 Jan 2023 11:43:05 +0800 | ||
4 | Subject: [PATCH] external/SPIRV-Tools: change path to tools and headers | ||
5 | |||
6 | We clone the SPIRV headers and tools in a different directory to ensure | ||
7 | file path substitutions take place. | ||
8 | |||
9 | Upstream-Status: Inappropriate | ||
10 | |||
11 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
12 | --- | ||
13 | external/SPIRV-Tools/CMakeLists.txt | 4 ++-- | ||
14 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
15 | |||
16 | Index: git/external/SPIRV-Tools/CMakeLists.txt | ||
17 | =================================================================== | ||
18 | --- git.orig/external/SPIRV-Tools/CMakeLists.txt | ||
19 | +++ git/external/SPIRV-Tools/CMakeLists.txt | ||
20 | @@ -45,8 +45,8 @@ else() #By default use build from source | ||
21 | message(STATUS "[SPIRV-Tools] : Building from source") | ||
22 | message(STATUS "[SPIRV-Tools] : Current source dir: ${CMAKE_CURRENT_SOURCE_DIR}") | ||
23 | |||
24 | - set(SPIRV-Headers_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../SPIRV-Headers") # used in subdirectory | ||
25 | - set(SPIRV-Tools_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../SPIRV-Tools") | ||
26 | + set(SPIRV-Headers_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../SPIRV-Headers") # used in subdirectory | ||
27 | + set(SPIRV-Tools_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../SPIRV-Tools") | ||
28 | |||
29 | set(SPIRV-Tools_OUTPUT_DIR "${IGC_OPTION__OUTPUT_DIR}/external/SPIRV-Tools/build") | ||
30 | set(IGC_BUILD__SPIRV-Headers_DIR "${SPIRV-Headers_SOURCE_DIR}") | ||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-fix-tblgen.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-fix-tblgen.patch new file mode 100644 index 00000000..3d9ae02f --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-fix-tblgen.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | From 1641dc87b2ed6b6b87b2cef824e4d66da65b0b30 Mon Sep 17 00:00:00 2001 | ||
2 | From: Anuj Mittal <anuj.mittal@intel.com> | ||
3 | Date: Thu, 19 May 2022 22:50:09 +0800 | ||
4 | Subject: [PATCH] fix tblgen | ||
5 | |||
6 | Upstream-Status: Inappropriate [OE specific] | ||
7 | --- | ||
8 | IGC/cmake/igc_llvm.cmake | 2 +- | ||
9 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
10 | |||
11 | diff --git a/IGC/cmake/igc_llvm.cmake b/IGC/cmake/igc_llvm.cmake | ||
12 | index b708cc904..fe4668890 100644 | ||
13 | --- a/IGC/cmake/igc_llvm.cmake | ||
14 | +++ b/IGC/cmake/igc_llvm.cmake | ||
15 | @@ -53,7 +53,7 @@ else() | ||
16 | set(LLVM_OPT_EXE "opt" CACHE STRING "") | ||
17 | |||
18 | set(LLVM_TABLEGEN_EXE "llvm-tblgen") | ||
19 | - if(CMAKE_CROSSCOMPILING) | ||
20 | + if(TRUE) | ||
21 | if(DEFINED LLVM_TABLEGEN) | ||
22 | set(LLVM_TABLEGEN_EXE ${LLVM_TABLEGEN}) | ||
23 | else() | ||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-skip-execution-of-ElfPackager.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-skip-execution-of-ElfPackager.patch deleted file mode 100644 index 3f3e1d49..00000000 --- a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-skip-execution-of-ElfPackager.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | From 4e903a6914d5124d616cf085e30e8cbaa20afb77 Mon Sep 17 00:00:00 2001 | ||
2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
3 | Date: Wed, 12 Jun 2019 14:10:23 +0800 | ||
4 | Subject: [PATCH 1/4] skip execution of ElfPackager | ||
5 | |||
6 | ElfPackager adds the ability to convert llvm bitcode into elf files for | ||
7 | easier partitioning. Skip for now until we start building a native | ||
8 | version for this. | ||
9 | |||
10 | Upstream-Status: Inappropriate [configuration specific] | ||
11 | |||
12 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
13 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
14 | --- | ||
15 | IGC/ElfPackager/CMakeLists.txt | 8 ++++---- | ||
16 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
17 | |||
18 | diff --git a/IGC/ElfPackager/CMakeLists.txt b/IGC/ElfPackager/CMakeLists.txt | ||
19 | index d9487aeb..bc728ada 100644 | ||
20 | --- a/IGC/ElfPackager/CMakeLists.txt | ||
21 | +++ b/IGC/ElfPackager/CMakeLists.txt | ||
22 | @@ -71,10 +71,10 @@ include_directories ( | ||
23 | ${IGC_SOURCE_DIR}/AdaptorOCL/CLElfLib/ | ||
24 | ) | ||
25 | |||
26 | -add_custom_command(TARGET ${IGC_BUILD__PROJ__ElfPackager} | ||
27 | - POST_BUILD | ||
28 | - COMMAND $<TARGET_FILE:${IGC_BUILD__PROJ__ElfPackager}> -includeSizet -funcList ${CMAKE_CURRENT_SOURCE_DIR}/function_bin.txt ${IGC_BUILD__BIF_DIR}/OCLBiFImpl.bc ${IGC_BUILD__BIF_DIR}/igdclbif.bin | ||
29 | - ) | ||
30 | +#add_custom_command(TARGET ${IGC_BUILD__PROJ__ElfPackager} | ||
31 | +# POST_BUILD | ||
32 | +# COMMAND $<TARGET_FILE:${IGC_BUILD__PROJ__ElfPackager}> -includeSizet -funcList ${CMAKE_CURRENT_SOURCE_DIR}/function_bin.txt ${IGC_BUILD__BIF_DIR}/OCLBiFImpl.bc ${IGC_BUILD__BIF_DIR}/igdclbif.bin | ||
33 | +# ) | ||
34 | |||
35 | |||
36 | add_dependencies("${IGC_BUILD__PROJ__ElfPackager}" "${IGC_BUILD__PROJ__BiFModule_OCL}") | ||
37 | -- | ||
38 | 2.17.1 | ||
39 | |||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0002-comment-out-dump-functions.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0002-comment-out-dump-functions.patch deleted file mode 100644 index 517dc36f..00000000 --- a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0002-comment-out-dump-functions.patch +++ /dev/null | |||
@@ -1,87 +0,0 @@ | |||
1 | From 15a23e549636626cf32b062a5308a29cc53ce360 Mon Sep 17 00:00:00 2001 | ||
2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
3 | Date: Wed, 21 Aug 2019 17:29:00 +0800 | ||
4 | Subject: [PATCH 2/4] comment out dump functions | ||
5 | |||
6 | Otherwise it leads to errors when linking with lld: | ||
7 | |||
8 | | ld.lld: error: undefined symbol: llvm::Value::dump() const | ||
9 | | >>> referenced by PreRAScheduler.cpp:252 (build/tmp/work/x86_64-linux/intel-graphics-compiler-native/1.0.10-r0/git/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp:252) | ||
10 | | >>> PreRAScheduler.cpp.o:(IGC::PreRAScheduler::dumpDDGContents()) in archive IGC/Release/libCompiler.a | ||
11 | | | ||
12 | | ld.lld: error: undefined symbol: llvm::Value::dump() const | ||
13 | | >>> referenced by PreRAScheduler.cpp:855 (build/tmp/work/x86_64-linux/intel-graphics-compiler-native/1.0.10-r0/git/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp:855) | ||
14 | | >>> PreRAScheduler.cpp.o:(IGC::PreRAScheduler::dumpPriorityQueueContents()) in archive IGC/Release/libCompiler.a | ||
15 | | | ||
16 | | ld.lld: error: undefined symbol: llvm::Value::dump() const | ||
17 | | >>> referenced by PreRAScheduler.cpp:876 (build/tmp/work/x86_64-linux/intel-graphics-compiler-native/1.0.10-r0/git/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp:876) | ||
18 | | >>> PreRAScheduler.cpp.o:(IGC::PreRAScheduler::dumpPriorityQueueContents()) in archive IGC/Release/libCompiler.a | ||
19 | | | ||
20 | | ld.lld: error: undefined symbol: llvm::Value::dump() const | ||
21 | | >>> referenced by PreRAScheduler.cpp:888 (build/tmp/work/x86_64-linux/intel-graphics-compiler-native/1.0.10-r0/git/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp:888) | ||
22 | | >>> PreRAScheduler.cpp.o:(IGC::PreRAScheduler::dumpPriorityQueueContents()) in archive IGC/Release/libCompiler.a | ||
23 | | | ||
24 | | ld.lld: error: undefined symbol: llvm::Value::dump() const | ||
25 | | >>> referenced by PreRAScheduler.cpp:902 (build/tmp/work/x86_64-linux/intel-graphics-compiler-native/1.0.10-r0/git/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp:902) | ||
26 | | >>> PreRAScheduler.cpp.o:(IGC::PreRAScheduler::dumpPriorityQueueContents()) in archive IGC/Release/libCompiler.a | ||
27 | | clang-8: error: linker command failed with exit code 1 (use -v to see invocation) | ||
28 | | ninja: build stopped: subcommand failed. | ||
29 | |||
30 | Upstream-Status: Submitted [https://github.com/intel/intel-graphics-compiler/pull/105] | ||
31 | |||
32 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
33 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
34 | --- | ||
35 | IGC/Compiler/CISACodeGen/PreRAScheduler.cpp | 6 ++++++ | ||
36 | 1 file changed, 6 insertions(+) | ||
37 | |||
38 | diff --git a/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp b/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp | ||
39 | index 62e89c0c..ba01af01 100644 | ||
40 | --- a/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp | ||
41 | +++ b/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp | ||
42 | @@ -178,8 +178,10 @@ namespace IGC { | ||
43 | AU.addRequired<RegisterEstimator>(); | ||
44 | } | ||
45 | |||
46 | +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) | ||
47 | void dumpDDGContents(); | ||
48 | void dumpPriorityQueueContents(); | ||
49 | +#endif | ||
50 | |||
51 | void clearDDG(); | ||
52 | |||
53 | @@ -228,6 +230,7 @@ IGC_INITIALIZE_PASS_DEPENDENCY(RegisterEstimator) | ||
54 | IGC_INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass) | ||
55 | IGC_INITIALIZE_PASS_END(PreRAScheduler, PASS_FLAG, PASS_DESC, PASS_CFG_ONLY, PASS_ANALYSIS) | ||
56 | |||
57 | +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) | ||
58 | void PreRAScheduler::dumpDDGContents() | ||
59 | { | ||
60 | IGC_SET_FLAG_VALUE(PrintToConsole, 1); | ||
61 | @@ -259,6 +262,7 @@ void PreRAScheduler::dumpDDGContents() | ||
62 | |||
63 | IGC_SET_FLAG_VALUE(PrintToConsole, 0); | ||
64 | } | ||
65 | +#endif | ||
66 | |||
67 | void PreRAScheduler::clearDDG() | ||
68 | { | ||
69 | @@ -841,6 +845,7 @@ bool PreRAScheduler::ScheduleReadyNodes( | ||
70 | return Changed; | ||
71 | } | ||
72 | |||
73 | +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) | ||
74 | void PreRAScheduler::dumpPriorityQueueContents() | ||
75 | { | ||
76 | llvm::PriorityQueue<Node*, std::vector<Node*>, PreRAScheduler::OrderByLatency> longLatencyQueueCopy = longLatencyDelaySortedReadyQueue; | ||
77 | @@ -912,6 +917,7 @@ void PreRAScheduler::dumpPriorityQueueContents() | ||
78 | |||
79 | IGC_SET_FLAG_VALUE(PrintToConsole, 0); | ||
80 | } | ||
81 | +#endif | ||
82 | |||
83 | bool PreRAScheduler::runOnFunction(Function& F) { | ||
84 | CodeGenContext* ctx = getAnalysis<CodeGenContextWrapper>().getCodeGenContext(); | ||
85 | -- | ||
86 | 2.17.1 | ||
87 | |||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Fix-for-buildbreak-when-using-clang-9-compiler.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Fix-for-buildbreak-when-using-clang-9-compiler.patch deleted file mode 100644 index 4af8c17e..00000000 --- a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Fix-for-buildbreak-when-using-clang-9-compiler.patch +++ /dev/null | |||
@@ -1,405 +0,0 @@ | |||
1 | From 598038626dd2c10b96308347718f26cfa3dc509c Mon Sep 17 00:00:00 2001 | ||
2 | From: "Wesierski, Lukasz" <lukasz.wesierski@intel.com> | ||
3 | Date: Mon, 9 Sep 2019 09:11:20 -0700 | ||
4 | Subject: [PATCH 4/4] Fix for buildbreak when using clang-9 compiler | ||
5 | |||
6 | Fixes #106 | ||
7 | Fxies #111 | ||
8 | |||
9 | Change-Id: I291bf03c31b1786a00b8bc2c6d23c5adb8b72e73 | ||
10 | |||
11 | Upstream-Status: Backport [https://github.com/intel/intel-graphics-compiler/commit/a332238b46e9fa9e06265d18eb877d095015e6fb] | ||
12 | |||
13 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
14 | --- | ||
15 | IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVEntry.h | 4 + | ||
16 | .../SPIRV/libSPIRV/SPIRVInstruction.h | 18 +-- | ||
17 | IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVModule.cpp | 136 +++++++++--------- | ||
18 | IGC/AdaptorOCL/cif/cif/export/registry.h | 3 +- | ||
19 | IGC/OCLFE/igd_fcl_mcl/source/clang_tb.cpp | 4 +- | ||
20 | visa/CISA.l | 2 +- | ||
21 | visa/CMakeLists.txt | 6 +- | ||
22 | 7 files changed, 89 insertions(+), 84 deletions(-) | ||
23 | |||
24 | diff --git a/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVEntry.h b/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVEntry.h | ||
25 | index 7a2ba855..307ba3f3 100644 | ||
26 | --- a/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVEntry.h | ||
27 | +++ b/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVEntry.h | ||
28 | @@ -129,8 +129,12 @@ class SPIRVExtInst; | ||
29 | void decode(std::istream &I) { getDecoder(I) >> x >> y;} | ||
30 | #define _SPIRV_DEF_DEC3(x,y,z) \ | ||
31 | void decode(std::istream &I) { getDecoder(I) >> x >> y >> z;} | ||
32 | +#define _SPIRV_DEF_DEC3_OVERRIDE(x,y,z) \ | ||
33 | + void decode(std::istream &I) override { getDecoder(I) >> x >> y >> z;} | ||
34 | #define _SPIRV_DEF_DEC4(x,y,z,u) \ | ||
35 | void decode(std::istream &I) { getDecoder(I) >> x >> y >> z >> u;} | ||
36 | +#define _SPIRV_DEF_DEC4_OVERRIDE(x,y,z,u) \ | ||
37 | + void decode(std::istream &I) override { getDecoder(I) >> x >> y >> z >> u;} | ||
38 | #define _SPIRV_DEF_DEC5(x,y,z,u,v) \ | ||
39 | void decode(std::istream &I) { getDecoder(I) >> x >> y >> z >> u >> v;} | ||
40 | #define _SPIRV_DEF_DEC6(x,y,z,u,v,w) \ | ||
41 | diff --git a/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVInstruction.h b/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVInstruction.h | ||
42 | index 9f4e9d1f..bb85fd04 100644 | ||
43 | --- a/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVInstruction.h | ||
44 | +++ b/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVInstruction.h | ||
45 | @@ -727,10 +727,10 @@ public: | ||
46 | return getValue(ConditionId); | ||
47 | } | ||
48 | SPIRVLabel *getTrueLabel() const { | ||
49 | - return get<SPIRVLabel>(TrueLabelId); | ||
50 | + return SPIRVEntry::get<SPIRVLabel>(TrueLabelId); | ||
51 | } | ||
52 | SPIRVLabel *getFalseLabel() const { | ||
53 | - return get<SPIRVLabel>(FalseLabelId); | ||
54 | + return SPIRVEntry::get<SPIRVLabel>(FalseLabelId); | ||
55 | } | ||
56 | protected: | ||
57 | void setWordCount(SPIRVWord TheWordCount) { | ||
58 | @@ -940,7 +940,7 @@ public: | ||
59 | SPIRVEntry::setWordCount(TheWordCount); | ||
60 | LoopControlParameters.resize(TheWordCount - FixedWordCount); | ||
61 | } | ||
62 | - _SPIRV_DEF_DEC4(MergeBlock, ContinueTarget, LoopControl, | ||
63 | + _SPIRV_DEF_DEC4_OVERRIDE(MergeBlock, ContinueTarget, LoopControl, | ||
64 | LoopControlParameters) | ||
65 | |||
66 | protected: | ||
67 | @@ -1120,7 +1120,7 @@ public: | ||
68 | |||
69 | SPIRVFunctionCallGeneric(SPIRVModule *BM, SPIRVWord ResId, SPIRVType *TheType, | ||
70 | const std::vector<SPIRVWord> &TheArgs) | ||
71 | - : SPIRVInstruction(TheArgs.size() + FixedWordCount, OC, TheType, ResId, | ||
72 | + : SPIRVInstruction(TheArgs.size() + FixedWordCount, OC, TheType, ResId, NULL, | ||
73 | BM), | ||
74 | Args(TheArgs) {} | ||
75 | SPIRVFunctionCallGeneric():SPIRVInstruction(OC) {} | ||
76 | @@ -1152,7 +1152,7 @@ class SPIRVFunctionCall: | ||
77 | public: | ||
78 | SPIRVFunctionCall():FunctionId(SPIRVID_INVALID) {} | ||
79 | SPIRVFunction *getFunction()const { | ||
80 | - return get<SPIRVFunction>(FunctionId); | ||
81 | + return SPIRVEntry::get<SPIRVFunction>(FunctionId); | ||
82 | } | ||
83 | _SPIRV_DEF_DEC4(Type, Id, FunctionId, Args) | ||
84 | void validate()const; | ||
85 | @@ -1169,8 +1169,8 @@ public: | ||
86 | const std::vector<SPIRVWord>& TheArgs, | ||
87 | SPIRVBasicBlock* BB); | ||
88 | SPIRVFunctionPointerCallINTEL() : CalledValueId(SPIRVID_INVALID) {} | ||
89 | - SPIRVValue* getCalledValue() const { return get<SPIRVValue>(CalledValueId); } | ||
90 | - _SPIRV_DEF_DEC4(Type, Id, CalledValueId, Args) | ||
91 | + SPIRVValue* getCalledValue() const { return SPIRVEntry::get<SPIRVValue>(CalledValueId); } | ||
92 | + _SPIRV_DEF_DEC4_OVERRIDE(Type, Id, CalledValueId, Args) | ||
93 | void validate() const override; | ||
94 | bool isOperandLiteral(unsigned Index) const { return false; } | ||
95 | CapVec getRequiredCapability() const override { | ||
96 | @@ -1188,8 +1188,8 @@ public: | ||
97 | SPIRVFunctionPointerINTEL(SPIRVId TheId, SPIRVType* TheType, | ||
98 | SPIRVFunction* TheFunction, SPIRVBasicBlock* BB); | ||
99 | SPIRVFunctionPointerINTEL() : SPIRVInstruction(OC), TheFunction(SPIRVID_INVALID) {} | ||
100 | - SPIRVFunction* getFunction() const { return get<SPIRVFunction>(TheFunction); } | ||
101 | - _SPIRV_DEF_DEC3(Type, Id, TheFunction) | ||
102 | + SPIRVFunction* getFunction() const { return SPIRVEntry::get<SPIRVFunction>(TheFunction); } | ||
103 | + _SPIRV_DEF_DEC3_OVERRIDE(Type, Id, TheFunction) | ||
104 | void validate() const override; | ||
105 | bool isOperandLiteral(unsigned Index) const { return false; } | ||
106 | CapVec getRequiredCapability() const override { | ||
107 | diff --git a/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVModule.cpp b/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVModule.cpp | ||
108 | index 353341b5..74ab6e93 100644 | ||
109 | --- a/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVModule.cpp | ||
110 | +++ b/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVModule.cpp | ||
111 | @@ -94,126 +94,126 @@ public: | ||
112 | virtual ~SPIRVModuleImpl(); | ||
113 | |||
114 | // Object query functions | ||
115 | - bool exist(SPIRVId) const; | ||
116 | - bool exist(SPIRVId, SPIRVEntry **) const; | ||
117 | + bool exist(SPIRVId) const override; | ||
118 | + bool exist(SPIRVId, SPIRVEntry **) const override; | ||
119 | SPIRVId getId(SPIRVId Id = SPIRVID_INVALID, unsigned Increment = 1); | ||
120 | - virtual SPIRVEntry *getEntry(SPIRVId Id) const; | ||
121 | + virtual SPIRVEntry *getEntry(SPIRVId Id) const override; | ||
122 | virtual void addUnknownStructField( | ||
123 | - SPIRVTypeStruct*, unsigned idx, SPIRVId id); | ||
124 | - virtual void resolveUnknownStructFields(); | ||
125 | - bool hasDebugInfo() const | ||
126 | + SPIRVTypeStruct*, unsigned idx, SPIRVId id) override; | ||
127 | + virtual void resolveUnknownStructFields() override; | ||
128 | + bool hasDebugInfo() const override | ||
129 | { | ||
130 | return getCompilationUnit() != nullptr; | ||
131 | } | ||
132 | |||
133 | // Error handling functions | ||
134 | - SPIRVErrorLog &getErrorLog() { return ErrLog;} | ||
135 | - SPIRVErrorCode getError(std::string &ErrMsg) { return ErrLog.getError(ErrMsg);} | ||
136 | + SPIRVErrorLog &getErrorLog() override { return ErrLog;} | ||
137 | + SPIRVErrorCode getError(std::string &ErrMsg) override { return ErrLog.getError(ErrMsg);} | ||
138 | |||
139 | // Module query functions | ||
140 | - SPIRVAddressingModelKind getAddressingModel() { return AddrModel;} | ||
141 | - SPIRVExtInstSetKind getBuiltinSet(SPIRVId SetId) const; | ||
142 | - const SPIRVCapSet &getCapability() const { return CapSet;} | ||
143 | - const std::string &getCompileFlag() const { return CompileFlag;} | ||
144 | - std::string &getCompileFlag() { return CompileFlag;} | ||
145 | - void setCompileFlag(const std::string &options) { CompileFlag = options; } | ||
146 | - bool isSpecConstant(SPIRVWord spec_id) const { | ||
147 | + SPIRVAddressingModelKind getAddressingModel() override { return AddrModel;} | ||
148 | + SPIRVExtInstSetKind getBuiltinSet(SPIRVId SetId) const override; | ||
149 | + const SPIRVCapSet &getCapability() const override { return CapSet;} | ||
150 | + const std::string &getCompileFlag() const override { return CompileFlag;} | ||
151 | + std::string &getCompileFlag() override { return CompileFlag;} | ||
152 | + void setCompileFlag(const std::string &options) override { CompileFlag = options; } | ||
153 | + bool isSpecConstant(SPIRVWord spec_id) const override { | ||
154 | if(SCMap) | ||
155 | return SCMap->find(spec_id) != SCMap->end(); | ||
156 | else | ||
157 | return false; | ||
158 | } | ||
159 | - uint64_t getSpecConstant(SPIRVWord spec_id) { | ||
160 | + uint64_t getSpecConstant(SPIRVWord spec_id) override { | ||
161 | spirv_assert(isSpecConstant(spec_id) && "Specialization constant was not specialized!"); | ||
162 | return SCMap->at(spec_id); | ||
163 | } | ||
164 | - void setSpecConstantMap(SPIRVSpecConstantMap *specConstants) { SCMap = specConstants; } | ||
165 | - std::set<std::string> &getExtension() { return SPIRVExt;} | ||
166 | - SPIRVFunction *getFunction(unsigned I) const { return FuncVec[I];} | ||
167 | - SPIRVVariable *getVariable(unsigned I) const { return VariableVec[I];} | ||
168 | - virtual SPIRVValue *getValue(SPIRVId TheId) const; | ||
169 | - virtual std::vector<SPIRVValue *> getValues(const std::vector<SPIRVId>&)const; | ||
170 | - virtual std::vector<SPIRVId> getIds(const std::vector<SPIRVEntry *>&)const; | ||
171 | - virtual std::vector<SPIRVId> getIds(const std::vector<SPIRVValue *>&)const; | ||
172 | - virtual SPIRVType *getValueType(SPIRVId TheId)const; | ||
173 | + void setSpecConstantMap(SPIRVSpecConstantMap *specConstants) override { SCMap = specConstants; } | ||
174 | + std::set<std::string> &getExtension() override { return SPIRVExt;} | ||
175 | + SPIRVFunction *getFunction(unsigned I) const override { return FuncVec[I];} | ||
176 | + SPIRVVariable *getVariable(unsigned I) const override { return VariableVec[I];} | ||
177 | + virtual SPIRVValue *getValue(SPIRVId TheId) const override; | ||
178 | + virtual std::vector<SPIRVValue *> getValues(const std::vector<SPIRVId>&)const override; | ||
179 | + virtual std::vector<SPIRVId> getIds(const std::vector<SPIRVEntry *>&)const override; | ||
180 | + virtual std::vector<SPIRVId> getIds(const std::vector<SPIRVValue *>&)const override; | ||
181 | + virtual SPIRVType *getValueType(SPIRVId TheId)const override; | ||
182 | virtual std::vector<SPIRVType *> getValueTypes(const std::vector<SPIRVId>&) | ||
183 | - const; | ||
184 | - SPIRVMemoryModelKind getMemoryModel() { return MemoryModel;} | ||
185 | - virtual SPIRVConstant* getLiteralAsConstant(unsigned Literal); | ||
186 | - unsigned getNumEntryPoints(SPIRVExecutionModelKind EM) const { | ||
187 | + const override; | ||
188 | + SPIRVMemoryModelKind getMemoryModel() override { return MemoryModel;} | ||
189 | + virtual SPIRVConstant* getLiteralAsConstant(unsigned Literal) override; | ||
190 | + unsigned getNumEntryPoints(SPIRVExecutionModelKind EM) const override{ | ||
191 | auto Loc = EntryPointVec.find(EM); | ||
192 | if (Loc == EntryPointVec.end()) | ||
193 | return 0; | ||
194 | return Loc->second.size(); | ||
195 | } | ||
196 | - SPIRVFunction *getEntryPoint(SPIRVExecutionModelKind EM, unsigned I) const { | ||
197 | + SPIRVFunction *getEntryPoint(SPIRVExecutionModelKind EM, unsigned I) const override { | ||
198 | auto Loc = EntryPointVec.find(EM); | ||
199 | if (Loc == EntryPointVec.end()) | ||
200 | return nullptr; | ||
201 | spirv_assert(I < Loc->second.size()); | ||
202 | return get<SPIRVFunction>(Loc->second[I]); | ||
203 | } | ||
204 | - unsigned getNumFunctions() const { return FuncVec.size();} | ||
205 | - unsigned getNumVariables() const { return VariableVec.size();} | ||
206 | - SpvSourceLanguage getSourceLanguage(SPIRVWord * Ver = nullptr) const { | ||
207 | + unsigned getNumFunctions() const override { return FuncVec.size();} | ||
208 | + unsigned getNumVariables() const override { return VariableVec.size();} | ||
209 | + SpvSourceLanguage getSourceLanguage(SPIRVWord * Ver = nullptr) const override { | ||
210 | if (Ver) | ||
211 | *Ver = SrcLangVer; | ||
212 | return SrcLang; | ||
213 | } | ||
214 | - std::set<std::string> &getSourceExtension() { return SrcExtension;} | ||
215 | - bool isEntryPoint(SPIRVExecutionModelKind, SPIRVId EP) const; | ||
216 | + std::set<std::string> &getSourceExtension() override { return SrcExtension;} | ||
217 | + bool isEntryPoint(SPIRVExecutionModelKind, SPIRVId EP) const override; | ||
218 | const std::string &getModuleProcessed() const { return ModuleProcessed; } | ||
219 | - const std::vector<SPIRVString *> &getStringVec() const { return StringVec; } | ||
220 | + const std::vector<SPIRVString *> &getStringVec() const override { return StringVec; } | ||
221 | |||
222 | // Module changing functions | ||
223 | - bool importBuiltinSet(const std::string &, SPIRVId *); | ||
224 | - bool importBuiltinSetWithId(const std::string &, SPIRVId); | ||
225 | - void optimizeDecorates(); | ||
226 | - void setAddressingModel(SPIRVAddressingModelKind AM) { AddrModel = AM;} | ||
227 | - void setAlignment(SPIRVValue *, SPIRVWord); | ||
228 | - void setMemoryModel(SPIRVMemoryModelKind MM) { MemoryModel = MM;} | ||
229 | - void setName(SPIRVEntry *E, const std::string &Name); | ||
230 | - void setSourceLanguage(SpvSourceLanguage Lang, SPIRVWord Ver) { | ||
231 | + bool importBuiltinSet(const std::string &, SPIRVId *) override; | ||
232 | + bool importBuiltinSetWithId(const std::string &, SPIRVId) override; | ||
233 | + void optimizeDecorates() override; | ||
234 | + void setAddressingModel(SPIRVAddressingModelKind AM) override { AddrModel = AM;} | ||
235 | + void setAlignment(SPIRVValue *, SPIRVWord) override; | ||
236 | + void setMemoryModel(SPIRVMemoryModelKind MM) override { MemoryModel = MM;} | ||
237 | + void setName(SPIRVEntry *E, const std::string &Name) override; | ||
238 | + void setSourceLanguage(SpvSourceLanguage Lang, SPIRVWord Ver) override { | ||
239 | SrcLang = Lang; | ||
240 | SrcLangVer = Ver; | ||
241 | } | ||
242 | - void setModuleProcessed(const std::string& MP) { | ||
243 | + void setModuleProcessed(const std::string& MP) override { | ||
244 | ModuleProcessed = MP; | ||
245 | } | ||
246 | |||
247 | // Object creation functions | ||
248 | template<class T> void addTo(std::vector<T *> &V, SPIRVEntry *E); | ||
249 | - virtual SPIRVEntry *addEntry(SPIRVEntry *E); | ||
250 | - virtual SPIRVString *getString(const std::string &Str); | ||
251 | + virtual SPIRVEntry *addEntry(SPIRVEntry *E) override; | ||
252 | + virtual SPIRVString *getString(const std::string &Str) override; | ||
253 | virtual SPIRVMemberName *addMemberName(SPIRVTypeStruct *ST, | ||
254 | - SPIRVWord MemberNumber, const std::string &Name); | ||
255 | + SPIRVWord MemberNumber, const std::string &Name) override; | ||
256 | virtual SPIRVLine *addLine(SPIRVString *FileName, SPIRVWord Line, | ||
257 | - SPIRVWord Column); | ||
258 | - virtual void addCapability(SPIRVCapabilityKind); | ||
259 | - virtual const SPIRVDecorateGeneric *addDecorate(const SPIRVDecorateGeneric *); | ||
260 | - virtual SPIRVDecorationGroup *addDecorationGroup(); | ||
261 | - virtual SPIRVDecorationGroup *addDecorationGroup(SPIRVDecorationGroup *Group); | ||
262 | + SPIRVWord Column) override; | ||
263 | + virtual void addCapability(SPIRVCapabilityKind) override; | ||
264 | + virtual const SPIRVDecorateGeneric *addDecorate(const SPIRVDecorateGeneric *) override; | ||
265 | + virtual SPIRVDecorationGroup *addDecorationGroup() override; | ||
266 | + virtual SPIRVDecorationGroup *addDecorationGroup(SPIRVDecorationGroup *Group) override; | ||
267 | virtual SPIRVGroupDecorate *addGroupDecorate(SPIRVDecorationGroup *Group, | ||
268 | - const std::vector<SPIRVEntry *> &Targets); | ||
269 | + const std::vector<SPIRVEntry *> &Targets) override; | ||
270 | virtual SPIRVGroupDecorateGeneric *addGroupDecorateGeneric( | ||
271 | - SPIRVGroupDecorateGeneric *GDec); | ||
272 | + SPIRVGroupDecorateGeneric *GDec) override; | ||
273 | virtual SPIRVGroupMemberDecorate *addGroupMemberDecorate( | ||
274 | - SPIRVDecorationGroup *Group, const std::vector<SPIRVEntry *> &Targets); | ||
275 | + SPIRVDecorationGroup *Group, const std::vector<SPIRVEntry *> &Targets) override; | ||
276 | virtual void addEntryPoint(SPIRVExecutionModelKind ExecModel, | ||
277 | - SPIRVId EntryPoint); | ||
278 | - virtual SPIRVForward *addForward(SPIRVType *Ty); | ||
279 | - virtual SPIRVForward *addForward(SPIRVId, SPIRVType *Ty); | ||
280 | - virtual SPIRVFunction *addFunction(SPIRVFunction *); | ||
281 | - virtual SPIRVFunction *addFunction(SPIRVTypeFunction *, SPIRVId); | ||
282 | - virtual SPIRVEntry *replaceForward(SPIRVForward *, SPIRVEntry *); | ||
283 | + SPIRVId EntryPoint) override; | ||
284 | + virtual SPIRVForward *addForward(SPIRVType *Ty) override; | ||
285 | + virtual SPIRVForward *addForward(SPIRVId, SPIRVType *Ty) override; | ||
286 | + virtual SPIRVFunction *addFunction(SPIRVFunction *) override; | ||
287 | + virtual SPIRVFunction *addFunction(SPIRVTypeFunction *, SPIRVId) override; | ||
288 | + virtual SPIRVEntry *replaceForward(SPIRVForward *, SPIRVEntry *) override; | ||
289 | |||
290 | // Type creation functions | ||
291 | template<class T> T * addType(T *Ty); | ||
292 | - virtual SPIRVTypeInt *addIntegerType(unsigned BitWidth); | ||
293 | + virtual SPIRVTypeInt *addIntegerType(unsigned BitWidth) override; | ||
294 | |||
295 | // Constant creation functions | ||
296 | - virtual SPIRVValue *addConstant(SPIRVValue *); | ||
297 | - virtual SPIRVValue *addConstant(SPIRVType *, uint64_t); | ||
298 | + virtual SPIRVValue *addConstant(SPIRVValue *) override; | ||
299 | + virtual SPIRVValue *addConstant(SPIRVType *, uint64_t) override; | ||
300 | |||
301 | virtual SPIRVInstruction *addLoopMergeInst( | ||
302 | SPIRVId MergeBlock, SPIRVId ContinueTarget, | ||
303 | @@ -226,7 +226,7 @@ public: | ||
304 | addInstruction(SPIRVInstruction *Inst, SPIRVBasicBlock *BB, | ||
305 | SPIRVInstruction *InsertBefore = nullptr); | ||
306 | |||
307 | - virtual SPIRVExtInst* getCompilationUnit() const | ||
308 | + virtual SPIRVExtInst* getCompilationUnit() const override | ||
309 | { | ||
310 | for (auto& item : IdEntryMap) | ||
311 | { | ||
312 | @@ -242,7 +242,7 @@ public: | ||
313 | return nullptr; | ||
314 | } | ||
315 | |||
316 | - virtual std::vector<SPIRVExtInst*> getGlobalVars() | ||
317 | + virtual std::vector<SPIRVExtInst*> getGlobalVars() override | ||
318 | { | ||
319 | std::vector<SPIRVExtInst*> globalVars; | ||
320 | |||
321 | @@ -260,7 +260,7 @@ public: | ||
322 | return globalVars; | ||
323 | } | ||
324 | |||
325 | - virtual std::vector<SPIRVValue*> parseSpecConstants() | ||
326 | + virtual std::vector<SPIRVValue*> parseSpecConstants() override | ||
327 | { | ||
328 | std::vector<SPIRVValue*> specConstants; | ||
329 | |||
330 | diff --git a/IGC/AdaptorOCL/cif/cif/export/registry.h b/IGC/AdaptorOCL/cif/cif/export/registry.h | ||
331 | index a2b893c2..1571a698 100644 | ||
332 | --- a/IGC/AdaptorOCL/cif/cif/export/registry.h | ||
333 | +++ b/IGC/AdaptorOCL/cif/cif/export/registry.h | ||
334 | @@ -50,7 +50,8 @@ namespace Helpers { | ||
335 | struct EntryPointInterfaceBase{ | ||
336 | EntryPointInterfaceBase(){ | ||
337 | } | ||
338 | - | ||
339 | + virtual ~EntryPointInterfaceBase() = default; | ||
340 | + | ||
341 | virtual ICIF * Create(Version_t version, ICIF * parent) const = 0; | ||
342 | virtual InterfaceId_t GetFirstIncompatible(CIF::CompatibilityDataHandle handle) const = 0; | ||
343 | virtual void GetSupportedVersions(Version_t &verMin, Version_t &verMax) const = 0; | ||
344 | diff --git a/IGC/OCLFE/igd_fcl_mcl/source/clang_tb.cpp b/IGC/OCLFE/igd_fcl_mcl/source/clang_tb.cpp | ||
345 | index ebad9b3d..3bde1151 100644 | ||
346 | --- a/IGC/OCLFE/igd_fcl_mcl/source/clang_tb.cpp | ||
347 | +++ b/IGC/OCLFE/igd_fcl_mcl/source/clang_tb.cpp | ||
348 | @@ -301,7 +301,7 @@ namespace FCL | ||
349 | std::string dumpPath = "c:\\Intel\\IGC\\"; // default if something goes wrong | ||
350 | char custom_dir[256]; | ||
351 | FCLReadIGCRegistry("DumpToCustomDir", custom_dir, sizeof(custom_dir)); | ||
352 | - if (custom_dir != nullptr && strlen(custom_dir) > 0) | ||
353 | + if (strlen(custom_dir) > 0) | ||
354 | { | ||
355 | dumpPath = custom_dir; | ||
356 | } | ||
357 | @@ -321,7 +321,7 @@ namespace FCL | ||
358 | std::string dumpPath = "/tmp/IntelIGC/"; // default if something goes wrong | ||
359 | char custom_dir[256]; | ||
360 | FCLReadIGCRegistry("DumpToCustomDir", custom_dir, sizeof(custom_dir)); | ||
361 | - if (custom_dir != nullptr && strlen(custom_dir) > 0) | ||
362 | + if (strlen(custom_dir) > 0) | ||
363 | { | ||
364 | dumpPath = custom_dir; | ||
365 | } | ||
366 | diff --git a/visa/CISA.l b/visa/CISA.l | ||
367 | index def21e4b..27532695 100644 | ||
368 | --- a/visa/CISA.l | ||
369 | +++ b/visa/CISA.l | ||
370 | @@ -45,7 +45,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
371 | #pragma warning(default: 4005) | ||
372 | #endif | ||
373 | |||
374 | -#include "CISA.tab.h" | ||
375 | +#include "CISA.tab.hpp" | ||
376 | |||
377 | #ifdef _DEBUG | ||
378 | #define TRACE(str) fprintf(yyout, str); ECHO; fprintf(yyout, "\n") | ||
379 | diff --git a/visa/CMakeLists.txt b/visa/CMakeLists.txt | ||
380 | index 11d1bf53..551e4edb 100644 | ||
381 | --- a/visa/CMakeLists.txt | ||
382 | +++ b/visa/CMakeLists.txt | ||
383 | @@ -105,8 +105,8 @@ endif() | ||
384 | # Set up the bison and flex targets. These commands will set up commands to generate the appropriate | ||
385 | # source files from the input grammars. It will also set up the dependencies correctly for any | ||
386 | # library or executable that uses the generated source | ||
387 | -BISON_TARGET(CISAParser CISA.y ${CMAKE_CURRENT_BINARY_DIR}/CISA.tab.c COMPILE_FLAGS "-vt -p CISA") | ||
388 | -FLEX_TARGET(CISAScanner CISA.l ${CMAKE_CURRENT_BINARY_DIR}/lex.CISA.c COMPILE_FLAGS "-PCISA ${WIN_FLEX_FLAG}") | ||
389 | +BISON_TARGET(CISAParser CISA.y ${CMAKE_CURRENT_BINARY_DIR}/CISA.tab.cpp COMPILE_FLAGS "-vt -p CISA") | ||
390 | +FLEX_TARGET(CISAScanner CISA.l ${CMAKE_CURRENT_BINARY_DIR}/lex.CISA.cpp COMPILE_FLAGS "-PCISA ${WIN_FLEX_FLAG}") | ||
391 | ADD_FLEX_BISON_DEPENDENCY(CISAScanner CISAParser) | ||
392 | |||
393 | add_custom_target(CISAScanner_target DEPENDS ${FLEX_CISAScanner_OUTPUTS} ${BISON_CISAParser_OUTPUTS}) | ||
394 | @@ -134,7 +134,7 @@ include_directories(${Jitter_inc_dirs}) | ||
395 | |||
396 | # Tell cmake to generate code to compile the flex and bison generated source as c++ rather than c | ||
397 | # (due to the fact that they are .c files rather than .cpp) | ||
398 | -set_source_files_properties( CISA.tab.c lex.CISA.c PROPERTIES LANGUAGE CXX ) | ||
399 | +set_source_files_properties( CISA.tab.cpp lex.CISA.cpp PROPERTIES LANGUAGE CXX ) | ||
400 | |||
401 | set(LocalScheduler_SOURCES | ||
402 | LocalScheduler/Dependencies_G4IR.cpp | ||
403 | -- | ||
404 | 2.17.1 | ||
405 | |||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Improve-Reproducibility-for-src-package.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Improve-Reproducibility-for-src-package.patch new file mode 100644 index 00000000..4269fadf --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Improve-Reproducibility-for-src-package.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From ca136c04d4ac60e3febc8ea2b9c4d4736365a424 Mon Sep 17 00:00:00 2001 | ||
2 | From: Lee Chee Yang <chee.yang.lee@intel.com> | ||
3 | Date: Wed, 2 Sep 2020 08:28:35 +0800 | ||
4 | Subject: [PATCH] Improve Reproducibility for src package | ||
5 | |||
6 | Improve reproducibility for intel-graphics-compiler-src package. | ||
7 | needs to pass build path as environment variable to the build. | ||
8 | this only works on bison 3.7 onward, hence check for bison version | ||
9 | before adding the flags. | ||
10 | Upstream-Status: Inappropriate [applying --file-prefix-map in such way does not work for upstream] | ||
11 | Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> | ||
12 | --- | ||
13 | visa/CMakeLists.txt | 7 +++++-- | ||
14 | 1 file changed, 5 insertions(+), 2 deletions(-) | ||
15 | |||
16 | Index: git/visa/CMakeLists.txt | ||
17 | =================================================================== | ||
18 | --- git.orig/visa/CMakeLists.txt | ||
19 | +++ git/visa/CMakeLists.txt | ||
20 | @@ -135,8 +135,11 @@ endif() | ||
21 | set(bison_output_file ${CMAKE_CURRENT_BINARY_DIR}/CISA.tab.cpp) | ||
22 | set(flex_output_file ${CMAKE_CURRENT_BINARY_DIR}/lex.CISA.cpp) | ||
23 | |||
24 | -BISON_TARGET(CISAParser CISA.y ${bison_output_file} COMPILE_FLAGS "-vt -p CISA") | ||
25 | -FLEX_TARGET(CISAScanner CISA.l ${flex_output_file} COMPILE_FLAGS "-PCISA ${WIN_FLEX_FLAG}") | ||
26 | +if(BISON_VERSION VERSION_GREATER_EQUAL "3.7.0") | ||
27 | + set(BISON_EXTRA_FLAGS " --file-prefix-map=$ENV{B}=/igc/ ") | ||
28 | +endif() | ||
29 | +BISON_TARGET(CISAParser CISA.y ${bison_output_file} COMPILE_FLAGS "-l -vt -p CISA ${BISON_EXTRA_FLAGS} ") | ||
30 | +FLEX_TARGET(CISAScanner CISA.l ${flex_output_file} COMPILE_FLAGS "-PCISA -L ${WIN_FLEX_FLAG} ") | ||
31 | ADD_FLEX_BISON_DEPENDENCY(CISAScanner CISAParser) | ||
32 | set(CISAScanner_dependencies) | ||
33 | |||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.11.bb b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.11.bb deleted file mode 100644 index b359b669..00000000 --- a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.11.bb +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | SUMMARY = "The Intel(R) Graphics Compiler for OpenCL(TM)" | ||
2 | DESCRIPTION = "The Intel(R) Graphics Compiler for OpenCL(TM) is an \ | ||
3 | llvm based compiler for OpenCL(TM) targeting Intel Gen graphics \ | ||
4 | hardware architecture." | ||
5 | |||
6 | LICENSE = "MIT & BSD-3-Clause" | ||
7 | LIC_FILES_CHKSUM = "file://IGC/BiFModule/Implementation/ExternalLibraries/libclc/LICENSE.TXT;md5=311cfc1a5b54bab8ed34a0b5fba4373e \ | ||
8 | file://IGC/Compiler/LegalizationPass.cpp;beginline=1;endline=25;md5=4abf1738ff96b18e34186eb763e28eeb" | ||
9 | |||
10 | SRC_URI = "git://github.com/intel/intel-graphics-compiler.git;protocol=https \ | ||
11 | file://0001-skip-execution-of-ElfPackager.patch \ | ||
12 | file://0002-comment-out-dump-functions.patch \ | ||
13 | file://0003-Fix-for-buildbreak-when-using-clang-9-compiler.patch \ | ||
14 | " | ||
15 | |||
16 | SRCREV = "5f96c6db35ffa238fd84314c99a53e6708322d65" | ||
17 | |||
18 | S = "${WORKDIR}/git" | ||
19 | |||
20 | inherit cmake | ||
21 | |||
22 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
23 | COMPATIBLE_HOST_libc-musl = "null" | ||
24 | |||
25 | DEPENDS += " flex-native bison-native clang opencl-clang" | ||
26 | DEPENDS_append_class-target = " clang-cross-x86_64" | ||
27 | |||
28 | RDEPENDS_${PN} += "opencl-clang" | ||
29 | |||
30 | EXTRA_OECMAKE = "-DIGC_PREFERRED_LLVM_VERSION=9.0.0 -DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python3" | ||
31 | |||
32 | LDFLAGS_append_class-native = " -fuse-ld=lld" | ||
33 | TOOLCHAIN_class-native = "clang" | ||
34 | |||
35 | BBCLASSEXTEND = "native nativesdk" | ||
36 | |||
37 | UPSTREAM_CHECK_GITTAGREGEX = "^igc-(?P<pver>(?!19\..*)\d+(\.\d+)+)$" | ||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_2.10.10.bb b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_2.10.10.bb new file mode 100644 index 00000000..b6d8ddeb --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_2.10.10.bb | |||
@@ -0,0 +1,79 @@ | |||
1 | SUMMARY = "The Intel(R) Graphics Compiler for OpenCL(TM)" | ||
2 | DESCRIPTION = "The Intel(R) Graphics Compiler for OpenCL(TM) is an \ | ||
3 | llvm based compiler for OpenCL(TM) targeting Intel Gen graphics \ | ||
4 | hardware architecture." | ||
5 | |||
6 | LICENSE = "MIT & Apache-2.0" | ||
7 | LIC_FILES_CHKSUM = "file://IGC/BiFModule/Implementation/ExternalLibraries/libclc/LICENSE.TXT;md5=311cfc1a5b54bab8ed34a0b5fba4373e \ | ||
8 | file://LICENSE.md;md5=488d74376edf2765f6e78d271543dde3 \ | ||
9 | file://NOTICES.txt;md5=b81a52411c84df3419f20bad4d755880" | ||
10 | |||
11 | SRC_URI = "git://github.com/intel/intel-graphics-compiler.git;protocol=https;name=igc;branch=releases/2.10.x \ | ||
12 | git://github.com/intel/vc-intrinsics.git;protocol=https;destsuffix=git/vc-intrinsics;name=vc;nobranch=1 \ | ||
13 | git://github.com/KhronosGroup/SPIRV-Tools.git;protocol=https;destsuffix=git/SPIRV-Tools;name=spirv-tools;branch=main \ | ||
14 | git://github.com/KhronosGroup/SPIRV-Headers.git;protocol=https;destsuffix=git/SPIRV-Headers;name=spirv-headers;branch=main \ | ||
15 | file://0003-Improve-Reproducibility-for-src-package.patch \ | ||
16 | file://0001-BiF-CMakeLists.txt-remove-opt-from-DEPENDS.patch \ | ||
17 | file://0001-external-SPIRV-Tools-change-path-to-tools-and-header.patch \ | ||
18 | file://0001-Build-not-able-to-locate-BiFManager-bin.patch \ | ||
19 | " | ||
20 | |||
21 | SRC_URI:append:class-native = " file://0001-fix-tblgen.patch" | ||
22 | |||
23 | SRCREV_igc = "83925314d4fc32b017fcbfcd73e0667ba833fb8f" | ||
24 | SRCREV_vc = "9d255266e1df8f1dc5d11e1fbb03213acfaa4fc7" | ||
25 | SRCREV_spirv-tools = "f289d047f49fb60488301ec62bafab85573668cc" | ||
26 | SRCREV_spirv-headers = "0e710677989b4326ac974fd80c5308191ed80965" | ||
27 | |||
28 | SRCREV_FORMAT = "igc_vc_spirv-tools_spirv-headers" | ||
29 | |||
30 | # Used to replace with relative path in reproducibility patch | ||
31 | export B | ||
32 | |||
33 | S = "${WORKDIR}/git" | ||
34 | |||
35 | inherit cmake pkgconfig qemu python3native | ||
36 | |||
37 | CXXFLAGS:append = " -Wno-error=nonnull" | ||
38 | |||
39 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
40 | COMPATIBLE_HOST:libc-musl = "null" | ||
41 | |||
42 | DEPENDS += " flex-native bison-native clang clang-cross-x86_64 opencl-clang qemu-native python3-mako-native \ | ||
43 | python3-pyyaml-native \ | ||
44 | " | ||
45 | |||
46 | RDEPENDS:${PN} += "opencl-clang" | ||
47 | |||
48 | PACKAGECONFIG ??= "vc" | ||
49 | PACKAGECONFIG[vc] = "-DIGC_BUILD__VC_ENABLED=ON -DIGC_OPTION__LINK_KHRONOS_SPIRV_TRANSLATOR=ON -DIGC_OPTION__SPIRV_TRANSLATOR_MODE=Prebuilds,-DIGC_BUILD__VC_ENABLED=OFF," | ||
50 | |||
51 | EXTRA_OECMAKE = " \ | ||
52 | -DIGC_OPTION__LLVM_PREFERRED_VERSION=${LLVMVERSION} \ | ||
53 | -DVC_INTRINSICS_SRC="${S}/vc-intrinsics" \ | ||
54 | -DIGC_OPTION__LLVM_MODE=Prebuilds \ | ||
55 | -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ | ||
56 | -DLLVM_LINK_EXE=${STAGING_BINDIR_NATIVE}/llvm-link \ | ||
57 | -DCLANG_EXE=${STAGING_BINDIR_NATIVE}/clang \ | ||
58 | -DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper \ | ||
59 | " | ||
60 | |||
61 | do_configure:prepend:class-target () { | ||
62 | # Write out a qemu wrapper that will be used by cmake. | ||
63 | qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}" | ||
64 | cat > ${WORKDIR}/qemuwrapper << EOF | ||
65 | #!/bin/sh | ||
66 | $qemu_binary "\$@" | ||
67 | EOF | ||
68 | chmod +x ${WORKDIR}/qemuwrapper | ||
69 | } | ||
70 | |||
71 | |||
72 | UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>\d+(\.\d+)+)$" | ||
73 | |||
74 | FILES:${PN} += " \ | ||
75 | ${libdir}/igc2/NOTICES.txt \ | ||
76 | " | ||
77 | |||
78 | # libigc.so contains buildpaths | ||
79 | INSANE_SKIP:${PN} += "buildpaths" | ||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0001-cl_headers-CMakeLists.txt-use-clang-from-native-sysr.patch b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0001-cl_headers-CMakeLists.txt-use-clang-from-native-sysr.patch new file mode 100644 index 00000000..031a77c7 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0001-cl_headers-CMakeLists.txt-use-clang-from-native-sysr.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | From 5aea653e611b59c70e529a1bd71885a509831557 Mon Sep 17 00:00:00 2001 | ||
2 | From: Anuj Mittal <anuj.mittal@intel.com> | ||
3 | Date: Tue, 1 Aug 2023 11:15:31 +0800 | ||
4 | Subject: [PATCH] cl_headers/CMakeLists.txt: use clang from native sysroot | ||
5 | |||
6 | Allow clang to be found in target sysroot for target builds and dont try | ||
7 | to compile cross binaries, we do that ourselves. | ||
8 | |||
9 | Upstream-Status: Inappropriate [oe-specific] | ||
10 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
11 | --- | ||
12 | CMakeLists.txt | 8 ++++---- | ||
13 | cl_headers/CMakeLists.txt | 2 +- | ||
14 | 2 files changed, 5 insertions(+), 5 deletions(-) | ||
15 | |||
16 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
17 | index 5864009..60ba39e 100644 | ||
18 | --- a/CMakeLists.txt | ||
19 | +++ b/CMakeLists.txt | ||
20 | @@ -35,10 +35,10 @@ set(CMAKE_MODULE_PATH | ||
21 | |||
22 | include(CMakeFunctions) | ||
23 | |||
24 | -if(CMAKE_CROSSCOMPILING AND OPENCL_CLANG_BUILD_EXTERNAL) | ||
25 | - include(CrossCompile) | ||
26 | - llvm_create_cross_target(${PROJECT_NAME} NATIVE "" Release) | ||
27 | -endif() | ||
28 | +#if(CMAKE_CROSSCOMPILING AND OPENCL_CLANG_BUILD_EXTERNAL) | ||
29 | +# include(CrossCompile) | ||
30 | +# llvm_create_cross_target(${PROJECT_NAME} NATIVE "" Release) | ||
31 | +#endif() | ||
32 | |||
33 | if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) | ||
34 | set(USE_PREBUILT_LLVM ON) | ||
35 | diff --git a/cl_headers/CMakeLists.txt b/cl_headers/CMakeLists.txt | ||
36 | index 16cabb7..4423536 100644 | ||
37 | --- a/cl_headers/CMakeLists.txt | ||
38 | +++ b/cl_headers/CMakeLists.txt | ||
39 | @@ -1,6 +1,6 @@ | ||
40 | set(CL_HEADERS_LIB cl_headers) | ||
41 | if(USE_PREBUILT_LLVM) | ||
42 | - find_program(CLANG_COMMAND clang PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH) | ||
43 | + find_program(CLANG_COMMAND clang PATHS ${LLVM_TOOLS_BINARY_DIR}) | ||
44 | else() | ||
45 | set(CLANG_COMMAND $<TARGET_FILE:clang>) | ||
46 | endif() | ||
47 | -- | ||
48 | 2.37.3 | ||
49 | |||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0002-Request-native-clang-only-when-cross-compiling-464.patch b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0002-Request-native-clang-only-when-cross-compiling-464.patch new file mode 100644 index 00000000..2f1814f8 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0002-Request-native-clang-only-when-cross-compiling-464.patch | |||
@@ -0,0 +1,60 @@ | |||
1 | From 43c806ef321b1f677a49d28c89fb7ffecf539c2d Mon Sep 17 00:00:00 2001 | ||
2 | From: Tim Creech <timothy.m.creech@intel.com> | ||
3 | Date: Wed, 28 Jun 2023 03:45:51 -0400 | ||
4 | Subject: [PATCH 2/2] Request native clang only when cross-compiling (#464) | ||
5 | |||
6 | * Request native clang only when cross-compiling | ||
7 | |||
8 | LLVM_USE_HOST_TOOLS may be set if LLVM is configured with | ||
9 | LLVM_OPTIMIZED_TABLEGEN, which does not necessarily indicate | ||
10 | cross-compilation or that clang will only execute on the target. | ||
11 | |||
12 | By checking that CMAKE_CROSSCOMPILING is set, we ensure that we only | ||
13 | build/use clang again if necessary for host execution. | ||
14 | |||
15 | * fixup: CMAKE_CROSSCOMPILING implies LLVM_USE_HOST_TOOLS | ||
16 | |||
17 | Co-authored-by: Wenju He <wenju.he@intel.com> | ||
18 | |||
19 | * fixup: also use CMAKE_CROSSCOMPILING in top-level CMakeLists.txt | ||
20 | |||
21 | --------- | ||
22 | |||
23 | Co-authored-by: Wenju He <wenju.he@intel.com> | ||
24 | |||
25 | Upstream-Status: Backport [https://github.com/intel/opencl-clang/commit/53843eee13cfb2357919ee02714a43bef1af0f86] | ||
26 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
27 | --- | ||
28 | CMakeLists.txt | 2 +- | ||
29 | cl_headers/CMakeLists.txt | 2 +- | ||
30 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
31 | |||
32 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
33 | index e772de9..5864009 100644 | ||
34 | --- a/CMakeLists.txt | ||
35 | +++ b/CMakeLists.txt | ||
36 | @@ -35,7 +35,7 @@ set(CMAKE_MODULE_PATH | ||
37 | |||
38 | include(CMakeFunctions) | ||
39 | |||
40 | -if(LLVM_USE_HOST_TOOLS AND OPENCL_CLANG_BUILD_EXTERNAL) | ||
41 | +if(CMAKE_CROSSCOMPILING AND OPENCL_CLANG_BUILD_EXTERNAL) | ||
42 | include(CrossCompile) | ||
43 | llvm_create_cross_target(${PROJECT_NAME} NATIVE "" Release) | ||
44 | endif() | ||
45 | diff --git a/cl_headers/CMakeLists.txt b/cl_headers/CMakeLists.txt | ||
46 | index 18296c2..16cabb7 100644 | ||
47 | --- a/cl_headers/CMakeLists.txt | ||
48 | +++ b/cl_headers/CMakeLists.txt | ||
49 | @@ -4,7 +4,7 @@ if(USE_PREBUILT_LLVM) | ||
50 | else() | ||
51 | set(CLANG_COMMAND $<TARGET_FILE:clang>) | ||
52 | endif() | ||
53 | -if(LLVM_USE_HOST_TOOLS AND NOT OPENCL_CLANG_BUILD_EXTERNAL) | ||
54 | +if(CMAKE_CROSSCOMPILING AND NOT OPENCL_CLANG_BUILD_EXTERNAL) | ||
55 | build_native_tool(clang CLANG_COMMAND) | ||
56 | endif() | ||
57 | |||
58 | -- | ||
59 | 2.37.3 | ||
60 | |||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/point-to-correct-llvm-tblgen.patch b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/point-to-correct-llvm-tblgen.patch deleted file mode 100644 index 417e0221..00000000 --- a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/point-to-correct-llvm-tblgen.patch +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | From 2ce2619b544678541e0cc56494e2927086718613 Mon Sep 17 00:00:00 2001 | ||
2 | From: Anuj Mittal <anuj.mittal@intel.com> | ||
3 | Date: Tue, 26 Mar 2019 14:11:29 +0800 | ||
4 | Subject: [PATCH] point to correct llvm-tblgen | ||
5 | |||
6 | Let llvm-tblgen path be passed from recipe itself. | ||
7 | |||
8 | Also since we're going to do the patching ourselves, no need to look for | ||
9 | git through cmake. | ||
10 | |||
11 | Upstream-Status: Inappropriate [OE specific] | ||
12 | |||
13 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
14 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
15 | --- | ||
16 | CMakeLists.txt | 4 ++-- | ||
17 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
18 | |||
19 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
20 | index 1371a67..f83ffcc 100644 | ||
21 | --- a/CMakeLists.txt | ||
22 | +++ b/CMakeLists.txt | ||
23 | @@ -53,7 +53,7 @@ endif(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) | ||
24 | include(AddLLVM) | ||
25 | include(TableGen) | ||
26 | |||
27 | -find_package(Git REQUIRED) | ||
28 | +#find_package(Git REQUIRED) | ||
29 | |||
30 | if (NOT WIN32) | ||
31 | add_subdirectory( linux_linker ) | ||
32 | @@ -138,7 +138,7 @@ endif(NOT USE_PREBUILT_LLVM) | ||
33 | set (COMPILE_OPTIONS_TD opencl_clang_options.td) | ||
34 | set (COMPILE_OPTIONS_INC opencl_clang_options.inc) | ||
35 | |||
36 | -set(LLVM_TABLEGEN_EXE "llvm-tblgen") | ||
37 | +#set(LLVM_TABLEGEN_EXE "llvm-tblgen") | ||
38 | set(LLVM_TARGET_DEFINITIONS ${COMPILE_OPTIONS_TD}) | ||
39 | if(USE_PREBUILT_LLVM) | ||
40 | set(TABLEGEN_ADDITIONAL -I ${LLVM_INCLUDE_DIRS}) | ||
41 | -- | ||
42 | 2.17.1 | ||
43 | |||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_9.0.0.bb b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang.inc index e4209234..31a3fb21 100644 --- a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_9.0.0.bb +++ b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang.inc | |||
@@ -5,33 +5,30 @@ DESCRIPTION = "Common clang has OpenCL-oriented API and is capable \ | |||
5 | LICENSE = "NCSA" | 5 | LICENSE = "NCSA" |
6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e8a15bf1416762a09ece07e44c79118c" | 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e8a15bf1416762a09ece07e44c79118c" |
7 | 7 | ||
8 | SRC_URI = "git://github.com/intel/opencl-clang.git;branch=ocl-open-90;protocol=https \ | 8 | SRC_URI = "git://github.com/intel/opencl-clang.git;branch=${BRANCH};protocol=https \ |
9 | file://point-to-correct-llvm-tblgen.patch \ | 9 | file://0002-Request-native-clang-only-when-cross-compiling-464.patch \ |
10 | file://0001-cl_headers-CMakeLists.txt-use-clang-from-native-sysr.patch \ | ||
10 | " | 11 | " |
11 | |||
12 | SRCREV = "6f8c329bea44321aef1a1716dd206c1f7bed23cf" | ||
13 | |||
14 | S = "${WORKDIR}/git" | 12 | S = "${WORKDIR}/git" |
15 | 13 | ||
16 | inherit cmake | 14 | inherit cmake |
17 | DEPENDS += "clang" | 15 | DEPENDS += "clang" |
18 | 16 | DEPENDS:append:class-target = " opencl-clang-native" | |
19 | DEPENDS_append_class-target = " opencl-clang-native" | ||
20 | LDFLAGS_append_class-native = " -fuse-ld=lld" | ||
21 | 17 | ||
22 | COMPATIBLE_HOST = '(x86_64).*-linux' | 18 | COMPATIBLE_HOST = '(x86_64).*-linux' |
23 | COMPATIBLE_HOST_libc-musl = "null" | 19 | COMPATIBLE_HOST:libc-musl = "null" |
20 | |||
21 | DEPENDS += " spirv-llvm-translator" | ||
24 | 22 | ||
25 | EXTRA_OECMAKE += "\ | 23 | EXTRA_OECMAKE += "\ |
26 | -DLLVM_TABLEGEN_EXE=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ | 24 | -DLLVM_TABLEGEN_EXE=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ |
27 | -DCMAKE_SKIP_RPATH=TRUE \ | 25 | -DCMAKE_SKIP_RPATH=TRUE \ |
26 | -DPREFERRED_LLVM_VERSION=${LLVMVERSION} \ | ||
28 | " | 27 | " |
29 | 28 | ||
30 | do_install_append_class-native() { | 29 | do_install:append:class-native() { |
31 | install -d ${D}${bindir} | 30 | install -d ${D}${bindir} |
32 | install -m 0755 ${B}/linux_linker/linux_resource_linker ${D}${bindir}/ | 31 | install -m 0755 ${B}/bin/linux_resource_linker ${D}${bindir}/ |
33 | } | 32 | } |
34 | 33 | ||
35 | BBCLASSEXTEND = "native nativesdk" | 34 | BBCLASSEXTEND = "native nativesdk" |
36 | |||
37 | TOOLCHAIN_class-native = "clang" | ||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_15.0.0.bb b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_15.0.0.bb new file mode 100644 index 00000000..e946c31c --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_15.0.0.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | require opencl-clang.inc | ||
2 | |||
3 | SRCREV = "60fd799cc58755c16d951f9ebfde6d0f9b8554dd" | ||
4 | |||
5 | BRANCH = "ocl-open-150" | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-bsp/amt/files/0001-LMS-fix-build-issue-with-gcc-15.patch b/dynamic-layers/openembedded-layer/recipes-bsp/amt/files/0001-LMS-fix-build-issue-with-gcc-15.patch new file mode 100644 index 00000000..751c7973 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-bsp/amt/files/0001-LMS-fix-build-issue-with-gcc-15.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 439af27f7641185933d7810b6c4eb17086438df3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yogesh Tyagi <yogesh.tyagi@intel.com> | ||
3 | Date: Mon, 19 May 2025 17:50:40 +0530 | ||
4 | Subject: [PATCH] LMS : fix build issue with gcc 15 | ||
5 | |||
6 | include cstdint header to resolve the below error with gcc 15 | ||
7 | |||
8 | | In file included from /lms/2406.0.0.0/git/MEIClient/src/MEICommand.cpp:11: | ||
9 | | /lms/2406.0.0.0/git/MEIClient/Include/MEICommand.h:40:54: error: 'uint8_t' was not declared in this scope | ||
10 | |||
11 | Upstream-Status: Submitted [https://github.com/intel/lms/pull/23] | ||
12 | |||
13 | Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com> | ||
14 | --- | ||
15 | MEIClient/Include/MEICommand.h | 1 + | ||
16 | 1 file changed, 1 insertion(+) | ||
17 | |||
18 | diff --git a/MEIClient/Include/MEICommand.h b/MEIClient/Include/MEICommand.h | ||
19 | index 6192d26..5332e44 100644 | ||
20 | --- a/MEIClient/Include/MEICommand.h | ||
21 | +++ b/MEIClient/Include/MEICommand.h | ||
22 | @@ -12,6 +12,7 @@ | ||
23 | #define __MEI_COMMAND_H__ | ||
24 | #include "heci.h" | ||
25 | #include "MEIClientException.h" | ||
26 | +#include <cstdint> | ||
27 | #include <memory> | ||
28 | #include <vector> | ||
29 | |||
30 | -- | ||
31 | 2.43.0 | ||
32 | |||
diff --git a/dynamic-layers/openembedded-layer/recipes-bsp/amt/files/lms_drop_rpath_1932.0.0.0.diff b/dynamic-layers/openembedded-layer/recipes-bsp/amt/files/lms_drop_rpath_1932.0.0.0.diff deleted file mode 100644 index dae02e50..00000000 --- a/dynamic-layers/openembedded-layer/recipes-bsp/amt/files/lms_drop_rpath_1932.0.0.0.diff +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From ec7d732a6a23e90be34840b0f1a57e5199d393cf Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Usyskin <alexander.usyskin@intel.com> | ||
3 | Date: Mon, 17 Jun 2019 13:27:33 +0300 | ||
4 | Subject: [PATCH] lms: drop rpath definitions | ||
5 | |||
6 | Yocto fail to compile with this definitions. | ||
7 | |||
8 | Upstream-Status: Inappropriate [configuration] | ||
9 | Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> | ||
10 | --- | ||
11 | CMakeLists.txt | 3 --- | ||
12 | 1 file changed, 3 deletions(-) | ||
13 | |||
14 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
15 | index a303c4b..9bda082 100644 | ||
16 | --- a/CMakeLists.txt | ||
17 | +++ b/CMakeLists.txt | ||
18 | @@ -109,9 +109,6 @@ install (DIRECTORY Docs/Licenses | ||
19 | FILES_MATCHING PATTERN "LICENSE.*" | ||
20 | ) | ||
21 | |||
22 | -list (APPEND CMAKE_INSTALL_RPATH "${PROJECT_BINARY_DIR}/UNS/GMS_COMMON") | ||
23 | -list (APPEND CMAKE_INSTALL_RPATH "${PROJECT_BINARY_DIR}/WsmanClient") | ||
24 | - | ||
25 | if (BUILD_TESTS) | ||
26 | include (gtest.cmake) | ||
27 | endif (BUILD_TESTS) | ||
28 | -- | ||
29 | 2.7.4 | ||
30 | |||
diff --git a/dynamic-layers/openembedded-layer/recipes-bsp/amt/lms_1932.0.0.0.bb b/dynamic-layers/openembedded-layer/recipes-bsp/amt/lms_1932.0.0.0.bb deleted file mode 100644 index 76baa9f3..00000000 --- a/dynamic-layers/openembedded-layer/recipes-bsp/amt/lms_1932.0.0.0.bb +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | SUMMARY = "Intel(R) Local Managability Service" | ||
2 | DESCRIPTION = "Intel Local Manageability Service allows applications \ | ||
3 | to access the Intel Active Management Technology (AMT) firmware via \ | ||
4 | the Intel Management Engine Interface (MEI)." | ||
5 | |||
6 | LICENSE = "Apache-2.0" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=2ee41112a44fe7014dce33e26468ba93" | ||
8 | |||
9 | COMPATIBLE_HOST = '(i.86|x86_64).*-linux' | ||
10 | |||
11 | inherit cmake systemd | ||
12 | |||
13 | DEPENDS = "metee ace xerces-c libnl libxml2 glib-2.0 glib-2.0-native connman" | ||
14 | |||
15 | EXTRA_OECMAKE += "-DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python3" | ||
16 | |||
17 | REQUIRED_DISTRO_FEATURES= "systemd" | ||
18 | |||
19 | FILES_${PN} += "${datadir}/dbus-1/system-services/*.service" | ||
20 | |||
21 | S = "${WORKDIR}/git" | ||
22 | |||
23 | SYSTEMD_SERVICE_${PN} = "lms.service" | ||
24 | |||
25 | SRC_URI = "git://github.com/intel/lms.git" | ||
26 | SRCREV = "f90fa51f07514b7644cc57846c90e46b146b23ae" | ||
27 | |||
28 | SRC_URI_append = " file://lms_drop_rpath_${PV}.diff" | ||
29 | |||
30 | do_install_append() { | ||
31 | install -d ${D}${systemd_system_unitdir} | ||
32 | install -m 0644 ${B}/UNS/lms.service ${D}${systemd_system_unitdir} | ||
33 | } | ||
34 | |||
35 | RDEPENDS_${PN} += "ace" | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-bsp/amt/lms_2406.0.0.0.bb b/dynamic-layers/openembedded-layer/recipes-bsp/amt/lms_2406.0.0.0.bb new file mode 100644 index 00000000..c71ac9ea --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-bsp/amt/lms_2406.0.0.0.bb | |||
@@ -0,0 +1,45 @@ | |||
1 | SUMMARY = "Intel(R) Local Managability Service" | ||
2 | DESCRIPTION = "Intel Local Manageability Service allows applications \ | ||
3 | to access the Intel Active Management Technology (AMT) firmware via \ | ||
4 | the Intel Management Engine Interface (MEI)." | ||
5 | |||
6 | LICENSE = "Apache-2.0" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=2ee41112a44fe7014dce33e26468ba93" | ||
8 | |||
9 | COMPATIBLE_HOST = '(i.86|x86_64).*-linux' | ||
10 | |||
11 | COMPATIBLE_HOST:libc-musl = "null" | ||
12 | |||
13 | inherit cmake systemd features_check python3native | ||
14 | |||
15 | DEPENDS = "metee ace xerces-c libnl libxml2 glib-2.0 glib-2.0-native pkgconfig-native python3-packaging-native" | ||
16 | |||
17 | # Enable either connman or networkmanager or none but not both. | ||
18 | PACKAGECONFIG ??= "connman" | ||
19 | PACKAGECONFIG[connman] = "-DNETWORK_CN=ON, -DNETWORK_CN=OFF, connman" | ||
20 | PACKAGECONFIG[networkmanager] = "-DNETWORK_NM=ON, -DNETWORK_NM=OFF, networkmanager" | ||
21 | |||
22 | REQUIRED_DISTRO_FEATURES = "systemd" | ||
23 | |||
24 | FILES:${PN} += "${datadir}/dbus-1/system-services/*.service" | ||
25 | |||
26 | S = "${WORKDIR}/git" | ||
27 | |||
28 | SYSTEMD_SERVICE:${PN} = "lms.service" | ||
29 | |||
30 | SRC_URI = "git://github.com/intel/lms.git;branch=master;protocol=https \ | ||
31 | file://0001-LMS-fix-build-issue-with-gcc-15.patch \ | ||
32 | " | ||
33 | SRCREV = "388f115b2aeb3ea11499971c65f828daefd32c47" | ||
34 | |||
35 | do_install:append() { | ||
36 | install -d ${D}${sysconfdir}/lms | ||
37 | install -d ${D}${systemd_system_unitdir} | ||
38 | install -m 0644 ${B}/UNS/lms.service ${D}${systemd_system_unitdir} | ||
39 | install -d ${D}${sysconfdir}/udev/rules.d | ||
40 | install -m 0644 ${S}/UNS/linux_scripts/70-mei-wdt.rules ${D}${sysconfdir}/udev/rules.d/70-mei-wdt.rules | ||
41 | } | ||
42 | |||
43 | RDEPENDS:${PN} += "ace" | ||
44 | |||
45 | CVE_STATUS[CVE-2018-1000535] = "cpe-incorrect: This CVE is for a different LMS - Lan Management System." | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-bsp/thermald/thermald_2.5.8.bb b/dynamic-layers/openembedded-layer/recipes-bsp/thermald/thermald_2.5.8.bb new file mode 100644 index 00000000..fee089de --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-bsp/thermald/thermald_2.5.8.bb | |||
@@ -0,0 +1,44 @@ | |||
1 | SUMMARY = "Linux thermal daemon" | ||
2 | |||
3 | DESCRIPTION = "Thermal Daemon is a Linux daemon used to prevent the \ | ||
4 | overheating of platforms. This daemon monitors temperature and applies \ | ||
5 | compensation using available cooling methods." | ||
6 | |||
7 | HOMEPAGE = "https://github.com/01org/thermal_daemon" | ||
8 | |||
9 | DEPENDS = "dbus dbus-glib dbus-glib-native libxml2 glib-2.0 glib-2.0-native upower libevdev" | ||
10 | DEPENDS += "autoconf-archive-native" | ||
11 | |||
12 | LICENSE = "GPL-2.0-only" | ||
13 | LIC_FILES_CHKSUM = "file://COPYING;md5=ea8831610e926e2e469075b52bf08848" | ||
14 | |||
15 | SRC_URI = "git://github.com/intel/thermal_daemon/;branch=master;protocol=https \ | ||
16 | " | ||
17 | |||
18 | SRCREV = "df3b9ab0ffe780c4fbad7750987eff76f659cfd5" | ||
19 | S = "${WORKDIR}/git" | ||
20 | |||
21 | inherit pkgconfig autotools systemd gtk-doc | ||
22 | |||
23 | # gtkdocsize runs before autotools do_configure and it copies gtk-doc.m4 and fails | ||
24 | # to copy becuase there is no m4 dir yet. | ||
25 | do_configure:prepend () { | ||
26 | mkdir -p ${S}/m4 | ||
27 | } | ||
28 | |||
29 | EXTRA_OECONF = " \ | ||
30 | --with-systemdsystemunitdir=${systemd_system_unitdir} \ | ||
31 | " | ||
32 | |||
33 | FILES:${PN} += "${datadir}/dbus-1" | ||
34 | |||
35 | SYSTEMD_SERVICE:${PN} = "thermald.service" | ||
36 | |||
37 | COMPATIBLE_HOST = '(i.86|x86_64).*-linux' | ||
38 | |||
39 | CONFFILES:${PN} = " \ | ||
40 | ${sysconfdir}/thermald/thermal-conf.xml \ | ||
41 | ${sysconfdir}/thermald/thermal-cpu-cdev-order.xml \ | ||
42 | " | ||
43 | |||
44 | UPSTREAM_CHECK_URI = "https://github.com/01org/thermal_daemon/releases" | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Add-print-function-to-print-test-run-status-in-ptest.patch b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Add-print-function-to-print-test-run-status-in-ptest.patch new file mode 100644 index 00000000..4d583657 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Add-print-function-to-print-test-run-status-in-ptest.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From deccc0c69c2c8759c52885be8bdda54d3cee481c Mon Sep 17 00:00:00 2001 | ||
2 | From: Yogesh Tyagi <yogesh.tyagi@intel.com> | ||
3 | Date: Sun, 11 Dec 2022 22:34:15 +0800 | ||
4 | Subject: [PATCH] Add print function to print test run status in ptest format | ||
5 | |||
6 | Upstream-Status: Inappropriate [OE ptest specific] | ||
7 | |||
8 | Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com> | ||
9 | --- | ||
10 | run_tests.py | 16 ++++++++++++++++ | ||
11 | 1 file changed, 16 insertions(+) | ||
12 | |||
13 | diff --git a/run_tests.py b/run_tests.py | ||
14 | index 1cd796dd..e3ffd1ab 100755 | ||
15 | --- a/run_tests.py | ||
16 | +++ b/run_tests.py | ||
17 | @@ -327,6 +327,9 @@ def run_test(testname, host, target): | ||
18 | else: | ||
19 | ispc_exe_rel = add_prefix(host.ispc_cmd, host, target) | ||
20 | |||
21 | + # to reslove the error '.rodata' can not be used when making a PIE object | ||
22 | + ispc_exe_rel = ispc_exe_rel + " --pic" | ||
23 | + | ||
24 | # is this a test to make sure an error is issued? | ||
25 | want_error = (filename.find("tests_errors") != -1) | ||
26 | if want_error == True: | ||
27 | @@ -795,6 +798,17 @@ def check_compiler_exists(compiler_exe): | ||
28 | return | ||
29 | error("missing the required compiler: %s \n" % compiler_exe, 1) | ||
30 | |||
31 | +def print_test_run_status(results): | ||
32 | + for fstatus in results: | ||
33 | + if (fstatus[1] == Status.Success): | ||
34 | + print( "%s: %s" % ("PASS", fstatus[0])) | ||
35 | + elif (fstatus[1] == Status.Compfail): | ||
36 | + print( "%s: %s" % ("FAIL", fstatus[0])) | ||
37 | + elif (fstatus[1] == Status.Runfail): | ||
38 | + print( "%s: %s" % ("FAIL", fstatus[0])) | ||
39 | + elif (fstatus[1] == Status.Skip): | ||
40 | + print( "%s: %s" % ("SKIP", fstatus[0])) | ||
41 | + | ||
42 | def print_result(status, results, s, run_tests_log, csv): | ||
43 | title = StatusStr[status] | ||
44 | file_list = [fname for fname, fstatus in results if status == fstatus] | ||
45 | @@ -938,6 +952,8 @@ def run_tests(options1, args, print_version): | ||
46 | pass_rate = -1 | ||
47 | print_debug("PASSRATE (%d/%d) = %d%% \n\n" % (len(run_succeed_files), total_tests_executed, pass_rate), s, run_tests_log) | ||
48 | |||
49 | + print_test_run_status(results) | ||
50 | + | ||
51 | for status in Status: | ||
52 | print_result(status, results, s, run_tests_log, options.csv) | ||
53 | fails = [status != Status.Compfail and status != Status.Runfail for _, status in results] | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Fix-QA-Issues.patch b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Fix-QA-Issues.patch new file mode 100644 index 00000000..b0a76ff9 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Fix-QA-Issues.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From 7beff95c11071170eb27b6fa7d0cc77588caee8e Mon Sep 17 00:00:00 2001 | ||
2 | From: Yogesh Tyagi <yogesh.tyagi@intel.com> | ||
3 | Date: Tue, 26 Jul 2022 15:25:10 +0800 | ||
4 | Subject: [PATCH] Fix QA Issues | ||
5 | |||
6 | Stop ispc from inserting host file path in generated headers which leads to reproducibility problems. | ||
7 | |||
8 | Upstream-Status: Inappropriate [OE build specific] | ||
9 | |||
10 | Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com> | ||
11 | --- | ||
12 | src/module.cpp | 4 ++-- | ||
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/src/module.cpp b/src/module.cpp | ||
16 | index e2084d2e..e2626865 100644 | ||
17 | --- a/src/module.cpp | ||
18 | +++ b/src/module.cpp | ||
19 | @@ -2555,7 +2555,7 @@ bool Module::writeHeader(const char *fn) { | ||
20 | perror("fopen"); | ||
21 | return false; | ||
22 | } | ||
23 | - fprintf(f, "//\n// %s\n// (Header automatically generated by the ispc compiler.)\n", fn); | ||
24 | + fprintf(f, "//\n// \n// (Header automatically generated by the ispc compiler.)\n"); | ||
25 | fprintf(f, "// DO NOT EDIT THIS FILE.\n//\n\n"); | ||
26 | |||
27 | // Create a nice guard string from the filename, turning any | ||
28 | @@ -2677,7 +2677,7 @@ bool Module::writeDispatchHeader(DispatchHeaderInfo *DHI) { | ||
29 | FILE *f = DHI->file; | ||
30 | |||
31 | if (DHI->EmitFrontMatter) { | ||
32 | - fprintf(f, "//\n// %s\n// (Header automatically generated by the ispc compiler.)\n", DHI->fn); | ||
33 | + fprintf(f, "//\n// \n// (Header automatically generated by the ispc compiler.)\n"); | ||
34 | fprintf(f, "// DO NOT EDIT THIS FILE.\n//\n\n"); | ||
35 | } | ||
36 | // Create a nice guard string from the filename, turning any | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0002-cmake-don-t-build-for-32-bit-targets.patch b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0002-cmake-don-t-build-for-32-bit-targets.patch new file mode 100644 index 00000000..f452dc50 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0002-cmake-don-t-build-for-32-bit-targets.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From 16a2c22339287122d2c25d8bb33a5a51b4e6ee51 Mon Sep 17 00:00:00 2001 | ||
2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
3 | Date: Thu, 24 Feb 2022 20:01:11 +0530 | ||
4 | Subject: [PATCH] cmake: don't build for 32-bit targets | ||
5 | |||
6 | Error log: | ||
7 | | tmp/work/corei7-64-poky-linux/ispc/1.16.0-r0/recipe-sysroot/usr/include/bits/long-double.h:23:10: fatal error: 'bits/long-double-32.h' file not found | ||
8 | | #include <bits/long-double-32.h> | ||
9 | | ^~~~~~~~~~~~~~~~~~~~~~~ | ||
10 | | 1 error generated. | ||
11 | |||
12 | Remove SYSTEM include search path and set -isysroot dir path | ||
13 | for root dir for cross compilation. | ||
14 | |||
15 | Upstream-Status: Inappropriate | ||
16 | |||
17 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
18 | --- | ||
19 | cmake/GenerateBuiltins.cmake | 6 +++--- | ||
20 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
21 | |||
22 | diff --git a/cmake/GenerateBuiltins.cmake b/cmake/GenerateBuiltins.cmake | ||
23 | index f84494ed..d90cb1ec 100644 | ||
24 | --- a/cmake/GenerateBuiltins.cmake | ||
25 | +++ b/cmake/GenerateBuiltins.cmake | ||
26 | @@ -253,7 +253,7 @@ function(builtin_to_cpp bit os_name arch supported_archs supported_oses resultFi | ||
27 | # In this case headers will be installed in /usr/arm-linux-gnueabihf/include and will not be picked up | ||
28 | # by clang by default. So the following line adds such path explicitly. If this path doesn't exist and | ||
29 | # the headers can be found in other locations, this should not be a problem. | ||
30 | - set(includePath -isystem/usr/${debian_triple}/include) | ||
31 | + set(includePath -isysroot${SYSROOT_DIR}) | ||
32 | endif() | ||
33 | endif() | ||
34 | |||
35 | @@ -339,7 +339,7 @@ function (generate_target_builtins resultList) | ||
36 | set(regular_targets ${ARGN}) | ||
37 | list(FILTER regular_targets EXCLUDE REGEX wasm) | ||
38 | foreach (ispc_target ${regular_targets}) | ||
39 | - foreach (bit 32 64) | ||
40 | + foreach (bit 64) | ||
41 | foreach (os_name ${TARGET_OS_LIST_FOR_LL}) | ||
42 | target_ll_to_cpp(target-${ispc_target} ${bit} ${os_name} output${os_name}${bit}) | ||
43 | list(APPEND tmpList ${output${os_name}${bit}}) | ||
44 | @@ -405,7 +405,7 @@ function (generate_common_builtins resultList) | ||
45 | endif() | ||
46 | |||
47 | message (STATUS "ISPC will be built with support of ${supported_oses} for ${supported_archs}") | ||
48 | - foreach (bit 32 64) | ||
49 | + foreach (bit 64) | ||
50 | foreach (os_name "windows" "linux" "freebsd" "macos" "android" "ios" "ps4" "web") | ||
51 | foreach (arch "x86" "arm" "wasm") | ||
52 | builtin_to_cpp(${bit} ${os_name} ${arch} "${supported_archs}" "${supported_oses}" res${bit}${os_name}${arch}) | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/run-ptest b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/run-ptest new file mode 100644 index 00000000..77d13bb4 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/run-ptest | |||
@@ -0,0 +1,2 @@ | |||
1 | #!/bin/sh | ||
2 | python3 run_tests.py | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc_1.24.0.bb b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc_1.24.0.bb new file mode 100644 index 00000000..77797041 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc_1.24.0.bb | |||
@@ -0,0 +1,64 @@ | |||
1 | SUMMARY = "Intel(R) Implicit SPMD Program Compiler" | ||
2 | DESCRIPTION = "ispc is a compiler for a variant of the C programming language, \ | ||
3 | with extensions for single program, multiple data programming." | ||
4 | HOMEPAGE = "https://github.com/ispc/ispc" | ||
5 | |||
6 | LICENSE = "BSD-3-Clause & Apache-2.0-with-LLVM-exception" | ||
7 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=da5ecffdd210b3cf776b32b41c182e87 \ | ||
8 | file://third-party-programs.txt;md5=2061218c7be521556719c8b504bf9ddd" | ||
9 | |||
10 | inherit cmake python3native ptest | ||
11 | |||
12 | S = "${WORKDIR}/git" | ||
13 | |||
14 | SRC_URI = "git://github.com/ispc/ispc.git;protocol=https;branch=main \ | ||
15 | file://0002-cmake-don-t-build-for-32-bit-targets.patch \ | ||
16 | file://0001-Fix-QA-Issues.patch \ | ||
17 | file://0001-Add-print-function-to-print-test-run-status-in-ptest.patch \ | ||
18 | file://run-ptest \ | ||
19 | " | ||
20 | |||
21 | SRCREV = "d394222aef59e4759b06e39ec160e4aba6ee5f40" | ||
22 | |||
23 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
24 | |||
25 | DEPENDS += " clang-native bison-native flex-native" | ||
26 | DEPENDS:append:class-target = " clang" | ||
27 | RDEPENDS:${PN}-ptest += " python3-multiprocessing" | ||
28 | |||
29 | PACKAGECONFIG ??= "tbb" | ||
30 | PACKAGECONFIG[tbb] = "-DISPCRT_BUILD_TASK_MODEL=TBB, -DISPCRT_BUILD_TASK_MODEL=OpenMP, tbb" | ||
31 | |||
32 | YFLAGS = '-d -t -v -y --file-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}' | ||
33 | |||
34 | do_configure:prepend() { | ||
35 | sed -i -e 's#\${BISON_EXECUTABLE}.*#\${BISON_EXECUTABLE} ${YFLAGS} #g' ${S}/CMakeLists.txt | ||
36 | sed -i -e 's#\${FLEX_EXECUTABLE}.*#\${FLEX_EXECUTABLE} \-L #g' ${S}/CMakeLists.txt | ||
37 | } | ||
38 | |||
39 | do_install_ptest() { | ||
40 | cp -rf ${S}/run_tests.py ${D}${PTEST_PATH} | ||
41 | cp -rf ${S}/common.py ${D}${PTEST_PATH} | ||
42 | cp -rf ${S}/tests ${D}${PTEST_PATH} | ||
43 | cp -rf ${S}/test_static.isph ${D}${PTEST_PATH} | ||
44 | cp -rf ${S}/fail_db.txt ${D}${PTEST_PATH} | ||
45 | cp -rf ${S}/test_static.cpp ${D}${PTEST_PATH} | ||
46 | } | ||
47 | |||
48 | EXTRA_OECMAKE += " \ | ||
49 | -DISPC_INCLUDE_TESTS=OFF \ | ||
50 | -DISPC_INCLUDE_EXAMPLES=OFF \ | ||
51 | -DARM_ENABLED=OFF \ | ||
52 | -DISPC_CROSS=ON \ | ||
53 | -DISPC_ANDROID_TARGET=OFF \ | ||
54 | -DISPC_FREEBSD_TARGET=OFF \ | ||
55 | -DISPC_WINDOWS_TARGET=OFF \ | ||
56 | -DISPC_IOS_TARGET=OFF \ | ||
57 | -DISPC_PS_TARGET=OFF \ | ||
58 | -DSYSROOT_DIR=${STAGING_DIR} \ | ||
59 | -DCLANG_EXECUTABLE=${STAGING_BINDIR_NATIVE}/clang \ | ||
60 | -DCLANGPP_EXECUTABLE=${STAGING_BINDIR_NATIVE}/clang++ \ | ||
61 | -DLLVM_AS_EXECUTABLE=${STAGING_BINDIR_NATIVE}/llvm-as \ | ||
62 | " | ||
63 | |||
64 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-core/levelzero/level-zero_1.21.1.bb b/dynamic-layers/openembedded-layer/recipes-core/levelzero/level-zero_1.21.1.bb new file mode 100644 index 00000000..2e022f4a --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-core/levelzero/level-zero_1.21.1.bb | |||
@@ -0,0 +1,33 @@ | |||
1 | SUMMARY = "oneAPI Level Zero Specification Headers and Loader" | ||
2 | HOMEPAGE = "https://github.com/oneapi-src/level-zero" | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=97957beb2f7808ffa247e5d93e6442cc" | ||
5 | |||
6 | SRC_URI = "git://github.com/oneapi-src/level-zero.git;protocol=https;branch=master" | ||
7 | SRCREV = "9536683855b17a21508e5b54ba358225d6a976da" | ||
8 | S = "${WORKDIR}/git" | ||
9 | |||
10 | inherit cmake | ||
11 | DEPENDS += "opencl-headers" | ||
12 | |||
13 | UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>(\d+(\.\d+)+))$" | ||
14 | |||
15 | PACKAGES =+ "${PN}-headers ${PN}-samples ${PN}-loader" | ||
16 | |||
17 | do_install:append () { | ||
18 | install -d ${D}${bindir} ${D}${libdir} | ||
19 | install -m 755 ${B}/bin/zello* ${D}${bindir} | ||
20 | |||
21 | oe_libinstall -C lib libze_null ${D}${libdir} | ||
22 | } | ||
23 | |||
24 | |||
25 | FILES:${PN}-headers = "${includedir}" | ||
26 | FILES:${PN}-samples = "${bindir} ${libdir}/libze_null* ${libdir}/libze_validation*" | ||
27 | FILES:${PN}-loader = "${libdir}" | ||
28 | |||
29 | # PN-loader (non -dev/-dbg/nativesdk- package) contains symlink .so | ||
30 | INSANE_SKIP:${PN}-loader = "dev-so" | ||
31 | INSANE_SKIP:${PN}-samples = "dev-so" | ||
32 | ALLOW_EMPTY:${PN} = "1" | ||
33 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-core/linux-npu-driver/linux-npu-driver/0001-Fix-the-compilation-warning-when-using-gcc-13-25.patch b/dynamic-layers/openembedded-layer/recipes-core/linux-npu-driver/linux-npu-driver/0001-Fix-the-compilation-warning-when-using-gcc-13-25.patch new file mode 100644 index 00000000..2748d7ab --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-core/linux-npu-driver/linux-npu-driver/0001-Fix-the-compilation-warning-when-using-gcc-13-25.patch | |||
@@ -0,0 +1,99 @@ | |||
1 | From b57297c14d94dac9bdef7570b7b33d70b10171f3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jozef Wludzik <jozef.wludzik@intel.com> | ||
3 | Date: Tue, 26 Mar 2024 14:43:29 +0100 | ||
4 | Subject: [PATCH 1/2] Fix the compilation warning when using gcc-13 (#25) | ||
5 | |||
6 | Added missing headers. Fixed compilation error about casting from | ||
7 | unsigned to signed int. | ||
8 | |||
9 | Upstream-Status: Backport [https://github.com/intel/linux-npu-driver/commit/4bcbf2abe94eb4d9c083bd616b58e309a82d008a] | ||
10 | |||
11 | Signed-off-by: Jozef Wludzik <jozef.wludzik@intel.com> | ||
12 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
13 | --- | ||
14 | umd/level_zero_driver/ext/source/graph/vcl_symbols.hpp | 7 ++++--- | ||
15 | umd/vpu_driver/include/umd_common.hpp | 1 + | ||
16 | validation/umd-test/umd_prime_buffers.h | 9 +++++++-- | ||
17 | validation/umd-test/utilities/data_handle.h | 1 + | ||
18 | 4 files changed, 13 insertions(+), 5 deletions(-) | ||
19 | |||
20 | diff --git a/umd/level_zero_driver/ext/source/graph/vcl_symbols.hpp b/umd/level_zero_driver/ext/source/graph/vcl_symbols.hpp | ||
21 | index f206ebe..682e5b4 100644 | ||
22 | --- a/umd/level_zero_driver/ext/source/graph/vcl_symbols.hpp | ||
23 | +++ b/umd/level_zero_driver/ext/source/graph/vcl_symbols.hpp | ||
24 | @@ -5,12 +5,13 @@ | ||
25 | * | ||
26 | */ | ||
27 | |||
28 | -#include <dlfcn.h> | ||
29 | -#include <memory> | ||
30 | - | ||
31 | #include "vpux_driver_compiler.h" | ||
32 | #include "vpu_driver/source/utilities/log.hpp" | ||
33 | |||
34 | +#include <array> | ||
35 | +#include <dlfcn.h> | ||
36 | +#include <memory> | ||
37 | + | ||
38 | class Vcl { | ||
39 | public: | ||
40 | static Vcl &sym() { | ||
41 | diff --git a/umd/vpu_driver/include/umd_common.hpp b/umd/vpu_driver/include/umd_common.hpp | ||
42 | index 0c874a3..5ad9be2 100644 | ||
43 | --- a/umd/vpu_driver/include/umd_common.hpp | ||
44 | +++ b/umd/vpu_driver/include/umd_common.hpp | ||
45 | @@ -7,6 +7,7 @@ | ||
46 | |||
47 | #pragma once | ||
48 | |||
49 | +#include <cstdint> | ||
50 | #include <limits> | ||
51 | #include <linux/kernel.h> | ||
52 | #include <stdexcept> | ||
53 | diff --git a/validation/umd-test/umd_prime_buffers.h b/validation/umd-test/umd_prime_buffers.h | ||
54 | index 6f7c7de..ab4814c 100644 | ||
55 | --- a/validation/umd-test/umd_prime_buffers.h | ||
56 | +++ b/validation/umd-test/umd_prime_buffers.h | ||
57 | @@ -6,12 +6,17 @@ | ||
58 | */ | ||
59 | |||
60 | #pragma once | ||
61 | + | ||
62 | +#include "umd_test.h" | ||
63 | + | ||
64 | #include <fcntl.h> | ||
65 | -#include <linux/kernel.h> | ||
66 | #include <linux/dma-buf.h> | ||
67 | #include <linux/dma-heap.h> | ||
68 | +#include <linux/kernel.h> | ||
69 | +#include <stdint.h> | ||
70 | #include <sys/ioctl.h> | ||
71 | #include <sys/mman.h> | ||
72 | +#include <unistd.h> | ||
73 | |||
74 | #define ALLIGN_TO_PAGE(x) __ALIGN_KERNEL((x), (UmdTest::PAGE_SIZE)) | ||
75 | |||
76 | @@ -60,7 +65,7 @@ class PrimeBufferHelper { | ||
77 | return false; | ||
78 | |||
79 | bufferFd = heapAlloc.fd; | ||
80 | - buffers.insert({heapAlloc.fd, {size, nullptr}}); | ||
81 | + buffers.insert({static_cast<int>(heapAlloc.fd), {size, nullptr}}); | ||
82 | return true; | ||
83 | } | ||
84 | |||
85 | diff --git a/validation/umd-test/utilities/data_handle.h b/validation/umd-test/utilities/data_handle.h | ||
86 | index d6e0ec0..5d937b2 100644 | ||
87 | --- a/validation/umd-test/utilities/data_handle.h | ||
88 | +++ b/validation/umd-test/utilities/data_handle.h | ||
89 | @@ -6,6 +6,7 @@ | ||
90 | */ | ||
91 | |||
92 | #include <linux/kernel.h> | ||
93 | +#include <stdint.h> | ||
94 | #include <string> | ||
95 | #include <vector> | ||
96 | |||
97 | -- | ||
98 | 2.43.0 | ||
99 | |||
diff --git a/dynamic-layers/openembedded-layer/recipes-core/linux-npu-driver/linux-npu-driver/0001-linux-npu-driver-fix-multilib-install-issue.patch b/dynamic-layers/openembedded-layer/recipes-core/linux-npu-driver/linux-npu-driver/0001-linux-npu-driver-fix-multilib-install-issue.patch new file mode 100644 index 00000000..71a60b20 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-core/linux-npu-driver/linux-npu-driver/0001-linux-npu-driver-fix-multilib-install-issue.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From 561e3b5edc0ec3d8835aaf8ef8e5c9e8f9b53061 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yogesh Tyagi <yogesh.tyagi@intel.com> | ||
3 | Date: Wed, 28 May 2025 13:35:18 +0800 | ||
4 | Subject: [PATCH] linux-npu-driver : fix multilib install issue | ||
5 | |||
6 | Upstream-Status: Inappropriate [oe specific] | ||
7 | |||
8 | Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com> | ||
9 | --- | ||
10 | firmware/CMakeLists.txt | 2 +- | ||
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/firmware/CMakeLists.txt b/firmware/CMakeLists.txt | ||
14 | index 0c093ca..ba346a0 100644 | ||
15 | --- a/firmware/CMakeLists.txt | ||
16 | +++ b/firmware/CMakeLists.txt | ||
17 | @@ -12,7 +12,7 @@ target_include_directories(${PROJECT_NAME} INTERFACE include) | ||
18 | file(GLOB FIRMWARE_BINARIES ${CMAKE_CURRENT_SOURCE_DIR}/bin/*.bin) | ||
19 | if (FIRMWARE_BINARIES) | ||
20 | install(FILES ${FIRMWARE_BINARIES} | ||
21 | - DESTINATION /lib/firmware/updates/intel/vpu/ | ||
22 | + DESTINATION ${CMAKE_INSTALL_FIRMWARE_DIR}/firmware/updates/intel/vpu/ | ||
23 | PERMISSIONS OWNER_READ | ||
24 | COMPONENT fw-npu) | ||
25 | endif() | ||
26 | -- | ||
27 | 2.37.3 | ||
28 | |||
diff --git a/dynamic-layers/openembedded-layer/recipes-core/linux-npu-driver/linux-npu-driver/0002-Fix-compilation-failure-with-GCC-14.patch b/dynamic-layers/openembedded-layer/recipes-core/linux-npu-driver/linux-npu-driver/0002-Fix-compilation-failure-with-GCC-14.patch new file mode 100644 index 00000000..9fb97354 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-core/linux-npu-driver/linux-npu-driver/0002-Fix-compilation-failure-with-GCC-14.patch | |||
@@ -0,0 +1,110 @@ | |||
1 | From a9f51fd88effb7d324609e692ca7da576d6dad2e Mon Sep 17 00:00:00 2001 | ||
2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
3 | Date: Tue, 28 May 2024 10:23:42 +0800 | ||
4 | Subject: [PATCH 2/2] Fix compilation failure with GCC-14 | ||
5 | |||
6 | umd/level_zero_driver/core/source/event/event.cpp:65:31: error: 'remove_if' is not a member of 'std'; did you mean 'remove_cv'? | ||
7 | | 65 | associatedJobs.erase(std::remove_if(associatedJobs.begin(), | ||
8 | | | ^~~~~~~~~ | ||
9 | | | remove_cv | ||
10 | |||
11 | | umd/vpu_driver/source/command/vpu_command.cpp: In member function 'void VPU::VPUCommand::appendAssociateBufferObject(VPU::VPUBufferObject*)': | ||
12 | | umd/vpu_driver/source/command/vpu_command.cpp:126:20: error: 'find' is not a member of 'std'; did you mean 'bind'? | ||
13 | | 126 | auto it = std::find(bufferObjects.begin(), bufferObjects.end(), bo); | ||
14 | | | ^~~~ | ||
15 | | | bind | ||
16 | |||
17 | | umd/vpu_driver/source/command/vpu_command_buffer.cpp: In member function 'bool VPU::VPUCommandBuffer::addCommand(VPU::VPUCommand*, uint64_t&, uint64_t&)': | ||
18 | | umd/vpu_driver/source/command/vpu_command_buffer.cpp:185:24: error: 'find' is not a member of 'std'; did you mean 'bind'? | ||
19 | | 185 | auto it = std::find(bufferHandles.begin(), bufferHandles.end(), bo->getHandle()); | ||
20 | | | ^~~~ | ||
21 | | | bind | ||
22 | |||
23 | | umd/level_zero_driver/ext/source/graph/elf_parser.cpp:301:32: error: 'max_element' is not a member of 'std'; did you mean 'tuple_element'? | ||
24 | | 301 | std::max_element(stride_begin + TENSOR_5D_STRIDE_C, stride_end)); | ||
25 | | | ^~~~~~~~~~~ | ||
26 | | | tuple_element | ||
27 | | umd/level_zero_driver/ext/source/graph/elf_parser.cpp:315:37: error: 'max_element' is not a member of 'std'; did you mean 'tuple_element'? | ||
28 | | 315 | auto max_stride_val = *std::max_element(stride_begin + TENSOR_4D_STRIDE_C, stride_end); | ||
29 | | | ^~~~~~~~~~~ | ||
30 | |||
31 | | umd/level_zero_driver/tools/source/metrics/metric.cpp: In member function 'void L0::MetricContext::deactivateMetricGroups(int)': | ||
32 | | umd/level_zero_driver/tools/source/metrics/metric.cpp:275:38: error: 'remove_if' is not a member of 'std'; did you mean 'remove_cv'? | ||
33 | | 275 | activatedMetricGroups.erase(std::remove_if(activatedMetricGroups.begin(), | ||
34 | | | ^~~~~~~~~ | ||
35 | | | remove_cv | ||
36 | |||
37 | Upstream-Status: Submitted [https://github.com/intel/linux-npu-driver/pull/30] | ||
38 | |||
39 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
40 | --- | ||
41 | umd/level_zero_driver/core/source/event/event.cpp | 1 + | ||
42 | umd/level_zero_driver/ext/source/graph/elf_parser.cpp | 1 + | ||
43 | umd/level_zero_driver/tools/source/metrics/metric.cpp | 1 + | ||
44 | umd/vpu_driver/source/command/vpu_command.cpp | 1 + | ||
45 | umd/vpu_driver/source/command/vpu_command_buffer.cpp | 1 + | ||
46 | 5 files changed, 5 insertions(+) | ||
47 | |||
48 | diff --git a/umd/level_zero_driver/core/source/event/event.cpp b/umd/level_zero_driver/core/source/event/event.cpp | ||
49 | index a92248f..196d176 100644 | ||
50 | --- a/umd/level_zero_driver/core/source/event/event.cpp | ||
51 | +++ b/umd/level_zero_driver/core/source/event/event.cpp | ||
52 | @@ -14,6 +14,7 @@ | ||
53 | |||
54 | #include <level_zero/ze_api.h> | ||
55 | #include <thread> | ||
56 | +#include <algorithm> | ||
57 | |||
58 | namespace L0 { | ||
59 | |||
60 | diff --git a/umd/level_zero_driver/ext/source/graph/elf_parser.cpp b/umd/level_zero_driver/ext/source/graph/elf_parser.cpp | ||
61 | index a1c8e14..dfbd61d 100644 | ||
62 | --- a/umd/level_zero_driver/ext/source/graph/elf_parser.cpp | ||
63 | +++ b/umd/level_zero_driver/ext/source/graph/elf_parser.cpp | ||
64 | @@ -21,6 +21,7 @@ | ||
65 | #include <vpux_headers/metadata.hpp> | ||
66 | #include <vpux_elf/types/vpu_extensions.hpp> | ||
67 | #include <vpux_elf/utils/error.hpp> | ||
68 | +#include <algorithm> | ||
69 | |||
70 | namespace L0 { | ||
71 | |||
72 | diff --git a/umd/level_zero_driver/tools/source/metrics/metric.cpp b/umd/level_zero_driver/tools/source/metrics/metric.cpp | ||
73 | index b67750f..9497311 100644 | ||
74 | --- a/umd/level_zero_driver/tools/source/metrics/metric.cpp | ||
75 | +++ b/umd/level_zero_driver/tools/source/metrics/metric.cpp | ||
76 | @@ -7,6 +7,7 @@ | ||
77 | |||
78 | #include "level_zero_driver/tools/source/metrics/metric.hpp" | ||
79 | #include "vpu_driver/source/utilities/log.hpp" | ||
80 | +#include <algorithm> | ||
81 | |||
82 | namespace L0 { | ||
83 | |||
84 | diff --git a/umd/vpu_driver/source/command/vpu_command.cpp b/umd/vpu_driver/source/command/vpu_command.cpp | ||
85 | index f4ca23f..75331d9 100644 | ||
86 | --- a/umd/vpu_driver/source/command/vpu_command.cpp | ||
87 | +++ b/umd/vpu_driver/source/command/vpu_command.cpp | ||
88 | @@ -14,6 +14,7 @@ | ||
89 | #include <cstdint> | ||
90 | #include <vector> | ||
91 | #include <map> | ||
92 | +#include <algorithm> | ||
93 | |||
94 | namespace VPU { | ||
95 | |||
96 | diff --git a/umd/vpu_driver/source/command/vpu_command_buffer.cpp b/umd/vpu_driver/source/command/vpu_command_buffer.cpp | ||
97 | index c4ad052..bbb80ec 100644 | ||
98 | --- a/umd/vpu_driver/source/command/vpu_command_buffer.cpp | ||
99 | +++ b/umd/vpu_driver/source/command/vpu_command_buffer.cpp | ||
100 | @@ -11,6 +11,7 @@ | ||
101 | #include "vpu_driver/source/command/vpu_command_buffer.hpp" | ||
102 | #include "vpu_driver/source/command/vpu_copy_command.hpp" | ||
103 | #include "vpu_driver/source/utilities/log.hpp" | ||
104 | +#include <algorithm> | ||
105 | |||
106 | namespace VPU { | ||
107 | |||
108 | -- | ||
109 | 2.43.0 | ||
110 | |||
diff --git a/dynamic-layers/openembedded-layer/recipes-core/linux-npu-driver/linux-npu-driver_1.17.0.bb b/dynamic-layers/openembedded-layer/recipes-core/linux-npu-driver/linux-npu-driver_1.17.0.bb new file mode 100644 index 00000000..2014e448 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-core/linux-npu-driver/linux-npu-driver_1.17.0.bb | |||
@@ -0,0 +1,45 @@ | |||
1 | SUMMARY = "User Mode Driver for IntelĀ® NPU device" | ||
2 | HOMEPAGE = "https://github.com/intel/linux-npu-driver" | ||
3 | LICENSE = "MIT & Apache-2.0" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=7b256470048be42466f7d10e1d6482e6 \ | ||
5 | file://third-party-programs.txt;md5=0ae40d7f1ef3bbd509197e427fdd7e70 \ | ||
6 | file://third_party/vpux_elf/LICENSE;md5=a7a2dfa2b52a22cf2257893ee87ba11c" | ||
7 | |||
8 | SRC_URI = "git://github.com/intel/linux-npu-driver.git;protocol=https;name=linux-npu-driver;branch=main;lfs=1 \ | ||
9 | git://github.com/openvinotoolkit/npu_plugin_elf.git;protocol=https;destsuffix=git/third_party/vpux_elf;name=vpux-elf;nobranch=1 \ | ||
10 | git://github.com/jbeder/yaml-cpp.git;protocol=https;destsuffix=git/third_party/yaml-cpp;name=yaml-cpp;nobranch=1 \ | ||
11 | git://github.com/intel/level-zero-npu-extensions.git;protocol=https;destsuffix=git/third_party/level-zero-npu-extensions;name=lzvext;nobranch=1 \ | ||
12 | git://github.com/google/googletest.git;protocol=https;destsuffix=git/third_party/googletest;name=googletest;nobranch=1 \ | ||
13 | file://0001-linux-npu-driver-fix-multilib-install-issue.patch \ | ||
14 | " | ||
15 | |||
16 | SRCREV_linux-npu-driver = "0fe92dd0720448fb571f0ac4e5e64ef9f2ec3bd7" | ||
17 | SRCREV_vpux-elf = "50f2b13dbb6dd435c3e2ef6f8abb7393633bfcdd" | ||
18 | SRCREV_yaml-cpp = "f7320141120f720aecc4c32be25586e7da9eb978" | ||
19 | SRCREV_lzvext = "c7d8f849d6a8195c1db38cbaca8d431cbabf3a6e" | ||
20 | SRCREV_googletest = "b514bdc898e2951020cbdca1304b75f5950d1f59" | ||
21 | SRCREV_FORMAT = "linux-npu-driver_vpux-elf_yaml-cpp_lzvext_googletest" | ||
22 | |||
23 | S = "${WORKDIR}/git" | ||
24 | |||
25 | inherit cmake | ||
26 | |||
27 | |||
28 | # Fix warning _FORTIFY_SOURCE requires compiling with optimization (-O) | ||
29 | EXTRA_OECMAKE += " -DCMAKE_BUILD_TYPE=Release " | ||
30 | EXTRA_OECMAKE += " -DCMAKE_CXX_FLAGS_RELEASE=-O2 " | ||
31 | |||
32 | EXTRA_OECMAKE += " -DCMAKE_CXX_FLAGS='-I${RECIPE_SYSROOT}/usr/include/level_zero'" | ||
33 | EXTRA_OECMAKE += " -DCMAKE_INSTALL_FIRMWARE_DIR=${nonarch_base_libdir}" | ||
34 | |||
35 | DEPENDS = "level-zero dpkg-native pkgconfig-native" | ||
36 | |||
37 | PACKAGES =+ "${PN}-firmware ${PN}-tests" | ||
38 | |||
39 | FILES:${PN}-firmware = "${nonarch_base_libdir}/firmware/updates/intel/vpu/*" | ||
40 | FILES:${PN}-tests = "${bindir}" | ||
41 | |||
42 | INSANE_SKIP:${PN} += "buildpaths" | ||
43 | INSANE_SKIP:${PN}-dbg += "buildpaths" | ||
44 | INSANE_SKIP:${PN}-tests += "buildpaths" | ||
45 | INSANE_SKIP:${PN}-firmware += "buildpaths" | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-oneapi/dpcpp-compiler/intel-oneapi-dpcpp-cpp-runtime_2024.0.0-49819.bb b/dynamic-layers/openembedded-layer/recipes-oneapi/dpcpp-compiler/intel-oneapi-dpcpp-cpp-runtime_2024.0.0-49819.bb new file mode 100644 index 00000000..d881610f --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-oneapi/dpcpp-compiler/intel-oneapi-dpcpp-cpp-runtime_2024.0.0-49819.bb | |||
@@ -0,0 +1,54 @@ | |||
1 | SUMMARY = "IntelĀ® oneAPI DPC++/C++ Compiler runtime files" | ||
2 | DESCRIPTION = "The IntelĀ® oneAPI DPC++/C++ Compiler provides optimizations \ | ||
3 | that help your applications run faster on IntelĀ® 64 architectures with support \ | ||
4 | for the latest C, C++, and SYCL language standards. This compiler produces \ | ||
5 | optimized code that can run significantly faster by taking advantage of the \ | ||
6 | ever-increasing core count and vector register width in IntelĀ® XeonĀ® processors \ | ||
7 | and compatible processors." | ||
8 | |||
9 | HOMEPAGE = "https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler.html" | ||
10 | |||
11 | LICENSE = "EULA" | ||
12 | |||
13 | COMPILERMAINVER = "2024.0" | ||
14 | |||
15 | LIC_FILES_CHKSUM = " \ | ||
16 | file://opt/intel/oneapi/licensing/${COMPILERMAINVER}/licensing/${COMPILERMAINVER}/license.htm;md5=5ff64c6ff3ef98089ed69360e7a84c39 \ | ||
17 | " | ||
18 | COMPILERDOTVER = "2024.0.0-49406" | ||
19 | DEVUTILITVERSION = "2024.0-2024.0.0-49320" | ||
20 | SRC_URI = " \ | ||
21 | https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-compiler-dpcpp-cpp-runtime-${COMPILERMAINVER}-${PV}_amd64.deb;subdir=${BPN};name=dpcpp-runtime \ | ||
22 | https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-compiler-dpcpp-cpp-common-${COMPILERMAINVER}-${PV}_all.deb;subdir=${BPN};name=dpcpp-common \ | ||
23 | https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-compiler-shared-runtime-${COMPILERMAINVER}-${PV}_amd64.deb;subdir=${BPN};name=compiler-shared-runtime \ | ||
24 | https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-common-vars-${COMPILERDOTVER}_all.deb;subdir=${BPN};name=common-vars \ | ||
25 | https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-openmp-${COMPILERMAINVER}-${PV}_amd64.deb;subdir=${BPN};name=openmp \ | ||
26 | https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-openmp-common-${COMPILERMAINVER}-${PV}_all.deb;subdir=${BPN};name=openmp-common \ | ||
27 | https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-common-licensing-${COMPILERMAINVER}-${COMPILERDOTVER}_all.deb;subdir=${BPN};name=license \ | ||
28 | https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-dev-utilities-${DEVUTILITVERSION}_amd64.deb;subdir=${BPN};name=dev-utils \ | ||
29 | " | ||
30 | |||
31 | SRC_URI[dpcpp-runtime.sha256sum] = "e24f0ba69daf3f66ceaf23d5e632f183cdb90bac69f65407fdb4407fc9034f33" | ||
32 | SRC_URI[dpcpp-common.sha256sum] = "f5a3db6a725598224edf1099260955aee3e36beadcaed2af5b8b453e873a82fa" | ||
33 | SRC_URI[compiler-shared-runtime.sha256sum] = "bce010cbe076259ddd3feb8e69792869e22fccd5b4e2c9af9e815826f2c1a394" | ||
34 | SRC_URI[common-vars.sha256sum] = "368553c99db1b52060b8225355336778be0b00e5991d0f769c42f891c6328750" | ||
35 | SRC_URI[openmp.sha256sum] = "154ff1e81adfdc872ba1d47bd860de70d62188417c7128422435dfd0ceca62fe" | ||
36 | SRC_URI[openmp-common.sha256sum] = "8217001d78311cbef97dd139e684c6767932b532309c3843ba57d7894d15c07d" | ||
37 | SRC_URI[license.sha256sum] = "9f9c8a12fc0bc82ab5b71e118e66745eff23f42224eba304068225b366cd74b6" | ||
38 | SRC_URI[dev-utils.sha256sum] = "c675d960a5abca361cead9217d6e74adee499ee0a095c4e44092bd710b304d50" | ||
39 | |||
40 | S = "${WORKDIR}/${BPN}" | ||
41 | |||
42 | inherit bin_package | ||
43 | |||
44 | RDEPENDS:${PN} += "virtual-opencl-icd zlib tbb level-zero-loader bash tcsh" | ||
45 | SKIP_FILEDEPS:${PN} = '1' | ||
46 | |||
47 | INHIBIT_PACKAGE_STRIP = "1" | ||
48 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
49 | |||
50 | # doesn't have GNU_HASH (didn't pass LDFLAGS?) | ||
51 | INSANE_SKIP:${PN} += "textrel dev-so dev-elf ldflags already-stripped staticdev rpaths arch useless-rpaths file-rdeps" | ||
52 | |||
53 | FILES_SOLIBSDEV = "" | ||
54 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-oneapi/dpcpp-compiler/intel-oneapi-dpcpp-cpp_2024.0.0-49819.bb b/dynamic-layers/openembedded-layer/recipes-oneapi/dpcpp-compiler/intel-oneapi-dpcpp-cpp_2024.0.0-49819.bb new file mode 100644 index 00000000..74af3f93 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-oneapi/dpcpp-compiler/intel-oneapi-dpcpp-cpp_2024.0.0-49819.bb | |||
@@ -0,0 +1,45 @@ | |||
1 | SUMMARY = "IntelĀ® oneAPI DPC++/C++ Compiler" | ||
2 | DESCRIPTION = "The IntelĀ® oneAPI DPC++/C++ Compiler provides optimizations \ | ||
3 | that help your applications run faster on IntelĀ® 64 architectures with support \ | ||
4 | for the latest C, C++, and SYCL language standards. This compiler produces \ | ||
5 | optimized code that can run significantly faster by taking advantage of the \ | ||
6 | ever-increasing core count and vector register width in IntelĀ® XeonĀ® processors \ | ||
7 | and compatible processors." | ||
8 | |||
9 | HOMEPAGE = "https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler.html" | ||
10 | |||
11 | LICENSE = "EULA" | ||
12 | |||
13 | COMPILERMAINVER = "2024.0" | ||
14 | |||
15 | LIC_FILES_CHKSUM = " \ | ||
16 | file://opt/intel/oneapi/compiler/${COMPILERMAINVER}/share/doc/compiler/credist.txt;md5=b41f55af9f479b9570fc35b955d5ba1a \ | ||
17 | " | ||
18 | |||
19 | SRC_URI = " \ | ||
20 | https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-dpcpp-cpp-${COMPILERMAINVER}-${PV}_amd64.deb;subdir=${BPN};name=icx-compiler \ | ||
21 | https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-compiler-shared-${COMPILERMAINVER}-${PV}_amd64.deb;subdir=${BPN};name=compiler-linker \ | ||
22 | https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-compiler-shared-common-${COMPILERMAINVER}-${PV}_all.deb;subdir=${BPN};name=shared-common \ | ||
23 | " | ||
24 | |||
25 | SRC_URI[icx-compiler.sha256sum] = "0dcbac766d5a1519d4cf393f5a85e71d19024fef65f77638f3f849796b62cd82" | ||
26 | SRC_URI[compiler-linker.sha256sum] = "e00faea6d797934d62143e4aa70b727ce30f80fdf30769d22122b3051140c236" | ||
27 | SRC_URI[shared-common.sha256sum] = "cf490a4a790f349da79e618359598d3b32312ca3b2639e5d4c84e1cfa2745558" | ||
28 | |||
29 | S = "${WORKDIR}/${BPN}" | ||
30 | |||
31 | inherit bin_package | ||
32 | |||
33 | RDEPENDS:${PN} += "intel-oneapi-dpcpp-cpp-runtime" | ||
34 | SKIP_FILEDEPS:${PN} = '1' | ||
35 | |||
36 | INHIBIT_PACKAGE_STRIP = "1" | ||
37 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
38 | |||
39 | # doesn't have GNU_HASH (didn't pass LDFLAGS?) | ||
40 | INSANE_SKIP:${PN} += "textrel dev-so dev-elf ldflags already-stripped file-rdeps staticdev rpaths arch useless-rpaths" | ||
41 | |||
42 | FILES_SOLIBSDEV = "" | ||
43 | |||
44 | EXCLUDE_FROM_SHLIBS = "1" | ||
45 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-oneapi/embree/embree_4.3.3.bb b/dynamic-layers/openembedded-layer/recipes-oneapi/embree/embree_4.3.3.bb new file mode 100644 index 00000000..416deec1 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-oneapi/embree/embree_4.3.3.bb | |||
@@ -0,0 +1,32 @@ | |||
1 | SUMMARY = "Collection of high-performance ray tracing kernels" | ||
2 | DESCRIPTION = "A collection of high-performance ray tracing kernels \ | ||
3 | intended to graphics application engineers that want to improve the \ | ||
4 | performance of their application." | ||
5 | HOMEPAGE = "https://github.com/embree/embree" | ||
6 | |||
7 | LICENSE = "Apache-2.0 & BSD-3-Clause" | ||
8 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57 \ | ||
9 | file://third-party-programs.txt;md5=f989f5b74cfff0d45d3ccf0e1366cbdc \ | ||
10 | file://common/math/transcendental.h;beginline=6;endline=8;md5=73380bb2ab6613b30b8464f114bd0ca8" | ||
11 | |||
12 | inherit pkgconfig cmake | ||
13 | |||
14 | S = "${WORKDIR}/git" | ||
15 | |||
16 | SRC_URI = "git://github.com/embree/embree.git;protocol=https;branch=master" | ||
17 | SRCREV = "5730b150471602d6dc02d9b7d8a4a6ce9ceffe16" | ||
18 | |||
19 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
20 | COMPATIBLE_HOST:libc-musl = "null" | ||
21 | |||
22 | DEPENDS = "tbb jpeg libpng glfw ispc-native" | ||
23 | |||
24 | EXTRA_OECMAKE += " \ | ||
25 | -DEMBREE_IGNORE_CMAKE_CXX_FLAGS=OFF \ | ||
26 | -DEMBREE_MAX_ISA=DEFAULT \ | ||
27 | -DEMBREE_TUTORIALS=OFF \ | ||
28 | -DEMBREE_ISPC_SUPPORT=ON \ | ||
29 | -DEMBREE_ZIP_MODE=OFF \ | ||
30 | " | ||
31 | |||
32 | UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>(\d+(\.\d+)+))$" | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-oneapi/ipp/intel-oneapi-ipp_2021.10.0-653.bb b/dynamic-layers/openembedded-layer/recipes-oneapi/ipp/intel-oneapi-ipp_2021.10.0-653.bb new file mode 100644 index 00000000..1841253e --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-oneapi/ipp/intel-oneapi-ipp_2021.10.0-653.bb | |||
@@ -0,0 +1,35 @@ | |||
1 | DESCRIPTION = "IntelĀ® Integrated Performance Primitives are production-ready \ | ||
2 | building blocks for cross-platform performance. Develop high-performance vision, \ | ||
3 | signal, security, and storage applications with this multithreaded software library." | ||
4 | HOMEPAGE = "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/ipp.html" | ||
5 | |||
6 | LICENSE = "ISSL" | ||
7 | |||
8 | MAXVER = "2021.10" | ||
9 | |||
10 | LIC_FILES_CHKSUM = " \ | ||
11 | file://opt/intel/oneapi/ipp/${MAXVER}/share/doc/ipp/licensing/license.txt;md5=d7cdc92ed6c4de1263da879599ddc3e2 \ | ||
12 | file://opt/intel/oneapi/ipp/${MAXVER}/share/doc/ipp/licensing/third-party-programs.txt;md5=22bd13987911dcf790907041b43081f3 \ | ||
13 | " | ||
14 | SRC_URI = " \ | ||
15 | https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-ipp-${MAXVER}-${PV}_amd64.deb;subdir=${BPN};name=ipp \ | ||
16 | https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-ipp-common-devel-${MAXVER}-${PV}_all.deb;subdir=${BPN};name=headers \ | ||
17 | https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-ipp-common-${MAXVER}-${PV}_all.deb;subdir=${BPN};name=env \ | ||
18 | " | ||
19 | |||
20 | SRC_URI[ipp.sha256sum] = "b51e45c6e691aa46c7136b0ab61f5abe346388433e017a30cf53fd23e92bea07" | ||
21 | SRC_URI[headers.sha256sum] = "342f37ab2f82bc9f4498435f848ee660591c2488b44d988bf6ee96b2a71fd005" | ||
22 | SRC_URI[env.sha256sum] = "731e8c28a3b8b757730cd874d0941de2eb744856128f24ade59d36c12b415bf6" | ||
23 | |||
24 | S = "${WORKDIR}/${BPN}" | ||
25 | |||
26 | COMPATIBLE_HOST:libc-musl = "null" | ||
27 | |||
28 | inherit bin_package | ||
29 | |||
30 | INHIBIT_PACKAGE_STRIP = "1" | ||
31 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
32 | INHIBIT_DEFAULT_DEPS = "" | ||
33 | |||
34 | RDEPENDS:${PN} += "tbb setup-intel-oneapi-env" | ||
35 | INSANE_SKIP:${PN} += "ldflags dev-so" | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-oneapi/mkl/intel-oneapi-mkl_2024.0.0-49656.bb b/dynamic-layers/openembedded-layer/recipes-oneapi/mkl/intel-oneapi-mkl_2024.0.0-49656.bb new file mode 100644 index 00000000..e3e93028 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-oneapi/mkl/intel-oneapi-mkl_2024.0.0-49656.bb | |||
@@ -0,0 +1,74 @@ | |||
1 | SUMMARY = "IntelĀ® oneAPI Math Kernel Library (oneMKL)" | ||
2 | DESCRIPTION = "The IntelĀ® oneAPI Math Kernel Library (oneMKL) is a computing \ | ||
3 | math library of highly optimized and extensively parallelized routines \ | ||
4 | for applications that require maximum performance. oneMKL contains \ | ||
5 | the high-performance optimizations from the full IntelĀ® Math Kernel Library \ | ||
6 | for CPU architectures (with C/Fortran programming language interfaces)\ | ||
7 | and adds to them a set of DPC++ programming language interfaces for \ | ||
8 | achieving performance on various CPU architectures \ | ||
9 | and Intel Graphics Technology for certain key functionalities." | ||
10 | HOMEPAGE = "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onemkl.html" | ||
11 | |||
12 | LICENSE = "ISSL" | ||
13 | |||
14 | MKLMAINVER = "2024.0" | ||
15 | |||
16 | LIC_FILES_CHKSUM = " \ | ||
17 | file://opt/intel/oneapi/mkl/${MKLMAINVER}/share/doc/mkl/licensing/license.txt;md5=8510d21bf355a76e378c3216c3929ccd \ | ||
18 | file://opt/intel/oneapi/mkl/${MKLMAINVER}/share/doc/mkl/licensing/third-party-programs-benchmarks.txt;md5=cb98e1a1f14c05ea85a979ea8982e7a4 \ | ||
19 | file://opt/intel/oneapi/mkl/${MKLMAINVER}/share/doc/mkl/licensing/third-party-programs-ipp.txt;md5=a4b2bf15e38f5c1267cdafed18bc0b09 \ | ||
20 | file://opt/intel/oneapi/mkl/${MKLMAINVER}/share/doc/mkl/licensing/third-party-programs-openmp.txt;md5=6b3c1aa2a11393060074c0346ce21e49 \ | ||
21 | file://opt/intel/oneapi/mkl/${MKLMAINVER}/share/doc/mkl/licensing/third-party-programs-safestring.txt;md5=c3aeee91c6d35a0f0753aed6c2633b82 \ | ||
22 | file://opt/intel/oneapi/mkl/${MKLMAINVER}/share/doc/mkl/licensing/third-party-programs.txt;md5=27de873e4084d62530fe828406b33ca9 \ | ||
23 | " | ||
24 | |||
25 | SRC_URI = " \ | ||
26 | https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-mkl-${MKLMAINVER}-${PV}_amd64.deb;subdir=${BPN};name=runtime \ | ||
27 | https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-mkl-common-devel-${MKLMAINVER}-${PV}_all.deb;subdir=${BPN};name=common-devel \ | ||
28 | https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-mkl-devel-${MKLMAINVER}-${PV}_amd64.deb;subdir=${BPN};name=devel \ | ||
29 | https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-mkl-common-${MKLMAINVER}-${PV}_all.deb;subdir=${BPN};name=common-vars \ | ||
30 | " | ||
31 | |||
32 | SRC_URI[runtime.sha256sum] = "10a86e24051d6ef4a80fd839c570e629190638a3c0ac9bcca99ab855f534b959" | ||
33 | SRC_URI[common-devel.sha256sum] = "adbf0ea946f63946d29b7f9c750c38a42ea7a65d8c81655b268aa2c7bb908192" | ||
34 | SRC_URI[devel.sha256sum] = "fab2a6f15e18bfd9b4d425f2703e4e98928c57f52c4feebc9ed886f097062e84" | ||
35 | SRC_URI[common-vars.sha256sum] = "ec2b67813739fa4a2895f63479a41acba2174afe2d0cb8a0c1c9119d1317d8ef" | ||
36 | |||
37 | S = "${WORKDIR}/${BPN}" | ||
38 | |||
39 | inherit bin_package | ||
40 | |||
41 | do_install:append () { | ||
42 | install -d ${D}${bindir} | ||
43 | (cd ${D}${bindir} ; ln -s ../../opt/intel/oneapi/mkl/${MKLMAINVER}/bin/* .) | ||
44 | install -d ${D}${libdir} | ||
45 | (cd ${D}${libdir} ; ln -s ../../opt/intel/oneapi/mkl/${MKLMAINVER}/lib/intel64/*.so* .) | ||
46 | (cd ${D}${libdir} ; ln -s ../../opt/intel/oneapi/mkl/${MKLMAINVER}/lib/intel64/*.a* .) | ||
47 | install -d ${D}${libdir}/pkgconfig | ||
48 | (cd ${D}${libdir}/pkgconfig ; ln -s ../../../opt/intel/oneapi/mkl/${MKLMAINVER}/lib/pkgconfig/* .) | ||
49 | install -d ${D}${libdir}/cmake | ||
50 | (cd ${D}${libdir}/cmake ; ln -s ../../../opt/intel/oneapi/mkl/${MKLMAINVER}/lib/cmake/* .) | ||
51 | |||
52 | install -d ${D}${includedir} | ||
53 | find ${D}/opt/intel/oneapi/mkl/${MKLMAINVER}/include/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read srcdir; do | ||
54 | install -d ${D}${includedir}/$srcdir | ||
55 | (cd ${D}${includedir} ; ln -s ../../opt/intel/oneapi/mkl/${MKLMAINVER}/include/$srcdir/* ./$srcdir/) | ||
56 | done | ||
57 | |||
58 | find ${D}/opt/intel/oneapi/mkl/${MKLMAINVER}/include/ -mindepth 1 -maxdepth 1 -type f -printf '%f\n' | while read srcfile; do | ||
59 | (cd ${D}${includedir} ; ln -s ../../opt/intel/oneapi/mkl/${MKLMAINVER}/include/$srcfile .) | ||
60 | done | ||
61 | } | ||
62 | |||
63 | AUTO_LIBNAME_PKGS = "" | ||
64 | INHIBIT_PACKAGE_STRIP = "1" | ||
65 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
66 | |||
67 | RDEPENDS:${PN} += "bash tbb intel-oneapi-dpcpp-cpp-runtime setup-intel-oneapi-env virtual-opencl-icd" | ||
68 | INSANE_SKIP:${PN} = "ldflags textrel dev-so staticdev arch already-stripped" | ||
69 | |||
70 | FILES:${PN}-staticdev += "/opt/intel/oneapi/mkl/${MKLMAINVER}/lib/*.a*" | ||
71 | |||
72 | SKIP_FILEDEPS:${PN} = '1' | ||
73 | |||
74 | SYSROOT_DIRS += "/opt" | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-oneapi/oidn/oidn_2.1.0.bb b/dynamic-layers/openembedded-layer/recipes-oneapi/oidn/oidn_2.1.0.bb new file mode 100644 index 00000000..8005f544 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-oneapi/oidn/oidn_2.1.0.bb | |||
@@ -0,0 +1,27 @@ | |||
1 | SUMMARY = "IntelĀ® Open Image Denoise" | ||
2 | DESCRIPTION = "Intel Open Image Denoise is an open source library of \ | ||
3 | high-performance, high-quality denoising filters for images \ | ||
4 | rendered with ray tracing. Intel Open Image Denoise is part \ | ||
5 | of the IntelĀ® oneAPI Rendering Toolkit" | ||
6 | HOMEPAGE = "https://www.openimagedenoise.org/" | ||
7 | |||
8 | LICENSE = "Apache-2.0 & BSD-3-Clause" | ||
9 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57 \ | ||
10 | file://external/mkl-dnn/LICENSE;md5=b48e3de3bfd47c27882a0d85b20823f5 \ | ||
11 | file://external/mkl-dnn/src/cpu/x64/xbyak/COPYRIGHT;md5=3b9bf048d063d54cdb28964db558bcc7 \ | ||
12 | file://external/mkl-dnn/src/common/ittnotify/LICENSE.BSD;md5=e671ff178b24a95a382ba670503c66fb \ | ||
13 | file://weights/LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" | ||
14 | |||
15 | SRC_URI = "https://github.com/OpenImageDenoise/${BPN}/releases/download/v${PV}/${BP}.src.tar.gz\ | ||
16 | " | ||
17 | SRC_URI[sha256sum] = "ce144ba582ff36563d9442ee07fa2a4d249bc85aa93e5b25fc527ff4ee755ed6" | ||
18 | |||
19 | inherit cmake | ||
20 | |||
21 | DEPENDS += "tbb ispc-native" | ||
22 | |||
23 | do_install:append() { | ||
24 | chrpath -d ${D}${bindir}/* ${D}${libdir}/*${SOLIBS} | ||
25 | } | ||
26 | |||
27 | UPSTREAM_CHECK_URI = "https://github.com/OpenImageDenoise/oidn/releases" | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-oneapi/openvkl/openvkl_2.0.1.bb b/dynamic-layers/openembedded-layer/recipes-oneapi/openvkl/openvkl_2.0.1.bb new file mode 100644 index 00000000..a2d709a1 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-oneapi/openvkl/openvkl_2.0.1.bb | |||
@@ -0,0 +1,42 @@ | |||
1 | SUMMARY = "Intel(R) Open Volume Kernel Library" | ||
2 | DESCRIPTION = "Intel(R) Open Volume Kernel Library (Intel(R) Open VKL) is a \ | ||
3 | collection of high-performance volume computation kernels. The target users \ | ||
4 | of Open VKL are graphics application engineers who want to improve the \ | ||
5 | performance of their volume rendering applications by leveraging Open VKLās \ | ||
6 | performance-optimized kernels, which include volume traversal and sampling \ | ||
7 | functionality for a variety of volumetric data formats. The kernels are optimized \ | ||
8 | for the latest Intel(R) processors with support for SSE, AVX, AVX2, and AVX-512 \ | ||
9 | instructions." | ||
10 | HOMEPAGE = "https://www.openvkl.org/" | ||
11 | |||
12 | LICENSE = "Apache-2.0 & BSD-3-Clause & MIT & Zlib" | ||
13 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57 \ | ||
14 | file://third-party-programs.txt;md5=69ec7caf49616c471161b921f53d5ec0 \ | ||
15 | file://testing/external/half.hpp;beginline=1;endline=17;md5=4b60058493630c3bd0ef145470f04a7b" | ||
16 | |||
17 | inherit pkgconfig cmake | ||
18 | |||
19 | S = "${WORKDIR}/git" | ||
20 | |||
21 | SRC_URI = "git://github.com/openvkl/openvkl.git;protocol=https;branch=master \ | ||
22 | " | ||
23 | SRCREV = "8c6ba526813b871a624cb9d73d4cbb689ac7f4ce" | ||
24 | |||
25 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
26 | COMPATIBLE_HOST:libc-musl = "null" | ||
27 | |||
28 | DEPENDS = "ispc ispc-native rkcommon embree" | ||
29 | |||
30 | EXTRA_OECMAKE += " \ | ||
31 | -DISPC_EXECUTABLE=${STAGING_BINDIR_NATIVE}/ispc \ | ||
32 | " | ||
33 | EXTRA_OECMAKE:intel-corei7-64 += " \ | ||
34 | -DOPENVKL_ISA_AVX=OFF \ | ||
35 | -DOPENVKL_ISA_AVX2=OFF \ | ||
36 | -DOPENVKL_ISA_AVX512SKX=OFF \ | ||
37 | " | ||
38 | |||
39 | PACKAGES =+ "${PN}-examples" | ||
40 | FILES:${PN}-examples = "\ | ||
41 | ${bindir} \ | ||
42 | " | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-oneapi/ospray/ospray/0001-Fix-GCC11-Compile-Error-in-benchmark_register.h.patch b/dynamic-layers/openembedded-layer/recipes-oneapi/ospray/ospray/0001-Fix-GCC11-Compile-Error-in-benchmark_register.h.patch new file mode 100644 index 00000000..c2136321 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-oneapi/ospray/ospray/0001-Fix-GCC11-Compile-Error-in-benchmark_register.h.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From 09e6b6615d9a16e9555eff9d569356e32bd26aa4 Mon Sep 17 00:00:00 2001 | ||
2 | From: benradel <86351445+benradel@users.noreply.github.com> | ||
3 | Date: Wed, 23 Jun 2021 11:56:03 +0200 | ||
4 | Subject: [PATCH] Fix GCC11 Compile Error in benchmark_register.h | ||
5 | |||
6 | Fix GCC11 compilation error due to missing header "limits" in benchmark_register.h | ||
7 | |||
8 | Upstream-Status: Submitted [https://github.com/ospray/ospray/pull/484/files] | ||
9 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
10 | --- | ||
11 | apps/common/external/benchmark/src/benchmark_register.h | 1 + | ||
12 | 1 file changed, 1 insertion(+) | ||
13 | |||
14 | diff --git a/apps/common/external/benchmark/src/benchmark_register.h b/apps/common/external/benchmark/src/benchmark_register.h | ||
15 | index 61377d742..8f1bb7795 100644 | ||
16 | --- a/apps/common/external/benchmark/src/benchmark_register.h | ||
17 | +++ b/apps/common/external/benchmark/src/benchmark_register.h | ||
18 | @@ -2,6 +2,7 @@ | ||
19 | #define BENCHMARK_REGISTER_H | ||
20 | |||
21 | #include <vector> | ||
22 | +#include <limits> | ||
23 | |||
24 | #include "check.h" | ||
25 | |||
26 | -- | ||
27 | 2.32.0 | ||
28 | |||
diff --git a/dynamic-layers/openembedded-layer/recipes-oneapi/ospray/ospray_3.2.0.bb b/dynamic-layers/openembedded-layer/recipes-oneapi/ospray/ospray_3.2.0.bb new file mode 100644 index 00000000..d3a23653 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-oneapi/ospray/ospray_3.2.0.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "Intel OSPray, Ray Tracing based Rendering Engine" | ||
2 | DESCRIPTION = "Intel OSPRay is an open source, scalable, and portable ray \ | ||
3 | tracing engine for high-performance, high-fidelity visualization on \ | ||
4 | Intel Architecture CPUs." | ||
5 | HOMEPAGE = "https://www.ospray.org/" | ||
6 | |||
7 | LICENSE = "Apache-2.0 & BSD-3-Clause & MIT & Zlib" | ||
8 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1dece7821bf3fd70fe1309eaa37d52a2 \ | ||
9 | file://third-party-programs.txt;md5=e37b77e3bd997abccc359c710fb1f1db \ | ||
10 | " | ||
11 | |||
12 | inherit pkgconfig cmake | ||
13 | |||
14 | S = "${WORKDIR}/git" | ||
15 | |||
16 | SRC_URI = "git://github.com/ospray/ospray.git;protocol=https;branch=master \ | ||
17 | " | ||
18 | SRCREV = "85af2929937d516997451cbd52d352cf93125ed2" | ||
19 | |||
20 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
21 | COMPATIBLE_HOST:libc-musl = "null" | ||
22 | |||
23 | DEPENDS = "rkcommon ispc ispc-native openvkl embree" | ||
24 | |||
25 | EXTRA_OECMAKE += " \ | ||
26 | -DISPC_EXECUTABLE=${STAGING_BINDIR_NATIVE}/ispc \ | ||
27 | -DOSPRAY_ENABLE_APPS_BENCHMARK=OFF \ | ||
28 | -DOSPRAY_ENABLE_APPS_TESTING=OFF \ | ||
29 | -DOSPRAY_ENABLE_APPS_EXAMPLES=OFF \ | ||
30 | " | ||
31 | |||
32 | PACKAGES =+ "${PN}-apps" | ||
33 | FILES:${PN}-apps = "\ | ||
34 | ${bindir} \ | ||
35 | " | ||
36 | |||
37 | UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>(\d+(\.\d+)+))$" | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-oneapi/rkcommon/rkcommon_1.14.0.bb b/dynamic-layers/openembedded-layer/recipes-oneapi/rkcommon/rkcommon_1.14.0.bb new file mode 100644 index 00000000..bec36593 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-oneapi/rkcommon/rkcommon_1.14.0.bb | |||
@@ -0,0 +1,19 @@ | |||
1 | SUMMARY = "rkcommon - C++/CMake infrastructure" | ||
2 | DESCRIPTION = "A common set of C++ infrastructure and CMake utilities \ | ||
3 | used by various components of IntelĀ® oneAPI Rendering Toolkit." | ||
4 | HOMEPAGE = "https://github.com/ospray/rkcommon" | ||
5 | |||
6 | LICENSE = "Apache-2.0" | ||
7 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" | ||
8 | |||
9 | inherit pkgconfig cmake | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | SRC_URI = "git://github.com/ospray/rkcommon.git;protocol=https;branch=master \ | ||
14 | " | ||
15 | SRCREV = "4a00047ae5a3ac705b6b33b4a7574588d91e7953" | ||
16 | |||
17 | DEPENDS = "tbb" | ||
18 | |||
19 | EXTRA_OECMAKE += " -DBUILD_TESTING=OFF" | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl/0001-CMakeLists-disable-Werror.patch b/dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl/0001-CMakeLists-disable-Werror.patch new file mode 100644 index 00000000..4474aa3c --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl/0001-CMakeLists-disable-Werror.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From ef56be8e6bf2ea273cbeb960f3131164e7b517b6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Anuj Mittal <anuj.mittal@intel.com> | ||
3 | Date: Wed, 18 May 2022 12:24:03 +0800 | ||
4 | Subject: [PATCH] CMakeLists: disable Werror | ||
5 | |||
6 | gcc12 highlights minor warnings that cause the build to fail. Ignore | ||
7 | those until they aren't fixed upstream. | ||
8 | |||
9 | Upstream-Status: Inappropriate | ||
10 | |||
11 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
12 | --- | ||
13 | CMakeLists.txt | 4 ++-- | ||
14 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
15 | |||
16 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
17 | index 418483f7..c019fea0 100644 | ||
18 | --- a/CMakeLists.txt | ||
19 | +++ b/CMakeLists.txt | ||
20 | @@ -146,7 +146,7 @@ else() | ||
21 | set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -fno-strict-aliasing -D_FORTIFY_SOURCE=2") | ||
22 | if(LNX_BUILD) | ||
23 | #A few warnings yet to resolve under esx | ||
24 | - set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Werror") | ||
25 | + #set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Werror") | ||
26 | set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Werror") | ||
27 | endif() | ||
28 | set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -ggdb") | ||
29 | @@ -791,4 +791,4 @@ if(ESX_BUILD) | ||
30 | include(CMake/esx.cmake) | ||
31 | endif() | ||
32 | |||
33 | -add_subdirectory(src/os/nvm_api_sample) | ||
34 | \ No newline at end of file | ||
35 | +add_subdirectory(src/os/nvm_api_sample) | ||
36 | -- | ||
37 | 2.35.3 | ||
38 | |||
diff --git a/dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl/0001-Ignore-STATIC_ASSERTs-and-NULL-define-for-os-and-ut-builds.patch b/dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl/0001-Ignore-STATIC_ASSERTs-and-NULL-define-for-os-and-ut-builds.patch new file mode 100644 index 00000000..8a734ed2 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl/0001-Ignore-STATIC_ASSERTs-and-NULL-define-for-os-and-ut-builds.patch | |||
@@ -0,0 +1,62 @@ | |||
1 | Subject: [PATCH] [PATCH]: ignore static asserts and null define for os and ut | ||
2 | builds | ||
3 | Upstream-Status: Backport | ||
4 | Signed-off-by: Teoh Suh Haw <suh.haw.teoh@intel.com> | ||
5 | --- | ||
6 | MdePkg/Include/Base.h | 12 ++++++++++++ | ||
7 | 1 file changed, 12 insertions(+) | ||
8 | |||
9 | Index: edk2/MdePkg/Include/Base.h | ||
10 | =================================================================== | ||
11 | --- edk2.orig/MdePkg/Include/Base.h | ||
12 | +++ edk2/MdePkg/Include/Base.h | ||
13 | @@ -316,8 +316,12 @@ struct _LIST_ENTRY { | ||
14 | #define NULL __null | ||
15 | #endif | ||
16 | #else | ||
17 | +#ifndef OS_BUILD | ||
18 | +#ifndef UNIT_TEST_UEFI_BUILD | ||
19 | #define NULL ((VOID *) 0) | ||
20 | #endif | ||
21 | +#endif | ||
22 | +#endif | ||
23 | |||
24 | // | ||
25 | // Null character | ||
26 | @@ -813,6 +817,8 @@ typedef UINTN *BASE_LIST; | ||
27 | // Section 2.3.1 of the UEFI 2.3 Specification. | ||
28 | // | ||
29 | |||
30 | +#ifndef OS_BUILD | ||
31 | +#ifndef UNIT_TEST_UEFI_BUILD | ||
32 | STATIC_ASSERT (sizeof (BOOLEAN) == 1, "sizeof (BOOLEAN) does not meet UEFI Specification Data Type requirements"); | ||
33 | STATIC_ASSERT (sizeof (INT8) == 1, "sizeof (INT8) does not meet UEFI Specification Data Type requirements"); | ||
34 | STATIC_ASSERT (sizeof (UINT8) == 1, "sizeof (UINT8) does not meet UEFI Specification Data Type requirements"); | ||
35 | @@ -841,7 +847,8 @@ STATIC_ASSERT (ALIGNOF (CHAR16) == size | ||
36 | STATIC_ASSERT (ALIGNOF (INTN) == sizeof (INTN), "Alignment of INTN does not meet UEFI Specification Data Type requirements"); | ||
37 | STATIC_ASSERT (ALIGNOF (UINTN) == sizeof (UINTN), "Alignment of UINTN does not meet UEFI Specification Data Type requirements"); | ||
38 | STATIC_ASSERT (ALIGNOF (VOID *) == sizeof (VOID *), "Alignment of VOID * does not meet UEFI Specification Data Type requirements"); | ||
39 | - | ||
40 | +#endif | ||
41 | +#endif | ||
42 | // | ||
43 | // The following three enum types are used to verify that the compiler | ||
44 | // configuration for enum types is compliant with Section 2.3.1 of the | ||
45 | @@ -861,6 +868,8 @@ typedef enum { | ||
46 | __VerifyInt32EnumValue = 0x7fffffff | ||
47 | } __VERIFY_INT32_ENUM_SIZE; | ||
48 | |||
49 | +#ifndef OS_BUILD | ||
50 | +#ifndef UNIT_TEST_UEFI_BUILD | ||
51 | STATIC_ASSERT (sizeof (__VERIFY_UINT8_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements"); | ||
52 | STATIC_ASSERT (sizeof (__VERIFY_UINT16_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements"); | ||
53 | STATIC_ASSERT (sizeof (__VERIFY_INT32_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements"); | ||
54 | @@ -868,6 +877,8 @@ STATIC_ASSERT (sizeof (__VERIFY_INT32_EN | ||
55 | STATIC_ASSERT (ALIGNOF (__VERIFY_UINT8_ENUM_SIZE) == sizeof (__VERIFY_UINT8_ENUM_SIZE), "Alignment of enum does not meet UEFI Specification Data Type requirements"); | ||
56 | STATIC_ASSERT (ALIGNOF (__VERIFY_UINT16_ENUM_SIZE) == sizeof (__VERIFY_UINT16_ENUM_SIZE), "Alignment of enum does not meet UEFI Specification Data Type requirements"); | ||
57 | STATIC_ASSERT (ALIGNOF (__VERIFY_INT32_ENUM_SIZE) == sizeof (__VERIFY_INT32_ENUM_SIZE), "Alignment of enum does not meet UEFI Specification Data Type requirements"); | ||
58 | +#endif | ||
59 | +#endif | ||
60 | |||
61 | /** | ||
62 | Macro that returns a pointer to the data structure that contains a specified field of | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl_03.00.00.0499.bb b/dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl_03.00.00.0499.bb new file mode 100644 index 00000000..695e29e9 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl_03.00.00.0499.bb | |||
@@ -0,0 +1,47 @@ | |||
1 | SUMMARY = "Utility for managing Intel Optane DC persistent memory modules" | ||
2 | DESCRIPTION = "Utility for configuring and managing Intel Optane Persistent \ | ||
3 | Memory modules (PMem). It supports functionality to: \ | ||
4 | Discover DCPMMs on the platform. \ | ||
5 | Provision the platform memory configuration. \ | ||
6 | View and update the firmware on DCPMMs. \ | ||
7 | Configure data-at-rest security on DCPMMs. \ | ||
8 | Track health and performance of DCPMMs. \ | ||
9 | Debug and troubleshoot DCPMMs." | ||
10 | |||
11 | HOMEPAGE = "https://github.com/intel/ipmctl" | ||
12 | BUGTRACKER = "https://github.com/intel/ipmctl/issues" | ||
13 | |||
14 | LICENSE = "BSD-3-Clause | BSD-2-Clause" | ||
15 | LIC_FILES_CHKSUM = "file://LICENSE;md5=72b9da60da6219d612ce30b746a0fe71 \ | ||
16 | file://edk2/License.txt;md5=6123e5bf044a66db96c4ce88a36b2d08" | ||
17 | |||
18 | SRC_URI = "git://github.com/intel/ipmctl.git;protocol=https;branch=master_3_0;name=ipmctl; \ | ||
19 | git://github.com/tianocore/edk2.git;protocol=https;name=edk2;destsuffix=git/edk2;branch=master \ | ||
20 | file://0001-Ignore-STATIC_ASSERTs-and-NULL-define-for-os-and-ut-builds.patch;patchdir=edk2 \ | ||
21 | file://0001-CMakeLists-disable-Werror.patch \ | ||
22 | " | ||
23 | |||
24 | SRCREV_ipmctl = "a71f2fb1c90dd07f9862b71c789881132193e8f9" | ||
25 | #tag edk2-stable202408 | ||
26 | SRCREV_edk2 = "b158dad150bf02879668f72ce306445250838201" | ||
27 | SRCREV_FORMAT = "ipmctl_edk2" | ||
28 | |||
29 | S = "${WORKDIR}/git" | ||
30 | |||
31 | inherit cmake dos2unix | ||
32 | |||
33 | DEPENDS = "ndctl pkgconfig-native" | ||
34 | |||
35 | EXTRA_OECMAKE = "-DRELEASE=ON" | ||
36 | |||
37 | do_configure:prepend() { | ||
38 | for dir in BaseTools MdeModulePkg MdePkg ShellPkg ; do | ||
39 | ln -sf edk2/${dir} ${S} | ||
40 | done | ||
41 | } | ||
42 | |||
43 | do_install:append() { | ||
44 | # Remove /var/log/ipmctl as anything created in /var/log will not be | ||
45 | # available when tmpfs is mounted at /var/volatile/log. | ||
46 | rm -rf ${D}${localstatedir}/log | ||
47 | } | ||