diff options
Diffstat (limited to 'dynamic-layers/clang-layer/recipes-opencl')
21 files changed, 549 insertions, 712 deletions
diff --git a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/allow-to-find-cpp-generation-tool.patch b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/allow-to-find-cpp-generation-tool.patch new file mode 100644 index 00000000..265fcfa2 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/allow-to-find-cpp-generation-tool.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | From a6361d635e5f3046853883f3ac06fb175116933c 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] 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 | diff --git a/shared/source/built_ins/kernels/CMakeLists.txt b/shared/source/built_ins/kernels/CMakeLists.txt | ||
15 | index ed85a37c52..f7c9e79137 100644 | ||
16 | --- a/shared/source/built_ins/kernels/CMakeLists.txt | ||
17 | +++ b/shared/source/built_ins/kernels/CMakeLists.txt | ||
18 | @@ -107,9 +107,9 @@ function(compile_builtin core_type platform_it builtin bits builtin_options mode | ||
19 | ) | ||
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 | @@ -159,9 +159,9 @@ function(generate_cpp_spirv builtin) | ||
31 | ) | ||
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() | ||
42 | @@ -277,4 +277,4 @@ if(NOT "${OUTPUT_LIST_CPP_FILES}" STREQUAL "") | ||
43 | ) | ||
44 | endif() | ||
45 | |||
46 | -apply_macro_for_each_core_type("SUPPORTED") | ||
47 | \ No newline at end of file | ||
48 | +apply_macro_for_each_core_type("SUPPORTED") | ||
49 | -- | ||
50 | 2.43.2 | ||
51 | |||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/disable-werror.patch b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/disable-werror.patch new file mode 100644 index 00000000..20d9b847 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/disable-werror.patch | |||
@@ -0,0 +1,16 @@ | |||
1 | Upstream-Status: Inappropriate | ||
2 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
3 | |||
4 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
5 | index d52e089778..bc0cf35014 100644 | ||
6 | --- a/CMakeLists.txt | ||
7 | +++ b/CMakeLists.txt | ||
8 | @@ -727,7 +727,7 @@ if(NOT MSVC) | ||
9 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-noexcept-type") # Added for gtest | ||
10 | endif() | ||
11 | endif() | ||
12 | - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Werror=vla") | ||
13 | + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=vla") | ||
14 | |||
15 | if(USE_SANITIZE_UB) | ||
16 | check_cxx_compiler_flag(-fsanitize=undefined COMPILER_SUPPORTS_UNDEFINED_BEHAVIOR_SANITIZER) | ||
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/external-ocloc.patch b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/external-ocloc.patch new file mode 100644 index 00000000..5f93b7b6 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/external-ocloc.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From 1f58c22992ddea4167b01b44448528de427f50d5 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] 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 | diff --git a/cmake/ocloc_cmd_prefix.cmake b/cmake/ocloc_cmd_prefix.cmake | ||
14 | index 2b44330831..03067c9df0 100644 | ||
15 | --- a/cmake/ocloc_cmd_prefix.cmake | ||
16 | +++ b/cmake/ocloc_cmd_prefix.cmake | ||
17 | @@ -4,12 +4,14 @@ | ||
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 | -- | ||
39 | 2.37.3 | ||
40 | |||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/f10439aea214984a060566831f63d3aa198ef1b8.patch b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/f10439aea214984a060566831f63d3aa198ef1b8.patch new file mode 100644 index 00000000..b7fcb3d1 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/f10439aea214984a060566831f63d3aa198ef1b8.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | From f10439aea214984a060566831f63d3aa198ef1b8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Pawel Cieslak <pawel.cieslak@intel.com> | ||
3 | Date: Tue, 14 May 2024 14:20:24 +0000 | ||
4 | Subject: [PATCH] fix: include <algorithm> where std::find is used | ||
5 | |||
6 | Related-To: NEO-11375 | ||
7 | Signed-off-by: Pawel Cieslak <pawel.cieslak@intel.com> | ||
8 | |||
9 | Upstream-Status: Backport [https://github.com/intel/compute-runtime/commit/f10439aea214984a060566831f63d3aa198ef1b8] | ||
10 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
11 | --- | ||
12 | .../sources/linux/nl_api/test_sysman_iaf_nl_api_prelim.cpp | 3 ++- | ||
13 | shared/test/unit_test/gmm_helper/gmm_resource_info_tests.cpp | 4 +++- | ||
14 | 2 files changed, 5 insertions(+), 2 deletions(-) | ||
15 | |||
16 | diff --git a/level_zero/sysman/test/unit_tests/sources/linux/nl_api/test_sysman_iaf_nl_api_prelim.cpp b/level_zero/sysman/test/unit_tests/sources/linux/nl_api/test_sysman_iaf_nl_api_prelim.cpp | ||
17 | index 6ab1b751d866..8a224752c8fc 100644 | ||
18 | --- a/level_zero/sysman/test/unit_tests/sources/linux/nl_api/test_sysman_iaf_nl_api_prelim.cpp | ||
19 | +++ b/level_zero/sysman/test/unit_tests/sources/linux/nl_api/test_sysman_iaf_nl_api_prelim.cpp | ||
20 | @@ -1,5 +1,5 @@ | ||
21 | /* | ||
22 | - * Copyright (C) 2021-2023 Intel Corporation | ||
23 | + * Copyright (C) 2021-2024 Intel Corporation | ||
24 | * | ||
25 | * SPDX-License-Identifier: MIT | ||
26 | * | ||
27 | @@ -13,6 +13,7 @@ | ||
28 | |||
29 | #include "gtest/gtest.h" | ||
30 | |||
31 | +#include <algorithm> | ||
32 | #include <limits> | ||
33 | #include <netlink/handlers.h> | ||
34 | |||
35 | diff --git a/shared/test/unit_test/gmm_helper/gmm_resource_info_tests.cpp b/shared/test/unit_test/gmm_helper/gmm_resource_info_tests.cpp | ||
36 | index 206c272c5bb2..e961248e73a3 100644 | ||
37 | --- a/shared/test/unit_test/gmm_helper/gmm_resource_info_tests.cpp | ||
38 | +++ b/shared/test/unit_test/gmm_helper/gmm_resource_info_tests.cpp | ||
39 | @@ -1,5 +1,5 @@ | ||
40 | /* | ||
41 | - * Copyright (C) 2021-2023 Intel Corporation | ||
42 | + * Copyright (C) 2021-2024 Intel Corporation | ||
43 | * | ||
44 | * SPDX-License-Identifier: MIT | ||
45 | * | ||
46 | @@ -17,6 +17,8 @@ | ||
47 | |||
48 | #include "gtest/gtest.h" | ||
49 | |||
50 | +#include <algorithm> | ||
51 | + | ||
52 | using namespace NEO; | ||
53 | |||
54 | struct MockGmmHandleAllocator : NEO::GmmHandleAllocator { | ||
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_24.13.29138.7.bb b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_24.13.29138.7.bb new file mode 100644 index 00000000..7280ed03 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_24.13.29138.7.bb | |||
@@ -0,0 +1,65 @@ | |||
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/24.13 \ | ||
12 | file://disable-werror.patch \ | ||
13 | file://allow-to-find-cpp-generation-tool.patch \ | ||
14 | file://external-ocloc.patch \ | ||
15 | file://f10439aea214984a060566831f63d3aa198ef1b8.patch \ | ||
16 | " | ||
17 | |||
18 | SRCREV = "7131387cdbb02d480a225c70daef913a6c024a6e" | ||
19 | |||
20 | S = "${WORKDIR}/git" | ||
21 | |||
22 | DEPENDS += " intel-graphics-compiler gmmlib libva qemu-native" | ||
23 | |||
24 | RDEPENDS:${PN} += " intel-graphics-compiler gmmlib" | ||
25 | |||
26 | inherit cmake pkgconfig qemu | ||
27 | |||
28 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
29 | COMPATIBLE_HOST:libc-musl = "null" | ||
30 | |||
31 | EXTRA_OECMAKE = " \ | ||
32 | -DIGC_DIR=${STAGING_INCDIR}/igc \ | ||
33 | -DBUILD_TYPE=Release \ | ||
34 | -DSKIP_UNIT_TESTS=1 \ | ||
35 | -DCCACHE_ALLOWED=FALSE \ | ||
36 | -DNEO_DISABLE_LD_LLD=ON \ | ||
37 | -DNEO_DISABLE_LD_GOLD=ON \ | ||
38 | " | ||
39 | |||
40 | EXTRA_OECMAKE:append:class-target = " \ | ||
41 | -Docloc_cmd_prefix=ocloc \ | ||
42 | -DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper \ | ||
43 | " | ||
44 | |||
45 | PACKAGECONFIG ??= "" | ||
46 | PACKAGECONFIG[levelzero] = "-DBUILD_WITH_L0=ON, -DBUILD_WITH_L0=OFF, level-zero" | ||
47 | |||
48 | do_configure:prepend:class-target () { | ||
49 | # Write out a qemu wrapper that will be used by cmake. | ||
50 | 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}')])}" | ||
51 | cat > ${WORKDIR}/qemuwrapper << EOF | ||
52 | #!/bin/sh | ||
53 | $qemu_binary "\$@" | ||
54 | EOF | ||
55 | chmod +x ${WORKDIR}/qemuwrapper | ||
56 | } | ||
57 | |||
58 | FILES:${PN} += " \ | ||
59 | ${libdir}/intel-opencl/libigdrcl.so \ | ||
60 | ${libdir}/libocloc.so \ | ||
61 | " | ||
62 | |||
63 | FILES:${PN}-dev = "${includedir}" | ||
64 | |||
65 | 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..377081fd --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-BiF-CMakeLists.txt-remove-opt-from-DEPENDS.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 3d71670f8ad5b54d434c2f5f71713bb1d5433ae4 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 | diff --git a/IGC/VectorCompiler/lib/BiF/cmake/Functions.cmake b/IGC/VectorCompiler/lib/BiF/cmake/Functions.cmake | ||
21 | index d20d7f887..882e09fea 100644 | ||
22 | --- a/IGC/VectorCompiler/lib/BiF/cmake/Functions.cmake | ||
23 | +++ b/IGC/VectorCompiler/lib/BiF/cmake/Functions.cmake | ||
24 | @@ -109,7 +109,7 @@ function(vc_build_bif TARGET RES_FILE CMCL_SRC_PATH BIF_NAME PTR_BIT_SIZE) | ||
25 | COMMENT "vc_build_bif: Translating CMCL builtins: ${BIF_CLANG_BC_NAME_FINAL} -> ${BIF_OPT_BC_NAME}" | ||
26 | COMMAND CMCLTranslatorTool -o ${BIF_CMCL_BC_NAME} ${BIF_CLANG_BC_NAME_FINAL} | ||
27 | COMMAND ${LLVM_OPT_EXE} ${IGC_LLVM_DEPENDENT_OPT_FLAGS} --O2 -o ${BIF_OPT_BC_NAME} ${BIF_CMCL_BC_NAME} | ||
28 | - DEPENDS CMCLTranslatorTool ${LLVM_OPT_EXE} ${BIF_CLANG_BC_PATH_FINAL} | ||
29 | + DEPENDS CMCLTranslatorTool ${BIF_CLANG_BC_PATH_FINAL} | ||
30 | BYPRODUCTS ${BIF_OPT_BC_PATH} | ||
31 | SOURCES ${CMCL_SRC_PATH}) | ||
32 | set(${RES_FILE} ${BIF_OPT_BC_NAME} PARENT_SCOPE) | ||
33 | -- | ||
34 | 2.43.2 | ||
35 | |||
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..dca75e22 --- /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,31 @@ | |||
1 | From e69a3181482e5f442756a61c7b683914072884f1 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 | --- | ||
14 | external/SPIRV-Tools/CMakeLists.txt | 4 ++-- | ||
15 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/external/SPIRV-Tools/CMakeLists.txt b/external/SPIRV-Tools/CMakeLists.txt | ||
18 | index 9afa5746c..7ca24d5dc 100644 | ||
19 | --- a/external/SPIRV-Tools/CMakeLists.txt | ||
20 | +++ b/external/SPIRV-Tools/CMakeLists.txt | ||
21 | @@ -43,8 +43,8 @@ else() #By default use build from sources | ||
22 | message(STATUS "[SPIRV-Tools] : Building from source") | ||
23 | message(STATUS "[SPIRV-Tools] : Current source dir: ${CMAKE_CURRENT_SOURCE_DIR}") | ||
24 | |||
25 | - set(SPIRV-Headers_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../SPIRV-Headers") # used in subdirectory | ||
26 | - set(SPIRV-Tools_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../SPIRV-Tools") | ||
27 | + set(SPIRV-Headers_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../SPIRV-Headers") # used in subdirectory | ||
28 | + set(SPIRV-Tools_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../SPIRV-Tools") | ||
29 | |||
30 | set(SPIRV-Tools_OUTPUT_DIR "${IGC_OPTION__OUTPUT_DIR}/external/SPIRV-Tools/build") | ||
31 | 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..39443931 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-fix-tblgen.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | From 5648568e597acd0fed82aac3e6aef0f95a1b78d1 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 | --- | ||
9 | IGC/cmake/igc_llvm.cmake | 2 +- | ||
10 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
11 | |||
12 | diff --git a/IGC/cmake/igc_llvm.cmake b/IGC/cmake/igc_llvm.cmake | ||
13 | index 10322533c..9020cb3c8 100644 | ||
14 | --- a/IGC/cmake/igc_llvm.cmake | ||
15 | +++ b/IGC/cmake/igc_llvm.cmake | ||
16 | @@ -52,7 +52,7 @@ else() | ||
17 | set(LLVM_OPT_EXE "opt" CACHE STRING "") | ||
18 | |||
19 | set(LLVM_TABLEGEN_EXE "llvm-tblgen") | ||
20 | - if(CMAKE_CROSSCOMPILING) | ||
21 | + if(TRUE) | ||
22 | if(DEFINED LLVM_TABLEGEN) | ||
23 | set(LLVM_TABLEGEN_EXE ${LLVM_TABLEGEN}) | ||
24 | 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..650130a8 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Improve-Reproducibility-for-src-package.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From 0559332abd04b6c8bc70171d201f43d2e4735336 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 | --- | ||
14 | visa/CMakeLists.txt | 7 +++++-- | ||
15 | 1 file changed, 5 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/visa/CMakeLists.txt b/visa/CMakeLists.txt | ||
18 | index 6be467587..930c386a6 100644 | ||
19 | --- a/visa/CMakeLists.txt | ||
20 | +++ b/visa/CMakeLists.txt | ||
21 | @@ -123,8 +123,11 @@ endif() | ||
22 | set(bison_output_file ${CMAKE_CURRENT_BINARY_DIR}/CISA.tab.cpp) | ||
23 | set(flex_output_file ${CMAKE_CURRENT_BINARY_DIR}/lex.CISA.cpp) | ||
24 | |||
25 | -BISON_TARGET(CISAParser CISA.y ${bison_output_file} COMPILE_FLAGS "-vt -p CISA") | ||
26 | -FLEX_TARGET(CISAScanner CISA.l ${flex_output_file} COMPILE_FLAGS "-PCISA ${WIN_FLEX_FLAG}") | ||
27 | +if(BISON_VERSION VERSION_GREATER_EQUAL "3.7.0") | ||
28 | + set(BISON_EXTRA_FLAGS " --file-prefix-map=$ENV{B}=/igc/ ") | ||
29 | +endif() | ||
30 | +BISON_TARGET(CISAParser CISA.y ${bison_output_file} COMPILE_FLAGS "-l -vt -p CISA ${BISON_EXTRA_FLAGS} ") | ||
31 | +FLEX_TARGET(CISAScanner CISA.l ${flex_output_file} COMPILE_FLAGS "-PCISA -L ${WIN_FLEX_FLAG} ") | ||
32 | ADD_FLEX_BISON_DEPENDENCY(CISAScanner CISAParser) | ||
33 | set(CISAScanner_dependencies) | ||
34 | |||
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_1.0.16510.2.bb b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.16510.2.bb new file mode 100644 index 00000000..24eb97bd --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.16510.2.bb | |||
@@ -0,0 +1,75 @@ | |||
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/igc-1.0.16510 \ | ||
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 | " | ||
19 | |||
20 | SRC_URI:append:class-native = " file://0001-fix-tblgen.patch" | ||
21 | |||
22 | SRCREV_igc = "c2495d45f37fadd963ad22eb0cc1a8235a306775" | ||
23 | SRCREV_vc = "f9c34404d0ea9abad83875a10bd48d88cea90ebd" | ||
24 | SRCREV_spirv-tools = "f0cc85efdbbe3a46eae90e0f915dc1509836d0fc" | ||
25 | SRCREV_spirv-headers = "1c6bb2743599e6eb6f37b2969acc0aef812e32e3" | ||
26 | |||
27 | SRCREV_FORMAT = "igc_vc_spirv-tools_spirv-headers" | ||
28 | |||
29 | # Used to replace with relative path in reproducibility patch | ||
30 | export B | ||
31 | |||
32 | S = "${WORKDIR}/git" | ||
33 | |||
34 | inherit cmake pkgconfig qemu python3native | ||
35 | |||
36 | CXXFLAGS:append = " -Wno-error=nonnull" | ||
37 | |||
38 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
39 | COMPATIBLE_HOST:libc-musl = "null" | ||
40 | |||
41 | DEPENDS += " flex-native bison-native clang clang-cross-x86_64 opencl-clang qemu-native python3-mako-native" | ||
42 | |||
43 | RDEPENDS:${PN} += "opencl-clang" | ||
44 | |||
45 | PACKAGECONFIG ??= "vc" | ||
46 | 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," | ||
47 | |||
48 | EXTRA_OECMAKE = " \ | ||
49 | -DIGC_OPTION__LLVM_PREFERRED_VERSION=${LLVMVERSION} \ | ||
50 | -DVC_INTRINSICS_SRC="${S}/vc-intrinsics" \ | ||
51 | -DIGC_OPTION__LLVM_MODE=Prebuilds \ | ||
52 | -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ | ||
53 | -DLLVM_LINK_EXE=${STAGING_BINDIR_NATIVE}/llvm-link \ | ||
54 | -DCLANG_EXE=${STAGING_BINDIR_NATIVE}/clang \ | ||
55 | -DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper \ | ||
56 | " | ||
57 | |||
58 | do_configure:prepend:class-target () { | ||
59 | # Write out a qemu wrapper that will be used by cmake. | ||
60 | qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}" | ||
61 | cat > ${WORKDIR}/qemuwrapper << EOF | ||
62 | #!/bin/sh | ||
63 | $qemu_binary "\$@" | ||
64 | EOF | ||
65 | chmod +x ${WORKDIR}/qemuwrapper | ||
66 | } | ||
67 | |||
68 | UPSTREAM_CHECK_GITTAGREGEX = "^igc-(?P<pver>(?!19\..*)\d+(\.\d+)+)$" | ||
69 | |||
70 | FILES:${PN} += " \ | ||
71 | ${libdir}/igc/NOTICES.txt \ | ||
72 | " | ||
73 | |||
74 | # libigc.so contains buildpaths | ||
75 | 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" | ||