diff options
174 files changed, 2348 insertions, 10029 deletions
diff --git a/CHANGELOG b/CHANGELOG deleted file mode 100644 index 2ed8af05..00000000 --- a/CHANGELOG +++ /dev/null | |||
@@ -1,87 +0,0 @@ | |||
1 | This file will only list major changes that occur within a release. | ||
2 | For a full list of changes, view the git log of the repository. | ||
3 | |||
4 | Rocko Release 11/2017 | ||
5 | ===================== | ||
6 | |||
7 | Moved qat support to separate layer | ||
8 | ----------------------------------- | ||
9 | Quick Assist Technology (QAT) is more middleware and should not be part of the | ||
10 | core BSP. The new layer can be found here: | ||
11 | https://git.yoctoproject.org/cgit/cgit.cgi/meta-intel-qat/ | ||
12 | |||
13 | Moved dpdk support to separate layer | ||
14 | ------------------------------------ | ||
15 | We had some requests to make DPDK standalone so that it could be included | ||
16 | without bringing in anything else from meta-intel, as it is not specific to | ||
17 | Intel(R) hardware. The new layer is located here: | ||
18 | https://git.yoctoproject.org/cgit/cgit.cgi/meta-dpdk/ | ||
19 | |||
20 | Added support for out-of-tree iwlwifi drivers | ||
21 | --------------------------------------------- | ||
22 | Backport-iwlwifi out-of-tree wifi modules are now available via meta-intel. | ||
23 | Backport-iwlwifi brings the latest iwlwifi drivers to almost any kernel | ||
24 | Note that mac80211 and cfg80211 backports are also necessary, which will most | ||
25 | likely cause incompatibility with other in-tree wifi drivers. | ||
26 | See https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi for more info. | ||
27 | |||
28 | Added support for out-of-tree ixgbe drivers | ||
29 | ------------------------------------------- | ||
30 | The out-of-tree ixgbe drivers bring ixgbe support to nearly any kernel. See | ||
31 | here: http://www.intel.com/network/connectivity/products/server_adapters.htm | ||
32 | |||
33 | Added an implementation of Secure Boot | ||
34 | -------------------------------------- | ||
35 | meta-intel now supports a simple Secure Boot implementation. This implementation | ||
36 | consists of a single binary consisting of an EFI stub, the kernel, an | ||
37 | initrd, and a kernel command line. The binary is then signed via keys defined by | ||
38 | the variables SECUREBOOT_SIGNING_KEY and SECUREBOOT_SIGNING_CERT. These keys | ||
39 | should match the keys embedded in your hardware's firmware. | ||
40 | See documentation/secureboot/README for more information on this feature. | ||
41 | |||
42 | Improved Yocto Project Compatibility status | ||
43 | ------------------------------------------- | ||
44 | The common layer should now be considered Yocto Project compatible - it should | ||
45 | no longer modify OE-core values when adding the layer to your bblayers.conf. | ||
46 | The meta-tlk layer is still not Yocto Project compatible, however. | ||
47 | |||
48 | Pyro Release 5/2017 | ||
49 | =================== | ||
50 | |||
51 | Changed default kernel provider from linux-yocto to linux-intel. | ||
52 | ---------------------------------------------------------------- | ||
53 | Linux-intel is an Intel(R)-maintained kernel based on the latest stable | ||
54 | branch, along with backports from upstream to better support Intel(R) | ||
55 | hardware. The intel-linux kernel also has a branch with the preempt-rt | ||
56 | patches applied, providing a preempt-rt kernel with no additional work. | ||
57 | |||
58 | Added QEMU support. | ||
59 | ------------------- | ||
60 | We now build several virtio drivers into the kernel by default, and | ||
61 | have qemuboot.conf files for intel-corei7-64 and intel-core2-32 | ||
62 | targets. This allows one to do basic testing on meta-intel images | ||
63 | without having to use hardware. The virtio drivers are added via | ||
64 | KERNEL_FEATURES_INTEL_COMMON. This prevents them from being added to | ||
65 | custom kernels by default. They can be removed by adding the | ||
66 | following to a conf or kernel bbappend file: | ||
67 | KERNEL_FEATURES_INTEL_COMMON:remove = “cfg/virtio.scc” | ||
68 | OVMF firmware is also built and can be used in order to emulate a UEFI | ||
69 | environment. A full runqemu command line for intel-corei7-64 could look | ||
70 | like this: | ||
71 | runqemu core-image-minimal intel-corei7-64 wic ovmf | ||
72 | |||
73 | Musl support | ||
74 | ------------ | ||
75 | Meta-intel is now compatible with the musl C library. You can specify musl | ||
76 | As your C library by adding the following to your local.conf: | ||
77 | TCLIBC = “musl” | ||
78 | Note: there is a known failure with DPDK. | ||
79 | |||
80 | X32 support | ||
81 | ----------- | ||
82 | The meta-intel layer can now build with the x32 tune settings in a multi-lib | ||
83 | setting, it will not work in as the primary MACHINE tune as the bootloader needs | ||
84 | to be built as a 64bit binary. The setup for this would be as follows: | ||
85 | require conf/multilib.conf | ||
86 | MULTILIBS = "multilib:libx32 | ||
87 | DEFAULTTUNE:virtclass-multilib-libx32 = "corei7-64-x32" | ||
diff --git a/MAINTAINERS b/MAINTAINERS deleted file mode 100644 index 73a9fe3a..00000000 --- a/MAINTAINERS +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | This file contains a list of BSP maintainers for the BSPs contained in | ||
2 | the meta-intel repository. | ||
3 | |||
4 | The purpose of this file is to provide contact information for | ||
5 | specific BSPs and other code contained within meta-intel. You should | ||
6 | address questions and patches for a particular BSP or other code to | ||
7 | the appropriate maintainer listed in this file, cc'ing the meta-intel | ||
8 | mailing list. This ensures that your question or patch will be | ||
9 | addressed by the appropriate person, and that it will be seen by other | ||
10 | users who may be facing similar problems or questions. | ||
11 | |||
12 | Please see the top-level README file for guidelines relating to the | ||
13 | details of submitting patches, reporting problems, or asking questions | ||
14 | about any of the BSPs or other recipes contained within meta-intel. | ||
15 | |||
16 | Descriptions of section entries: | ||
17 | |||
18 | M: Mail patches to: FullName <address@domain> | ||
19 | F: Files and directories with wildcard patterns. | ||
20 | A trailing slash includes all files and subdirectory files. | ||
21 | F: common/ all files in and below common | ||
22 | F: common/* all files in common, but not below | ||
23 | One pattern per line. Multiple F: lines acceptable. | ||
24 | |||
25 | Please keep this list in alphabetical order. | ||
26 | |||
27 | Maintainers List (try to look for most precise areas first) | ||
28 | |||
29 | ----------------------------------- | ||
30 | |||
31 | M: Anuj Mittal <anuj.mittal@intel.com> | ||
32 | F: * | ||
diff --git a/README b/README deleted file mode 100644 index 58d6a505..00000000 --- a/README +++ /dev/null | |||
@@ -1,459 +0,0 @@ | |||
1 | meta-intel | ||
2 | ========== | ||
3 | |||
4 | This README file contains information on building and booting | ||
5 | meta-intel BSP layers. Please see the corresponding sections below | ||
6 | for details. | ||
7 | |||
8 | |||
9 | Yocto Project Compatible | ||
10 | ======================== | ||
11 | |||
12 | The BSPs contained in this layer are compatible with the Yocto Project | ||
13 | as per the requirements listed here: | ||
14 | |||
15 | https://www.yoctoproject.org/webform/yocto-project-compatible-registration | ||
16 | |||
17 | |||
18 | Dependencies | ||
19 | ============ | ||
20 | |||
21 | This layer depends on: | ||
22 | |||
23 | URI: git://git.openembedded.org/bitbake | ||
24 | |||
25 | URI: git://git.openembedded.org/openembedded-core | ||
26 | layers: meta | ||
27 | branch: master | ||
28 | |||
29 | |||
30 | Table of Contents | ||
31 | ================= | ||
32 | |||
33 | I. Overview | ||
34 | II. Building and booting meta-intel BSP layers | ||
35 | a. Building the intel-common BSP layers | ||
36 | b. Booting the intel-common BSP images | ||
37 | c. Building the installer image | ||
38 | III. Technical Miscellany | ||
39 | Benefits of using meta-intel | ||
40 | The intel-common kernel package architecture | ||
41 | Intel-specific machine features | ||
42 | IV. Tested Hardware | ||
43 | V. Guidelines for submitting patches | ||
44 | |||
45 | |||
46 | I. Overview | ||
47 | =========== | ||
48 | |||
49 | This is the location for Intel-maintained BSPs. | ||
50 | |||
51 | For details on the intel-common, see the information below. | ||
52 | |||
53 | For all others, please see the README files contained in the | ||
54 | individual BSP layers for BSP-specific information. | ||
55 | |||
56 | If you have problems with or questions about a particular BSP, please | ||
57 | contact the maintainer listed in the MAINTAINERS file directly (cc:ing | ||
58 | the Yocto mailing list puts it in the archive and helps other people | ||
59 | who might have the same questions in the future), but please try to do | ||
60 | the following first: | ||
61 | |||
62 | - look in the Yocto Project Bugzilla | ||
63 | (http://bugzilla.yoctoproject.org/) to see if a problem has | ||
64 | already been reported | ||
65 | |||
66 | - look through recent entries of the meta-intel | ||
67 | (https://lists.yoctoproject.org/pipermail/meta-intel/) and Yocto | ||
68 | (https://lists.yoctoproject.org/pipermail/yocto/) mailing list | ||
69 | archives to see if other people have run into similar problems or | ||
70 | had similar questions answered. | ||
71 | |||
72 | If you believe you have encountered a bug, you can open a new bug and | ||
73 | enter the details in the Yocto Project Bugzilla | ||
74 | (http://bugzilla.yoctoproject.org/). If you're relatively certain | ||
75 | that it's a bug against the BSP itself, please use the 'Yocto Project | ||
76 | Components: BSPs | meta-intel' category for the bug; otherwise, please | ||
77 | submit the bug against the most likely category for the problem - if | ||
78 | you're wrong, it's not a big deal and the bug will be recategorized | ||
79 | upon triage. | ||
80 | |||
81 | |||
82 | II. Building and booting meta-intel BSP layers | ||
83 | ============================================== | ||
84 | |||
85 | The following sections contain information on building and booting the | ||
86 | BSPs contained in the meta-intel layer. | ||
87 | |||
88 | Note that these instructions specifically cover the intel-common, which | ||
89 | may or may not be applicable to other BSPs contained in this layer - if | ||
90 | a given BSP contains its own README, that version should be used instead, | ||
91 | and these instructions can be ignored. | ||
92 | |||
93 | a. Building the intel-common BSP layers | ||
94 | ------------------------------------------------- | ||
95 | |||
96 | In order to build an image with BSP support for a given release, you | ||
97 | need to download the corresponding BSP tarball from the 'Board Support | ||
98 | Package (BSP) Downloads' page of the Yocto Project website (or | ||
99 | equivalently, check out the appropriate branch from the meta-intel git | ||
100 | repository, see below). For the intel-common BSPs, those tarballs would | ||
101 | correspond to the following choices in the BSP downloads section: | ||
102 | |||
103 | - Intel-core2-32 Intel® Common Core BSP (Intel-core2-32) | ||
104 | - Intel-corei7-64 Intel® Common Core BSP (Intel-corei7-64) | ||
105 | |||
106 | The intel-* BSPs, also known as the intel-common BSPs, provide a few | ||
107 | carefully selected tune options and generic hardware support to cover | ||
108 | the majority of current Intel CPUs and devices. The naming follows the | ||
109 | convention of intel-<TUNE>-<BITS>, where TUNE is the gcc cpu-type | ||
110 | (used with mtune and march typically) and BITS is either 32 bit or 64 | ||
111 | bit. | ||
112 | |||
113 | Having done that, and assuming you extracted the BSP tarball contents | ||
114 | at the top-level of your yocto build tree, you can build a BSP image | ||
115 | by adding the location of the meta-intel layer to bblayers.conf e.g.: | ||
116 | |||
117 | yocto/meta-intel \ | ||
118 | |||
119 | To enable a particular machine, you need to add a MACHINE line naming | ||
120 | the BSP to the local.conf file: | ||
121 | |||
122 | MACHINE ?= "xxx" | ||
123 | |||
124 | where 'xxx' is replaced by one of the following BSP names: | ||
125 | |||
126 | - intel-core2-32 | ||
127 | |||
128 | This BSP is optimized for the Core2 family of CPUs as well as all | ||
129 | Atom CPUs prior to the Silvermont core. | ||
130 | |||
131 | - intel-corei7-64 | ||
132 | |||
133 | This BSP is optimized for Nehalem and later Core and Xeon CPUs as | ||
134 | well as Silvermont and later Atom CPUs, such as the Baytrail SoCs. | ||
135 | |||
136 | You should then be able to build an image as such: | ||
137 | |||
138 | $ source oe-init-build-env | ||
139 | $ bitbake core-image-sato | ||
140 | |||
141 | At the end of a successful build, you should have an image that | ||
142 | you can boot from a USB flash drive (see instructions on how to do | ||
143 | that below, in the section 'Booting the intel-common BSP images'). | ||
144 | |||
145 | As an alternative to downloading the BSP tarball, you can also work | ||
146 | directly from the meta-intel git repository. For each BSP in the | ||
147 | 'meta-intel' repository, there are multiple branches, one | ||
148 | corresponding to each major release starting with 'laverne' (0.90), in | ||
149 | addition to the latest code which tracks the current master (note that | ||
150 | not all BSPs are present in every release). Instead of extracting | ||
151 | a BSP tarball at the top level of your yocto build tree, you can | ||
152 | equivalently check out the appropriate branch from the meta-intel | ||
153 | repository at the same location. | ||
154 | |||
155 | b. Booting the intel-common BSP images | ||
156 | -------------------------------------- | ||
157 | |||
158 | If you've built your own image, either from the downloaded BSP layer | ||
159 | or from the meta-intel git repository, you'll find the bootable | ||
160 | image in the build/tmp/deploy/images/xxx directory, where again | ||
161 | 'xxx' refers to the machine name used in the build. | ||
162 | |||
163 | Under Linux, insert a USB flash drive. Assuming the USB flash drive | ||
164 | takes device /dev/sdf, use dd to copy the image to it. Before the image | ||
165 | can be burned onto a USB drive, it should be un-mounted. Some Linux distros | ||
166 | may automatically mount a USB drive when it is plugged in. Using USB device | ||
167 | /dev/sdf as an example, find all mounted partitions: | ||
168 | |||
169 | $ mount | grep sdf | ||
170 | |||
171 | and un-mount those that are mounted, for example: | ||
172 | |||
173 | $ umount /dev/sdf1 | ||
174 | $ umount /dev/sdf2 | ||
175 | |||
176 | Now burn the image onto the USB drive: | ||
177 | |||
178 | $ sudo dd if=core-image-sato-intel-corei7-64.wic of=/dev/sdf status=progress | ||
179 | $ sync | ||
180 | $ eject /dev/sdf | ||
181 | |||
182 | This should give you a bootable USB flash device. Insert the device | ||
183 | into a bootable USB socket on the target, and power on. This should | ||
184 | result in a system booted to the Sato graphical desktop. | ||
185 | |||
186 | If you want a terminal, use the arrows at the top of the UI to move to | ||
187 | different pages of available applications, one of which is named | ||
188 | 'Terminal'. Clicking that should give you a root terminal. | ||
189 | |||
190 | If you want to ssh into the system, you can use the root terminal to | ||
191 | ifconfig the IP address and use that to ssh in. The root password is | ||
192 | empty, so to log in type 'root' for the user name and hit 'Enter' at | ||
193 | the Password prompt: and you should be in. | ||
194 | |||
195 | If you find you're getting corrupt images on the USB (it doesn't show | ||
196 | the syslinux boot: prompt, or the boot: prompt contains strange | ||
197 | characters), try doing this first: | ||
198 | |||
199 | $ dd if=/dev/zero of=/dev/sdf bs=1M count=512 | ||
200 | |||
201 | c. Building the installer image | ||
202 | ----------------------------------------------- | ||
203 | |||
204 | If you plan to install your image to your target machine, you can build a wic | ||
205 | based installer image instead of default wic image. To build it, you need to | ||
206 | add below configuration to local.conf : | ||
207 | |||
208 | WKS_FILE = "image-installer.wks.in" | ||
209 | IMAGE_FSTYPES:append = " ext4" | ||
210 | IMAGE_TYPEDEP_wic = "ext4" | ||
211 | INITRD_IMAGE_LIVE="core-image-minimal-initramfs" | ||
212 | do_image_wic[depends] += "${INITRD_IMAGE_LIVE}:do_image_complete" | ||
213 | do_rootfs[depends] += "virtual/kernel:do_deploy" | ||
214 | IMAGE_BOOT_FILES:append = "\ | ||
215 | ${KERNEL_IMAGETYPE} \ | ||
216 | microcode.cpio \ | ||
217 | ${IMGDEPLOYDIR}/${IMAGE_BASENAME}-${MACHINE}.ext4;rootfs.img \ | ||
218 | ${@bb.utils.contains('EFI_PROVIDER', 'grub-efi', 'grub-efi-bootx64.efi;EFI/BOOT/bootx64.efi', '', d)} \ | ||
219 | ${@bb.utils.contains('EFI_PROVIDER', 'grub-efi', '${IMAGE_ROOTFS}/boot/EFI/BOOT/grub.cfg;EFI/BOOT/grub.cfg', '', d)} \ | ||
220 | ${@bb.utils.contains('EFI_PROVIDER', 'systemd-boot', 'systemd-bootx64.efi;EFI/BOOT/bootx64.efi', '', d)} \ | ||
221 | ${@bb.utils.contains('EFI_PROVIDER', 'systemd-boot', '${IMAGE_ROOTFS}/boot/loader/loader.conf;loader/loader.conf ', '', d)} \ | ||
222 | ${@bb.utils.contains('EFI_PROVIDER', 'systemd-boot', '${IMAGE_ROOTFS}/boot/loader/entries/boot.conf;loader/entries/boot.conf', '', d)} " | ||
223 | |||
224 | Burn the wic image onto USB flash device, insert the device to target machine | ||
225 | and power on. This should start the installation process. | ||
226 | |||
227 | III. Technical Miscellany | ||
228 | ========================= | ||
229 | |||
230 | Benefits of using meta-intel | ||
231 | ---------------------------- | ||
232 | |||
233 | Using meta-intel has the following benefits over a generic BSP: | ||
234 | |||
235 | tune flags | ||
236 | ++++++++++ | ||
237 | intel-* MACHINEs each have different compilation flags appropriate for their | ||
238 | targeted hardware sets. intel-corei7-64 has tune flags appropriate for modern | ||
239 | 64-bit Intel Core i microarchitecture, and includes instruction sets up to | ||
240 | SSE4.2. intel-core2-32 has tune flags appropriate for legacy 32-bit Intel Core2 | ||
241 | microarchitecture, and includes instruction sets up to SSE3. | ||
242 | |||
243 | linux-intel kernel | ||
244 | ++++++++++++++++++ | ||
245 | The linux-intel kernel is an initiative to bring better Intel(R) hardware | ||
246 | support to the current LTS linux kernel. It contains a base LTS kernel with | ||
247 | additional backports from upstream Intel drivers. In addition, a default kernel | ||
248 | config containing most features found on Intel boards is supplied via the | ||
249 | yocto-kernel-cache. | ||
250 | |||
251 | graphics stack | ||
252 | ++++++++++++++ | ||
253 | Meta-intel provides the latest Intel Graphics Linux Stack drivers to support | ||
254 | Intel hardware as defined by the https://01.org/linuxgraphics. | ||
255 | |||
256 | Other software | ||
257 | ++++++++++++++ | ||
258 | * intel ucode - provides the latest microcode updates for Intel processors | ||
259 | |||
260 | * thermald - which proactively controls thermal, using P-states, T-states, and | ||
261 | the Intel power clamp driver. | ||
262 | (https://01.org/linux-thermal-daemon/documentation/introduction-thermal-daemon) | ||
263 | |||
264 | The intel-common kernel package architecture | ||
265 | -------------------------------------------- | ||
266 | |||
267 | These BSPs use what we call the intel-common Linux kernel package | ||
268 | architecture. This includes core2-32-intel-common and | ||
269 | corei7-64-intel-common. These kernel packages can also be used by any | ||
270 | of the BSPs in meta-intel that choose to include the | ||
271 | intel-common-pkgarch.inc file. | ||
272 | |||
273 | To minimize the proliferation of vendor trees, reduce the sources we | ||
274 | must support, and consolidate QA efforts, all BSP maintainers are | ||
275 | encouraged to make use of the intel-common Linux kernel package | ||
276 | architecture. | ||
277 | |||
278 | Intel-specific machine features | ||
279 | ------------------------------- | ||
280 | |||
281 | The meta-intel layer makes some additional machine features available | ||
282 | to BSPs. These machine features can be used in a BSP layer in the | ||
283 | same way that machine features are used in other layers based on | ||
284 | oe-core, via the MACHINE_FEATURES variable. | ||
285 | |||
286 | Requirements | ||
287 | ++++++++++++ | ||
288 | |||
289 | The meta-intel-specific machine features are only available to a BSP | ||
290 | when the meta-intel layer is included in the build configuration, and | ||
291 | the meta-intel.inc file is included in the machine configuration of | ||
292 | that BSP. | ||
293 | |||
294 | To make these features available for your machine, you will need to: | ||
295 | |||
296 | 1. include a configuration line such as the below in bblayers.conf | ||
297 | BBLAYERS += "<local path>/meta-intel" | ||
298 | 2. include the following line in the machine configuration file | ||
299 | require conf/machine/include/meta-intel.inc | ||
300 | |||
301 | Once the above requirements are met, the machine features provided by | ||
302 | the meta-intel layer will be available for the BSP to use. | ||
303 | |||
304 | Available machine features | ||
305 | ++++++++++++++++++++++++++ | ||
306 | |||
307 | Currently, the meta-intel layer makes the following set of | ||
308 | Intel-specific machine features available: | ||
309 | |||
310 | * intel-ucode | ||
311 | |||
312 | These machine features can be included by listing them in the | ||
313 | MACHINE_FEATURES variable in the machine configuration file. For | ||
314 | example: | ||
315 | |||
316 | MACHINE_FEATURES += "intel-ucode" | ||
317 | |||
318 | Machine feature details | ||
319 | +++++++++++++++++++++++ | ||
320 | |||
321 | * intel-ucode | ||
322 | |||
323 | This feature provides support for microcode updates to Intel | ||
324 | processors. The intel-ucode feature runs at early boot and uses | ||
325 | the microcode data file added by the feature into the BSP's | ||
326 | initrd. It also puts the userland microcode-updating tool, | ||
327 | iucode_tool, into the target images along with the microcode data | ||
328 | file. | ||
329 | |||
330 | Q. Why might a user want to enable the intel-ucode feature? | ||
331 | |||
332 | A. Intel releases microcode updates to correct processor behavior | ||
333 | as documented in the respective processor specification | ||
334 | updates. While the normal approach to getting such microcode | ||
335 | updates is via a BIOS upgrade, this can be an administrative | ||
336 | hassle and not always possible in the field. The intel-ucode | ||
337 | feature enables the microcode update capability present in the | ||
338 | Linux kernel. It provides an easy path for upgrading processor | ||
339 | microcode without the need to change the BIOS. If the feature | ||
340 | is enabled, it is also possible to update the existing target | ||
341 | images with a newer microcode update in the future. | ||
342 | |||
343 | Q. How would a user bundle only target-specific microcode in the | ||
344 | target image? | ||
345 | |||
346 | A. The Intel microcode data file released by Intel contains | ||
347 | microcode updates for multiple processors. If the BSP image is | ||
348 | meant to run on only a certain subset of processor types, a | ||
349 | processor-specific subset of microcode can be bundled into the | ||
350 | target image via the UCODE_FILTER_PARAMETERS variable. This | ||
351 | works by listing a sequence of iucode-tool parameters in the | ||
352 | UCODE_FILTER_PARAMETERS variable, which in this case will | ||
353 | select only the specific microcode relevant to the BSP. For | ||
354 | more information on the underlying parameters refer to the | ||
355 | iucode-tool manual page at http://manned.org/iucode-tool | ||
356 | |||
357 | To define a set of parameters for microcode-filtering via the | ||
358 | UCODE_FILTER_PARAMETERS variable, one needs to identify the | ||
359 | cpuid signatures of all the processors the BSP is meant to run | ||
360 | on. One way to determine the cpuid signature for a specific | ||
361 | processor is to build and run an intel-ucode-feature-enabled | ||
362 | image on the target hardware, without first assigning any value | ||
363 | to the UCODE_FILTER_PARAMETERS variable, and then once the | ||
364 | image is booted, run the "ucode_tool -S" command to have the | ||
365 | ucode tool scan the system for processor signatures. These | ||
366 | signatures can then be used in the UCODE_FILTER_PARAMETERS | ||
367 | variable in conjunction with -s parameter. For example, for | ||
368 | the fri2 BSP, the cpuid can be determined as such: | ||
369 | |||
370 | [root@fri2 ~]# iucode_tool -S | ||
371 | iucode_tool: system has processor(s) with signature 0x00020661 | ||
372 | |||
373 | Given that output, a suitable UCODE_FILTER_PARAMETERS variable | ||
374 | definition could be specified in the machine configuration as | ||
375 | such: | ||
376 | |||
377 | UCODE_FILTER_PARAMETERS = "-s 0x00020661" | ||
378 | |||
379 | Q. Are there any reasons a user might want to disable the | ||
380 | intel-ucode feature? | ||
381 | |||
382 | A. The microcode data file and associated tools occupy a small | ||
383 | amount of space (a few KB) on the target image. BSPs which are | ||
384 | highly sensitive to target image size and which are not | ||
385 | experiencing microcode-related issues might consider not | ||
386 | enabling this feature. | ||
387 | |||
388 | |||
389 | IV. Tested Hardware | ||
390 | =================== | ||
391 | |||
392 | The following undergo regular basic testing with their respective MACHINE types. | ||
393 | Note that both 64-bit and 32-bit firmware is available for the MinnowBoard | ||
394 | Turbot, so it is tested against both intel-corei7-64 and intel-core2-32. | ||
395 | |||
396 | intel-corei7-64: | ||
397 | NUC6i5SYH | ||
398 | NUC7i7BNH | ||
399 | Coffee Lake-H | ||
400 | |||
401 | intel-core2-32: | ||
402 | MinnowBoard Turbot | ||
403 | |||
404 | |||
405 | V. Guidelines for submitting patches | ||
406 | ==================================== | ||
407 | |||
408 | Please submit any patches against meta-intel BSPs to the meta-intel | ||
409 | mailing list (meta-intel@lists.yoctoproject.org). Also, if your patches are | ||
410 | available via a public git repository, please also include a URL to | ||
411 | the repo and branch containing your patches as that makes it easier | ||
412 | for maintainers to grab and test your patches. | ||
413 | |||
414 | There are patch submission scripts available that will, among other | ||
415 | things, automatically include the repo URL and branch as mentioned. | ||
416 | Please see the Yocto Project Development Manual sections entitled | ||
417 | 'Using Scripts to Push a Change Upstream and Request a Pull' and | ||
418 | 'Using Email to Submit a Patch' for details. | ||
419 | |||
420 | Regardless of how you submit a patch or patchset, the patches should | ||
421 | at minimum follow the suggestions outlined in the 'Submitting a Change | ||
422 | to the Yocto Project' section in the Yocto Project Development Manual. | ||
423 | Specifically, they should: | ||
424 | |||
425 | - Include a 'Signed-off-by:' line. A commit can't legally be pulled | ||
426 | in without this. | ||
427 | |||
428 | - Provide a single-line, short summary of the change. This short | ||
429 | description should be prefixed by the BSP or recipe name, as | ||
430 | appropriate, followed by a colon. Capitalize the first character | ||
431 | of the summary (following the colon). | ||
432 | |||
433 | - For the body of the commit message, provide detailed information | ||
434 | that describes what you changed, why you made the change, and the | ||
435 | approach you used. | ||
436 | |||
437 | - If the change addresses a specific bug or issue that is associated | ||
438 | with a bug-tracking ID, include a reference to that ID in your | ||
439 | detailed description in the following format: [YOCTO #<bug-id>]. | ||
440 | |||
441 | - Pay attention to line length - please don't allow any particular | ||
442 | line in the commit message to stretch past 72 characters. | ||
443 | |||
444 | - For any non-trivial patch, provide information about how you | ||
445 | tested the patch, and for any non-trivial or non-obvious testing | ||
446 | setup, provide details of that setup. | ||
447 | |||
448 | Doing a quick 'git log' in meta-intel will provide you with many | ||
449 | examples of good example commits if you have questions about any | ||
450 | aspect of the preferred format. | ||
451 | |||
452 | The meta-intel maintainers will do their best to review and/or pull in | ||
453 | a patch or patchset within 24 hours of the time it was posted. For | ||
454 | larger and/or more involved patches and patchsets, the review process | ||
455 | may take longer. | ||
456 | |||
457 | Please see the meta-intel/MAINTAINERS file for the list of maintainers | ||
458 | and their specific areas; it's also a good idea to cc: the specific | ||
459 | maintainer, if applicable. | ||
diff --git a/README.md b/README.md new file mode 100644 index 00000000..91577f1d --- /dev/null +++ b/README.md | |||
@@ -0,0 +1,36 @@ | |||
1 | # meta-intel | ||
2 | |||
3 | OpenEmbedded/Yocto BSP layer for Intel platforms. | ||
4 | |||
5 | ## Dependencies | ||
6 | |||
7 | This layer primarily depends on OpenEmbedded-Core (OE-Core). However, certain | ||
8 | recipes may require additional layers to support optional features or | ||
9 | programming languages not supported by OE-Core. Such recipes are located within | ||
10 | the `dynamic-layers` directory. | ||
11 | |||
12 | Base dependencies: | ||
13 | - [Bitbake](https://git.openembedded.org/bitbake) | ||
14 | - [OE-Core](https://git.openembedded.org/openembedded-core) | ||
15 | |||
16 | Dynamic additional dependencies: | ||
17 | |||
18 | - [meta-openembedded](https://git.openembedded.org/meta-openembedded/tree/meta-oe) | ||
19 | - [meta-python](https://git.openembedded.org/meta-openembedded/tree/meta-python) | ||
20 | - [meta-clang](https://github.com/kraj/meta-clang.git) | ||
21 | |||
22 | |||
23 | ## Contents | ||
24 | |||
25 | - [Building and booting meta-intel BSP layers](documentation/building_and_booting.md) | ||
26 | - [Intel oneAPI DPC++/C++ Compiler](documentation/dpcpp-compiler.md) | ||
27 | - [Build Image with OpenVINO™ toolkit](documentation/openvino.md) | ||
28 | - [Tested Hardware](documentation/tested_hardware.md) | ||
29 | - [Guidelines for submitting patches](documentation/submitting_patches.md) | ||
30 | - [Reporting bugs](documentation/reporting_bugs.md) | ||
31 | - [Reporting security bugs](SECURITY.md) | ||
32 | |||
33 | ## Maintainers | ||
34 | |||
35 | - Anuj Mittal <anuj.mittal@intel.com> | ||
36 | |||
diff --git a/README.sources b/README.sources deleted file mode 100644 index 9b483ee0..00000000 --- a/README.sources +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | The sources for the packages comprising the images shipped with this | ||
2 | BSP can be found at the following location: | ||
3 | |||
4 | http://downloads.yoctoproject.org/mirror/sources/ | ||
5 | |||
6 | The metadata used to generate the images shipped with this BSP, in | ||
7 | addition to the code contained in this BSP, can be found at the | ||
8 | following location: | ||
9 | |||
10 | http://downloads.yoctoproject.org/releases/yocto/yocto-2.7/poky-warrior-21.0.0.tar.bz2 | ||
11 | |||
12 | The metadata used to generate the images shipped with this BSP, in | ||
13 | addition to the code contained in this BSP, can also be found at the | ||
14 | following locations: | ||
15 | |||
16 | git://git.yoctoproject.org/poky.git | ||
17 | git://git.yoctoproject.org/meta-intel | ||
diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..e70fcb0f --- /dev/null +++ b/SECURITY.md | |||
@@ -0,0 +1,6 @@ | |||
1 | # Security Policy | ||
2 | Intel is committed to rapidly addressing security vulnerabilities affecting our customers and providing clear guidance on the solution, impact, severity and mitigation. | ||
3 | |||
4 | ## Reporting a Vulnerability | ||
5 | Please report any security vulnerabilities in this project [utilizing the guidelines here](https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html). | ||
6 | |||
diff --git a/classes/uefi-comboapp.bbclass b/classes/uefi-comboapp.bbclass deleted file mode 100644 index a05e0ca0..00000000 --- a/classes/uefi-comboapp.bbclass +++ /dev/null | |||
@@ -1,151 +0,0 @@ | |||
1 | # This class brings a more generic version of the UEFI combo app from refkit to meta-intel. | ||
2 | # It uses a combo file, containing kernel, initramfs and | ||
3 | # command line, presented to the BIOS as UEFI application, by prepending | ||
4 | # it with the efi stub obtained from systemd-boot. | ||
5 | |||
6 | # Don't add syslinux or build an ISO | ||
7 | PCBIOS:forcevariable = "0" | ||
8 | NOISO:forcevariable = "1" | ||
9 | |||
10 | # image-live.bbclass will default INITRD_LIVE to the image INITRD_IMAGE creates. | ||
11 | # We want behavior to be consistent whether or not "live" is in IMAGE_FSTYPES, so | ||
12 | # we default INITRD_LIVE to the INITRD_IMAGE as well. | ||
13 | INITRD_IMAGE ?= "core-image-minimal-initramfs" | ||
14 | INITRD_LIVE ?= " ${@ ('${DEPLOY_DIR_IMAGE}/' + d.getVar('INITRD_IMAGE', expand=True) + '-${MACHINE}.cpio.gz') if d.getVar('INITRD_IMAGE', True) else ''}" | ||
15 | |||
16 | do_uefiapp[depends] += " \ | ||
17 | intel-microcode:do_deploy \ | ||
18 | systemd-boot:do_deploy \ | ||
19 | virtual/kernel:do_deploy \ | ||
20 | " | ||
21 | |||
22 | # INITRD_IMAGE is added to INITRD_LIVE, which we use to create our initrd, so depend on it if it is set | ||
23 | do_uefiapp[depends] += "${@ '${INITRD_IMAGE}:do_image_complete' if d.getVar('INITRD_IMAGE') else ''}" | ||
24 | |||
25 | # The image does without traditional bootloader. | ||
26 | # In its place, instead, it uses a single UEFI executable binary, which is | ||
27 | # composed by: | ||
28 | # - an UEFI stub | ||
29 | # The linux kernel can generate a UEFI stub, however the one from systemd-boot can fetch | ||
30 | # the command line from a separate section of the EFI application, avoiding the need to | ||
31 | # rebuild the kernel. | ||
32 | # - the kernel | ||
33 | # - an initramfs (optional) | ||
34 | |||
35 | def create_uefiapp(d, uuid=None, app_suffix=''): | ||
36 | import glob, re | ||
37 | from subprocess import check_call | ||
38 | |||
39 | build_dir = d.getVar('B') | ||
40 | deploy_dir_image = d.getVar('DEPLOY_DIR_IMAGE') | ||
41 | image_link_name = d.getVar('IMAGE_LINK_NAME') | ||
42 | |||
43 | cmdline = '%s/cmdline.txt' % build_dir | ||
44 | linux = '%s/%s' % (deploy_dir_image, d.getVar('KERNEL_IMAGETYPE')) | ||
45 | initrd = '%s/initrd' % build_dir | ||
46 | |||
47 | stub_path = '%s/linux*.efi.stub' % deploy_dir_image | ||
48 | stub = glob.glob(stub_path)[0] | ||
49 | m = re.match(r"\S*(ia32|x64)(.efi)\S*", os.path.basename(stub)) | ||
50 | app = "boot%s%s%s" % (m.group(1), app_suffix, m.group(2)) | ||
51 | executable = '%s/%s.%s' % (deploy_dir_image, image_link_name, app) | ||
52 | |||
53 | if d.getVar('INITRD_LIVE'): | ||
54 | with open(initrd, 'wb') as dst: | ||
55 | for cpio in d.getVar('INITRD_LIVE').split(): | ||
56 | with open(cpio, 'rb') as src: | ||
57 | dst.write(src.read()) | ||
58 | initrd_cmd = "--add-section .initrd=%s --change-section-vma .initrd=0x3000000 " % initrd | ||
59 | else: | ||
60 | initrd_cmd = "" | ||
61 | |||
62 | root = 'root=PARTUUID=%s' % uuid if uuid else '' | ||
63 | |||
64 | with open(cmdline, 'w') as f: | ||
65 | f.write('%s %s' % (d.getVar('APPEND'), root)) | ||
66 | |||
67 | objcopy_cmd = ("objcopy " | ||
68 | "--add-section .cmdline=%s --change-section-vma .cmdline=0x30000 " | ||
69 | "--add-section .linux=%s --change-section-vma .linux=0x40000 " | ||
70 | "%s %s %s") % \ | ||
71 | (cmdline, linux, initrd_cmd, stub, executable) | ||
72 | |||
73 | check_call(objcopy_cmd, shell=True) | ||
74 | |||
75 | python create_uefiapps () { | ||
76 | # We must clean up anything that matches the expected output pattern, to ensure that | ||
77 | # the next steps do not accidentally use old files. | ||
78 | import glob | ||
79 | pattern = d.expand('${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.boot*.efi') | ||
80 | for old_efi in glob.glob(pattern): | ||
81 | os.unlink(old_efi) | ||
82 | uuid = d.getVar('DISK_SIGNATURE_UUID') | ||
83 | create_uefiapp(d, uuid=uuid) | ||
84 | } | ||
85 | |||
86 | # This is intentionally split into different parts. This way, derived | ||
87 | # classes or images can extend the individual parts. We can also use | ||
88 | # whatever language (shell script or Python) is more suitable. | ||
89 | python do_uefiapp() { | ||
90 | bb.build.exec_func('create_uefiapps', d) | ||
91 | } | ||
92 | |||
93 | do_uefiapp[vardeps] += "APPEND DISK_SIGNATURE_UUID INITRD_LIVE KERNEL_IMAGETYPE IMAGE_LINK_NAME" | ||
94 | |||
95 | uefiapp_deploy_at() { | ||
96 | dest=$1 | ||
97 | for i in ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.boot*.efi; do | ||
98 | target=`basename $i` | ||
99 | target=`echo $target | sed -e 's/${IMAGE_LINK_NAME}.//'` | ||
100 | cp --preserve=timestamps -r $i $dest/$target | ||
101 | done | ||
102 | } | ||
103 | |||
104 | fakeroot do_uefiapp_deploy() { | ||
105 | rm -rf ${IMAGE_ROOTFS}/boot/* | ||
106 | dest=${IMAGE_ROOTFS}/boot/EFI/BOOT | ||
107 | mkdir -p $dest | ||
108 | uefiapp_deploy_at $dest | ||
109 | } | ||
110 | |||
111 | do_uefiapp_deploy[depends] += "${PN}:do_uefiapp virtual/fakeroot-native:do_populate_sysroot" | ||
112 | |||
113 | |||
114 | # This decides when/how we add our tasks to the image | ||
115 | python () { | ||
116 | image_fstypes = d.getVar('IMAGE_FSTYPES', True) | ||
117 | initramfs_fstypes = d.getVar('INITRAMFS_FSTYPES', True) | ||
118 | |||
119 | # Don't add any of these tasks to initramfs images | ||
120 | if initramfs_fstypes not in image_fstypes: | ||
121 | bb.build.addtask('uefiapp', 'do_image', 'do_rootfs', d) | ||
122 | bb.build.addtask('uefiapp_deploy', 'do_image', 'do_rootfs', d) | ||
123 | } | ||
124 | |||
125 | SIGN_AFTER ?= "do_uefiapp" | ||
126 | SIGN_BEFORE ?= "do_uefiapp_deploy" | ||
127 | SIGNING_DIR ?= "${DEPLOY_DIR_IMAGE}" | ||
128 | SIGNING_BINARIES ?= "${IMAGE_LINK_NAME}.boot*.efi" | ||
129 | inherit uefi-sign | ||
130 | |||
131 | # Legacy hddimg support below this line | ||
132 | efi_hddimg_populate() { | ||
133 | uefiapp_deploy_at "$1" | ||
134 | } | ||
135 | |||
136 | build_efi_cfg() { | ||
137 | # The command line is built into the combo app, so this is a null op | ||
138 | : | ||
139 | } | ||
140 | |||
141 | populate_kernel:append() { | ||
142 | # The kernel and initrd are built into the app, so we don't need these | ||
143 | if [ -f $dest/initrd ]; then | ||
144 | rm $dest/initrd | ||
145 | fi | ||
146 | if [ -f $dest/vmlinuz ]; then | ||
147 | rm $dest/vmlinuz | ||
148 | fi | ||
149 | } | ||
150 | |||
151 | IMAGE_FEATURES[validitems] += "secureboot" | ||
diff --git a/classes/uefi-sign.bbclass b/classes/uefi-sign.bbclass deleted file mode 100644 index e8f203b9..00000000 --- a/classes/uefi-sign.bbclass +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | # By default, sign all .efi binaries in ${B} after compiling and before deploying | ||
2 | SIGNING_DIR ?= "${B}" | ||
3 | SIGNING_BINARIES ?= "*.efi" | ||
4 | SIGN_AFTER ?= "do_compile" | ||
5 | SIGN_BEFORE ?= "do_deploy" | ||
6 | |||
7 | python () { | ||
8 | import os | ||
9 | import hashlib | ||
10 | |||
11 | # Ensure that if the signing key or cert change, we rerun the uefiapp process | ||
12 | if bb.utils.contains('IMAGE_FEATURES', 'secureboot', True, False, d): | ||
13 | for varname in ('SECURE_BOOT_SIGNING_CERT', 'SECURE_BOOT_SIGNING_KEY'): | ||
14 | filename = d.getVar(varname) | ||
15 | if filename is None: | ||
16 | bb.fatal('%s is not set.' % varname) | ||
17 | if not os.path.isfile(filename): | ||
18 | bb.fatal('%s=%s is not a file.' % (varname, filename)) | ||
19 | with open(filename, 'rb') as f: | ||
20 | data = f.read() | ||
21 | hash = hashlib.sha256(data).hexdigest() | ||
22 | d.setVar('%s_HASH' % varname, hash) | ||
23 | |||
24 | # Must reparse and thus rehash on file changes. | ||
25 | bb.parse.mark_dependency(d, filename) | ||
26 | |||
27 | bb.build.addtask('uefi_sign', d.getVar('SIGN_BEFORE'), d.getVar('SIGN_AFTER'), d) | ||
28 | |||
29 | # Original binary needs to be regenerated if the hash changes since we overwrite it | ||
30 | # SIGN_AFTER isn't necessarily when it gets generated, but its our best guess | ||
31 | d.appendVarFlag(d.getVar('SIGN_AFTER'), 'vardeps', 'SECURE_BOOT_SIGNING_CERT_HASH SECURE_BOOT_SIGNING_KEY_HASH') | ||
32 | } | ||
33 | |||
34 | do_uefi_sign() { | ||
35 | if [ -f ${SECURE_BOOT_SIGNING_KEY} ] && [ -f ${SECURE_BOOT_SIGNING_CERT} ]; then | ||
36 | for i in `find ${SIGNING_DIR}/ -name '${SIGNING_BINARIES}'`; do | ||
37 | sbsign --key ${SECURE_BOOT_SIGNING_KEY} --cert ${SECURE_BOOT_SIGNING_CERT} $i | ||
38 | sbverify --cert ${SECURE_BOOT_SIGNING_CERT} $i.signed | ||
39 | mv $i.signed $i | ||
40 | done | ||
41 | fi | ||
42 | } | ||
43 | |||
44 | do_uefi_sign[depends] += "sbsigntool-native:do_populate_sysroot" | ||
45 | |||
46 | do_uefi_sign[vardeps] += "SECURE_BOOT_SIGNING_CERT_HASH \ | ||
47 | SECURE_BOOT_SIGNING_KEY_HASH \ | ||
48 | SIGNING_BINARIES SIGNING_DIR \ | ||
49 | SIGN_BEFORE SIGN_AFTER \ | ||
50 | " | ||
diff --git a/conf/include/maintainers.inc b/conf/include/maintainers.inc index b82868ec..fb8b0b12 100644 --- a/conf/include/maintainers.inc +++ b/conf/include/maintainers.inc | |||
@@ -8,11 +8,11 @@ RECIPE_MAINTAINER:pn-core-image-minimal-initramfs = "Anuj Mittal <anuj.mittal@in | |||
8 | RECIPE_MAINTAINER:pn-embree = "Naveen Saini <naveen.kumar.saini@intel.com>" | 8 | RECIPE_MAINTAINER:pn-embree = "Naveen Saini <naveen.kumar.saini@intel.com>" |
9 | RECIPE_MAINTAINER:pn-gmmlib = "Lim Siew Hoon <siew.hoon.lim@intel.com>" | 9 | RECIPE_MAINTAINER:pn-gmmlib = "Lim Siew Hoon <siew.hoon.lim@intel.com>" |
10 | RECIPE_MAINTAINER:pn-hdcp = "Naveen Saini <naveen.kumar.saini@intel.com>" | 10 | RECIPE_MAINTAINER:pn-hdcp = "Naveen Saini <naveen.kumar.saini@intel.com>" |
11 | RECIPE_MAINTAINER:pn-intel-graphics-compiler = "Naveen Saini <naveen.kumar.saini@intel.com>" | 11 | RECIPE_MAINTAINER:pn-intel-cmt-cat = "Naveen Saini <naveen.kumar.saini@intel.com>" |
12 | RECIPE_MAINTAINER:pn-intel-compute-runtime = "Naveen Saini <naveen.kumar.saini@intel.com>" | 12 | RECIPE_MAINTAINER:pn-intel-compute-runtime = "Naveen Saini <naveen.kumar.saini@intel.com>" |
13 | RECIPE_MAINTAINER:pn-intel-crypto-mb = "Anuj Mittal <anuj.mittal@intel.com>" | 13 | RECIPE_MAINTAINER:pn-intel-crypto-mb = "Anuj Mittal <anuj.mittal@intel.com>" |
14 | RECIPE_MAINTAINER:pn-intel-graphics-compiler = "Naveen Saini <naveen.kumar.saini@intel.com>" | ||
14 | RECIPE_MAINTAINER:pn-intel-media-driver = "Lim Siew Hoon <siew.hoon.lim@intel.com>" | 15 | RECIPE_MAINTAINER:pn-intel-media-driver = "Lim Siew Hoon <siew.hoon.lim@intel.com>" |
15 | RECIPE_MAINTAINER:pn-intel-mediasdk = "Lim Siew Hoon <siew.hoon.lim@intel.com>" | ||
16 | RECIPE_MAINTAINER:pn-intel-microcode = "Anuj Mittal <anuj.mittal@intel.com>" | 16 | RECIPE_MAINTAINER:pn-intel-microcode = "Anuj Mittal <anuj.mittal@intel.com>" |
17 | RECIPE_MAINTAINER:pn-intel-vaapi-driver = "Lim Siew Hoon <siew.hoon.lim@intel.com>" | 17 | RECIPE_MAINTAINER:pn-intel-vaapi-driver = "Lim Siew Hoon <siew.hoon.lim@intel.com>" |
18 | RECIPE_MAINTAINER:pn-ipmctl = "Anuj Mittal <anuj.mittal@intel.com>" | 18 | RECIPE_MAINTAINER:pn-ipmctl = "Anuj Mittal <anuj.mittal@intel.com>" |
@@ -22,7 +22,6 @@ RECIPE_MAINTAINER:pn-itt = "Naveen Saini <naveen.kumar.saini@intel.com>" | |||
22 | RECIPE_MAINTAINER:pn-ixgbe = "Naveen Saini <naveen.kumar.saini@intel.com>" | 22 | RECIPE_MAINTAINER:pn-ixgbe = "Naveen Saini <naveen.kumar.saini@intel.com>" |
23 | RECIPE_MAINTAINER:pn-ixgbevf = "Naveen Saini <naveen.kumar.saini@intel.com>" | 23 | RECIPE_MAINTAINER:pn-ixgbevf = "Naveen Saini <naveen.kumar.saini@intel.com>" |
24 | RECIPE_MAINTAINER:pn-iucode-tool = "Anuj Mittal <anuj.mittal@intel.com>" | 24 | RECIPE_MAINTAINER:pn-iucode-tool = "Anuj Mittal <anuj.mittal@intel.com>" |
25 | RECIPE_MAINTAINER:pn-jhi = "Naveen Saini <naveen.kumar.saini@intel.com>" | ||
26 | RECIPE_MAINTAINER:pn-level-zero = "Naveen Saini <naveen.kumar.saini@intel.com>" | 25 | RECIPE_MAINTAINER:pn-level-zero = "Naveen Saini <naveen.kumar.saini@intel.com>" |
27 | RECIPE_MAINTAINER:pn-libipt = "Naveen Saini <naveen.kumar.saini@intel.com>" | 26 | RECIPE_MAINTAINER:pn-libipt = "Naveen Saini <naveen.kumar.saini@intel.com>" |
28 | RECIPE_MAINTAINER:pn-libva-intel = "Anuj Mittal <anuj.mittal@intel.com>" | 27 | RECIPE_MAINTAINER:pn-libva-intel = "Anuj Mittal <anuj.mittal@intel.com>" |
@@ -31,6 +30,7 @@ RECIPE_MAINTAINER:pn-libxcam = "Naveen Saini <naveen.kumar.saini@intel.com>" | |||
31 | RECIPE_MAINTAINER:pn-linux-intel = "Anuj Mittal <anuj.mittal@intel.com>" | 30 | RECIPE_MAINTAINER:pn-linux-intel = "Anuj Mittal <anuj.mittal@intel.com>" |
32 | RECIPE_MAINTAINER:pn-linux-intel-rt = "Anuj Mittal <anuj.mittal@intel.com>" | 31 | RECIPE_MAINTAINER:pn-linux-intel-rt = "Anuj Mittal <anuj.mittal@intel.com>" |
33 | RECIPE_MAINTAINER:pn-linux-intel-dev = "Naveen Saini <naveen.kumar.saini@intel.com>" | 32 | RECIPE_MAINTAINER:pn-linux-intel-dev = "Naveen Saini <naveen.kumar.saini@intel.com>" |
33 | RECIPE_MAINTAINER:pn-linux-npu-driver = "Naveen Saini <naveen.kumar.saini@intel.com>" | ||
34 | RECIPE_MAINTAINER:pn-lms = "Anuj Mittal <anuj.mittal@intel.com>" | 34 | RECIPE_MAINTAINER:pn-lms = "Anuj Mittal <anuj.mittal@intel.com>" |
35 | RECIPE_MAINTAINER:pn-metee = "Naveen Saini <naveen.kumar.saini@intel.com>" | 35 | RECIPE_MAINTAINER:pn-metee = "Naveen Saini <naveen.kumar.saini@intel.com>" |
36 | RECIPE_MAINTAINER:pn-metrics-discovery = "Naveen Saini <naveen.kumar.saini@intel.com>" | 36 | RECIPE_MAINTAINER:pn-metrics-discovery = "Naveen Saini <naveen.kumar.saini@intel.com>" |
@@ -39,17 +39,9 @@ RECIPE_MAINTAINER:pn-onednn = "Naveen Saini <naveen.kumar.saini@intel.com>" | |||
39 | RECIPE_MAINTAINER:pn-onedpl = "Naveen Saini <naveen.kumar.saini@intel.com>" | 39 | RECIPE_MAINTAINER:pn-onedpl = "Naveen Saini <naveen.kumar.saini@intel.com>" |
40 | RECIPE_MAINTAINER:pn-onevpl = "Naveen Saini <naveen.kumar.saini@intel.com>" | 40 | RECIPE_MAINTAINER:pn-onevpl = "Naveen Saini <naveen.kumar.saini@intel.com>" |
41 | RECIPE_MAINTAINER:pn-onevpl-intel-gpu = "Yew Chang Ching <chang.ching.yew@intel.com>" | 41 | RECIPE_MAINTAINER:pn-onevpl-intel-gpu = "Yew Chang Ching <chang.ching.yew@intel.com>" |
42 | RECIPE_MAINTAINER:pn-open-model-zoo = "Anuj Mittal <anuj.mittal@intel.com>" | ||
43 | RECIPE_MAINTAINER:pn-opencl-clang = "Naveen Saini <naveen.kumar.saini@intel.com>" | 42 | RECIPE_MAINTAINER:pn-opencl-clang = "Naveen Saini <naveen.kumar.saini@intel.com>" |
44 | RECIPE_MAINTAINER:pn-openvino-inference-engine = "Anuj Mittal <anuj.mittal@intel.com>" | ||
45 | RECIPE_MAINTAINER:pn-openvino-model-optimizer = "Anuj Mittal <anuj.mittal@intel.com>" | ||
46 | RECIPE_MAINTAINER:pn-openvkl = "Naveen Saini <naveen.kumar.saini@intel.com>" | 43 | RECIPE_MAINTAINER:pn-openvkl = "Naveen Saini <naveen.kumar.saini@intel.com>" |
47 | RECIPE_MAINTAINER:pn-ospray = "Naveen Saini <naveen.kumar.saini@intel.com>" | 44 | RECIPE_MAINTAINER:pn-ospray = "Naveen Saini <naveen.kumar.saini@intel.com>" |
48 | RECIPE_MAINTAINER:pn-ovmf-shell-image-enrollkeys = "Naveen Saini <naveen.kumar.saini@intel.com>" | ||
49 | RECIPE_MAINTAINER:pn-rkcommon = "Naveen Saini <naveen.kumar.saini@intel.com>" | 45 | RECIPE_MAINTAINER:pn-rkcommon = "Naveen Saini <naveen.kumar.saini@intel.com>" |
50 | RECIPE_MAINTAINER:pn-sbsigntool-native = "Anuj Mittal <anuj.mittal@intel.com>" | ||
51 | RECIPE_MAINTAINER:pn-secureboot-selftest-image-signed = "Anuj Mittal <anuj.mittal@intel.com>" | ||
52 | RECIPE_MAINTAINER:pn-secureboot-selftest-image-unsigned = "Anuj Mittal <anuj.mittal@intel.com>" | ||
53 | RECIPE_MAINTAINER:pn-thermald = "Anuj Mittal <anuj.mittal@intel.com>" | 46 | RECIPE_MAINTAINER:pn-thermald = "Anuj Mittal <anuj.mittal@intel.com>" |
54 | RECIPE_MAINTAINER:pn-vc-intrinsics = "Naveen Saini <naveen.kumar.saini@intel.com>" | ||
55 | RECIPE_MAINTAINER:pn-xf86-video-ast = "Anuj Mittal <anuj.mittal@intel.com>" | 47 | RECIPE_MAINTAINER:pn-xf86-video-ast = "Anuj Mittal <anuj.mittal@intel.com>" |
diff --git a/conf/layer.conf b/conf/layer.conf index 64e209b6..9365f3a2 100644 --- a/conf/layer.conf +++ b/conf/layer.conf | |||
@@ -19,7 +19,7 @@ LAYERRECOMMENDS_intel = "dpdk" | |||
19 | # This should only be incremented on significant changes that will | 19 | # This should only be incremented on significant changes that will |
20 | # cause compatibility issues with other layers | 20 | # cause compatibility issues with other layers |
21 | LAYERVERSION_intel = "5" | 21 | LAYERVERSION_intel = "5" |
22 | LAYERSERIES_COMPAT_intel = "kirkstone" | 22 | LAYERSERIES_COMPAT_intel = "scarthgap whinlatter" |
23 | 23 | ||
24 | BBFILES_DYNAMIC += " \ | 24 | BBFILES_DYNAMIC += " \ |
25 | clang-layer:${LAYERDIR}/dynamic-layers/clang-layer/*/*/*.bb \ | 25 | clang-layer:${LAYERDIR}/dynamic-layers/clang-layer/*/*/*.bb \ |
@@ -41,3 +41,5 @@ PREFERRED_PROVIDER_nativesdk-libva ?= "nativesdk-libva" | |||
41 | PREFERRED_PROVIDER_libva-utils ?= "libva-utils" | 41 | PREFERRED_PROVIDER_libva-utils ?= "libva-utils" |
42 | PREFERRED_PROVIDER_libva-utils-native ?= "libva-utils-native" | 42 | PREFERRED_PROVIDER_libva-utils-native ?= "libva-utils-native" |
43 | PREFERRED_PROVIDER_nativesdk-libva-utils ?= "nativesdk-libva-utils" | 43 | PREFERRED_PROVIDER_nativesdk-libva-utils ?= "nativesdk-libva-utils" |
44 | |||
45 | addpylib ${LAYERDIR}/lib oeqa | ||
diff --git a/conf/machine/include/meta-intel.inc b/conf/machine/include/meta-intel.inc index 9639a4b8..c98aa78a 100644 --- a/conf/machine/include/meta-intel.inc +++ b/conf/machine/include/meta-intel.inc | |||
@@ -7,10 +7,10 @@ | |||
7 | PREFERRED_PROVIDER_virtual/kernel ?= "linux-intel" | 7 | PREFERRED_PROVIDER_virtual/kernel ?= "linux-intel" |
8 | PREFERRED_PROVIDER_virtual/kernel:poky-tiny ?= "linux-intel" | 8 | PREFERRED_PROVIDER_virtual/kernel:poky-tiny ?= "linux-intel" |
9 | 9 | ||
10 | PREFERRED_VERSION_linux-intel ?= "5.15%" | 10 | PREFERRED_VERSION_linux-intel ?= "6.12%" |
11 | PREFERRED_VERSION_linux-intel-rt ?= "5.15%" | 11 | PREFERRED_VERSION_linux-intel-rt ?= "6.12%" |
12 | PREFERRED_VERSION_linux-intel:poky-altcfg ?= "5.15%" | 12 | PREFERRED_VERSION_linux-intel:poky-altcfg ?= "6.12%" |
13 | PREFERRED_VERSION_linux-intel-rt:poky-altcfg ?= "5.15%" | 13 | PREFERRED_VERSION_linux-intel-rt:poky-altcfg ?= "6.12%" |
14 | 14 | ||
15 | # Need to point to latest version of libva needed for media components | 15 | # Need to point to latest version of libva needed for media components |
16 | PREFERRED_PROVIDER_libva = "libva-intel" | 16 | PREFERRED_PROVIDER_libva = "libva-intel" |
@@ -21,9 +21,6 @@ PREFERRED_PROVIDER_libva-utils = "libva-intel-utils" | |||
21 | PREFERRED_PROVIDER_libva-utils-native = "libva-intel-utils-native" | 21 | PREFERRED_PROVIDER_libva-utils-native = "libva-intel-utils-native" |
22 | PREFERRED_PROVIDER_nativesdk-libva-utils = "nativesdk-libva-intel-utils" | 22 | PREFERRED_PROVIDER_nativesdk-libva-utils = "nativesdk-libva-intel-utils" |
23 | 23 | ||
24 | PREFERRED_VERSION_opencl-clang ?= "${@bb.utils.contains('LLVMVERSION', '12.0.0', '12.0.0', '14.0.0', d)}" | ||
25 | PREFERRED_VERSION_opencl-clang-native ?= "${@bb.utils.contains('LLVMVERSION', '12.0.0', '12.0.0', '14.0.0', d)}" | ||
26 | |||
27 | XSERVER_X86_ASPEED_AST = "xf86-video-ast \ | 24 | XSERVER_X86_ASPEED_AST = "xf86-video-ast \ |
28 | " | 25 | " |
29 | 26 | ||
@@ -32,7 +29,7 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS:append = "${@bb.utils.contains('MACHINE_FEATURE | |||
32 | 29 | ||
33 | # recommended extra packages common to all intel machines | 30 | # recommended extra packages common to all intel machines |
34 | MACHINE_EXTRA_RRECOMMENDS:append = " kernel-modules linux-firmware" | 31 | MACHINE_EXTRA_RRECOMMENDS:append = " kernel-modules linux-firmware" |
35 | MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS:append = " kernel-module-i915 linux-firmware-i915" | 32 | MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS:append = " kernel-module-i915 linux-firmware-i915 kernel-module-igc kernel-module-r8152" |
36 | 33 | ||
37 | # for the early boot time kernel microcode loading support, | 34 | # for the early boot time kernel microcode loading support, |
38 | # merge the microcode data in the final initrd image. | 35 | # merge the microcode data in the final initrd image. |
diff --git a/conf/machine/include/qemuboot-intel.inc b/conf/machine/include/qemuboot-intel.inc index 6ac84a55..17a1234d 100644 --- a/conf/machine/include/qemuboot-intel.inc +++ b/conf/machine/include/qemuboot-intel.inc | |||
@@ -15,5 +15,4 @@ QB_CPU_KVM:intel-skylake-64 = "-cpu Skylake-Client" | |||
15 | QB_AUDIO_DRV = "alsa" | 15 | QB_AUDIO_DRV = "alsa" |
16 | QB_AUDIO_OPT = "-device AC97" | 16 | QB_AUDIO_OPT = "-device AC97" |
17 | QB_KERNEL_CMDLINE_APPEND = " oprofile.timer=1" | 17 | QB_KERNEL_CMDLINE_APPEND = " oprofile.timer=1" |
18 | # Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy | 18 | QB_OPT_APPEND = " -usb -usbdevice tablet " |
19 | QB_OPT_APPEND = " -usb -usbdevice tablet -device virtio-rng-pci" | ||
diff --git a/conf/machine/include/tune-skylake.inc b/conf/machine/include/tune-skylake.inc deleted file mode 100644 index 05b7283c..00000000 --- a/conf/machine/include/tune-skylake.inc +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | # Settings for the GCC(1) cpu-type "skylake": | ||
2 | # | ||
3 | # Intel Skylake CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, | ||
4 | # SSE4.2, AVX, AVX2 and POPCNT instruction set support. | ||
5 | # | ||
6 | # This tune is recommended for Intel Skylake CPU (and beyond). | ||
7 | # | ||
8 | DEFAULTTUNE ?= "skylake-64" | ||
9 | |||
10 | # Include the previous tune to pull in PACKAGE_EXTRA_ARCHS | ||
11 | require conf/machine/include/x86/tune-corei7.inc | ||
12 | |||
13 | # Extra tune features | ||
14 | TUNEVALID[skylake] = "Enable skylake specific processor optimizations" | ||
15 | TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'skylake', ' -march=skylake ${SKYLAKE_TUNE} -mfpmath=sse', '', d)}" | ||
16 | |||
17 | # Extra tune selections | ||
18 | |||
19 | AVAILTUNES += "skylake-64" | ||
20 | TUNE_FEATURES:tune-skylake-64 = "${TUNE_FEATURES:tune-x86-64} skylake" | ||
21 | BASE_LIB:tune-skylake-64 = "lib64" | ||
22 | TUNE_PKGARCH:tune-skylake-64 = "skylake-64" | ||
23 | PACKAGE_EXTRA_ARCHS:tune-skylake-64 = "${PACKAGE_EXTRA_ARCHS:tune-core2-64} skylake-64" | ||
24 | QEMU_EXTRAOPTIONS_skylake-64 = " -cpu Skylake-Client" | ||
25 | |||
26 | |||
27 | # Disable QEMU usermode by default (get avx2) | ||
28 | MACHINE_FEATURES:remove = "qemu-usermode" | ||
29 | |||
30 | # If qemu-usermode is enabled, we have to disable avx2 ISA extensions, but we can keep mtune as skylake vs generic | ||
31 | SKYLAKE_TUNE .= "${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', ' -mtune=skylake ${QEMU_UNAVAILABLE_ISA}', '-mtune=generic -mavx2', d)}" | ||
32 | |||
33 | QEMU_UNAVAILABLE_ISA = " \ | ||
34 | -mno-avx \ | ||
35 | -mno-avx2 \ | ||
36 | -mno-avx512f \ | ||
37 | -mno-avx512er \ | ||
38 | -mno-avx512cd \ | ||
39 | -mno-avx512pf \ | ||
40 | -mno-avx512dq \ | ||
41 | -mno-avx512bw \ | ||
42 | -mno-avx512vl \ | ||
43 | -mno-avx512ifma \ | ||
44 | -mno-avx512vbmi \ | ||
45 | -mno-avx512vbmi2 \ | ||
46 | -mno-avx512vnni \ | ||
47 | -mno-avx512bitalg \ | ||
48 | " | ||
diff --git a/conf/machine/intel-corei7-64.conf b/conf/machine/intel-corei7-64.conf index 968395fe..947f72d4 100644 --- a/conf/machine/intel-corei7-64.conf +++ b/conf/machine/intel-corei7-64.conf | |||
@@ -11,7 +11,7 @@ MACHINE_FEATURES += "pcbios efi" | |||
11 | MACHINE_FEATURES += "wifi 3g nfc" | 11 | MACHINE_FEATURES += "wifi 3g nfc" |
12 | MACHINE_FEATURES += "intel-ucode" | 12 | MACHINE_FEATURES += "intel-ucode" |
13 | 13 | ||
14 | MACHINE_HWCODECS ?= "${@bb.utils.contains('TUNE_FEATURES', 'mx32', '', 'intel-media-driver intel-mediasdk', d)} gstreamer1.0-vaapi" | 14 | MACHINE_HWCODECS ?= "${@bb.utils.contains('TUNE_FEATURES', 'mx32', '', 'intel-media-driver vpl-gpu-rt', d)} gstreamer1.0-vaapi" |
15 | 15 | ||
16 | # Enable optional dpdk: | 16 | # Enable optional dpdk: |
17 | COMPATIBLE_MACHINE:pn-dpdk = "intel-corei7-64" | 17 | COMPATIBLE_MACHINE:pn-dpdk = "intel-corei7-64" |
diff --git a/conf/machine/intel-skylake-64.conf b/conf/machine/intel-skylake-64.conf index 47d53fa0..bfaf08dd 100644 --- a/conf/machine/intel-skylake-64.conf +++ b/conf/machine/intel-skylake-64.conf | |||
@@ -5,14 +5,14 @@ | |||
5 | 5 | ||
6 | require conf/machine/include/meta-intel.inc | 6 | require conf/machine/include/meta-intel.inc |
7 | require conf/machine/include/x86/x86-base.inc | 7 | require conf/machine/include/x86/x86-base.inc |
8 | require conf/machine/include/tune-skylake.inc | 8 | require conf/machine/include/x86/tune-x86-64-v3.inc |
9 | require conf/machine/include/intel-common-pkgarch.inc | 9 | require conf/machine/include/intel-common-pkgarch.inc |
10 | 10 | ||
11 | MACHINE_FEATURES += "efi" | 11 | MACHINE_FEATURES += "efi" |
12 | MACHINE_FEATURES += "wifi 3g nfc" | 12 | MACHINE_FEATURES += "wifi 3g nfc" |
13 | MACHINE_FEATURES += "intel-ucode" | 13 | MACHINE_FEATURES += "intel-ucode" |
14 | 14 | ||
15 | MACHINE_HWCODECS ?= "intel-media-driver intel-mediasdk gstreamer1.0-vaapi" | 15 | MACHINE_HWCODECS ?= "intel-media-driver vpl-gpu-rt gstreamer1.0-vaapi" |
16 | 16 | ||
17 | COMPATIBLE_MACHINE:pn-dpdk = "intel-skylake-64" | 17 | COMPATIBLE_MACHINE:pn-dpdk = "intel-skylake-64" |
18 | COMPATIBLE_MACHINE:pn-dpdk-module = "intel-skylake-64" | 18 | COMPATIBLE_MACHINE:pn-dpdk-module = "intel-skylake-64" |
diff --git a/documentation/building_and_booting.md b/documentation/building_and_booting.md new file mode 100644 index 00000000..478a4fb0 --- /dev/null +++ b/documentation/building_and_booting.md | |||
@@ -0,0 +1,134 @@ | |||
1 | ### Building the Intel BSP layers | ||
2 | |||
3 | The intel-common BSP provide a few carefully selected tune options and | ||
4 | generic hardware support to cover the majority of current Intel CPUs and | ||
5 | devices. The naming follows the convention of intel-<TUNE>-<BITS>, where | ||
6 | TUNE is the gcc cpu-type (used with mtune and march typically) and BITS | ||
7 | is either 32 bit or 64 bit. | ||
8 | |||
9 | In order to build an image with BSP support for a given release, you | ||
10 | need to clone the meta-intel layer from git repository: | ||
11 | ``` | ||
12 | git clone https://git.yoctoproject.org/meta-intel | ||
13 | ``` | ||
14 | |||
15 | Check out the appropriate branch or release tags. The branch name and tags | ||
16 | would align with Yocto Project | ||
17 | [Release Codenames](https://wiki.yoctoproject.org/wiki/Releases). | ||
18 | Assuming meta-intel repository is cloned at the top-level of | ||
19 | OE-Core build tree, you can build a BSP image by adding the location of | ||
20 | the meta-intel layer to bblayers.conf: | ||
21 | ``` | ||
22 | BBLAYERS = " \ | ||
23 | /openembedded-core/meta \ | ||
24 | /openembedded-core/meta-intel " | ||
25 | ``` | ||
26 | |||
27 | To enable a particular machine, add a MACHINE line naming the BSP | ||
28 | to the local.conf file: | ||
29 | ``` | ||
30 | MACHINE ?= "intel-corei7-64" | ||
31 | ``` | ||
32 | |||
33 | where this can be replaced by other MACHINE types available: | ||
34 | |||
35 | - intel-core2-32 | ||
36 | |||
37 | This BSP is optimized for the Core2 family of CPUs as well as all | ||
38 | Atom CPUs prior to the Silvermont core. | ||
39 | |||
40 | - intel-corei7-64 | ||
41 | |||
42 | This BSP is optimized for Nehalem and later Core and Xeon CPUs as | ||
43 | well as Silvermont and later Atom CPUs, such as the Baytrail SoCs. | ||
44 | |||
45 | - intel-skylake-64 | ||
46 | |||
47 | This BSP uses [x86-64-v3 tuning](https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html). | ||
48 | |||
49 | You should then be able to build an image as such: | ||
50 | ``` | ||
51 | $ source oe-init-build-env | ||
52 | $ bitbake core-image-sato | ||
53 | ``` | ||
54 | |||
55 | At the end of a successful build, you should have an image that | ||
56 | you can boot from a USB flash drive. | ||
57 | |||
58 | |||
59 | ## Booting the intel-common BSP images | ||
60 | |||
61 | If you've built your own image, you'll find the bootable | ||
62 | image in the build/tmp/deploy/images/{MACHINE} directory, where | ||
63 | 'MACHINE' refers to the machine name used in the build. | ||
64 | |||
65 | Under Linux, insert a USB flash drive. Assuming the USB flash drive | ||
66 | takes device /dev/sdf, use dd to copy the image to it. Before the image | ||
67 | can be burned onto a USB drive, it should be un-mounted. Some Linux distros | ||
68 | may automatically mount a USB drive when it is plugged in. Using USB device | ||
69 | /dev/sdf as an example, find all mounted partitions: | ||
70 | ``` | ||
71 | $ mount | grep sdf | ||
72 | ``` | ||
73 | |||
74 | and un-mount those that are mounted, for example: | ||
75 | ``` | ||
76 | $ umount /dev/sdf1 | ||
77 | $ umount /dev/sdf2 | ||
78 | ``` | ||
79 | |||
80 | Now burn the image onto the USB drive: | ||
81 | ``` | ||
82 | $ sudo dd if=core-image-sato-intel-corei7-64.wic of=/dev/sdf status=progress | ||
83 | $ sync | ||
84 | $ eject /dev/sdf | ||
85 | ``` | ||
86 | |||
87 | This should give you a bootable USB flash device. Insert the device | ||
88 | into a bootable USB socket on the target, and power on. This should | ||
89 | result in a system booted to the Sato graphical desktop. | ||
90 | |||
91 | If you want a terminal, use the arrows at the top of the UI to move to | ||
92 | different pages of available applications, one of which is named | ||
93 | 'Terminal'. Clicking that should give you a root terminal. | ||
94 | |||
95 | If you want to ssh into the system, you can use the root terminal to | ||
96 | ifconfig the IP address and use that to ssh in. The root password is | ||
97 | empty, so to log in type 'root' for the user name and hit 'Enter' at | ||
98 | the Password prompt: and you should be in. | ||
99 | |||
100 | If you find you're getting corrupt images on the USB (it doesn't show | ||
101 | the syslinux boot: prompt, or the boot: prompt contains strange | ||
102 | characters), try doing this first: | ||
103 | ``` | ||
104 | $ dd if=/dev/zero of=/dev/sdf bs=1M count=512 | ||
105 | ``` | ||
106 | |||
107 | ## Building the installer image | ||
108 | |||
109 | If you plan to install your image to your target machine, you can build a wic | ||
110 | based installer image instead of default wic image. To build it, you need to | ||
111 | add below configuration to local.conf : | ||
112 | |||
113 | ``` | ||
114 | WKS_FILE = "image-installer.wks.in" | ||
115 | IMAGE_FSTYPES:append = " ext4" | ||
116 | IMAGE_TYPEDEP:wic = "ext4" | ||
117 | INITRD_IMAGE_LIVE="core-image-minimal-initramfs" | ||
118 | do_image_wic[depends] += "${INITRD_IMAGE_LIVE}:do_image_complete" | ||
119 | do_rootfs[depends] += "virtual/kernel:do_deploy" | ||
120 | IMAGE_BOOT_FILES:append = "\ | ||
121 | ${KERNEL_IMAGETYPE} \ | ||
122 | microcode.cpio \ | ||
123 | ${IMGDEPLOYDIR}/${IMAGE_BASENAME}-${MACHINE}.rootfs.ext4;rootfs.img \ | ||
124 | ${@bb.utils.contains('EFI_PROVIDER', 'grub-efi', 'grub-efi-bootx64.efi;EFI/BOOT/bootx64.efi', '', d)} \ | ||
125 | ${@bb.utils.contains('EFI_PROVIDER', 'grub-efi', '${IMAGE_ROOTFS}/boot/EFI/BOOT/grub.cfg;EFI/BOOT/grub.cfg', '', d)} \ | ||
126 | ${@bb.utils.contains('EFI_PROVIDER', 'systemd-boot', 'systemd-bootx64.efi;EFI/BOOT/bootx64.efi', '', d)} \ | ||
127 | ${@bb.utils.contains('EFI_PROVIDER', 'systemd-boot', '${IMAGE_ROOTFS}/boot/loader/loader.conf;loader/loader.conf ', '', d)} \ | ||
128 | ${@bb.utils.contains('EFI_PROVIDER', 'systemd-boot', '${IMAGE_ROOTFS}/boot/loader/entries/boot.conf;loader/entries/boot.conf', '', d)} " | ||
129 | ``` | ||
130 | |||
131 | Burn the wic image onto USB flash device, insert the device to target machine | ||
132 | and power on. This should start the installation process. | ||
133 | |||
134 | |||
diff --git a/documentation/dpcpp-compiler.md b/documentation/dpcpp-compiler.md new file mode 100644 index 00000000..b709a685 --- /dev/null +++ b/documentation/dpcpp-compiler.md | |||
@@ -0,0 +1,107 @@ | |||
1 | Intel(R) oneAPI DPC++/C++ Compiler (ICX) toolchain | ||
2 | ========================================================================== | ||
3 | |||
4 | Get Started with the Intel oneAPI DPC++/C++ Compiler: | ||
5 | |||
6 | https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler.html# | ||
7 | |||
8 | |||
9 | Getting Started | ||
10 | =============== | ||
11 | |||
12 | Clone the required layers and include them in bblayers.conf: | ||
13 | |||
14 | ``` | ||
15 | git clone https://git.openembedded.org/openembedded-core | ||
16 | git clone https://git.openembedded.org/bitbake | ||
17 | git clone https://git.openembedded.org/meta-openembedded | ||
18 | git clone https://github.com/kraj/meta-clang.git | ||
19 | git clone https://git.yoctoproject.org/meta-intel | ||
20 | |||
21 | $ source openembedded-core/oe-init-build-env | ||
22 | |||
23 | $ bitbake-layers add-layer ../meta-openembedded/meta-oe/ | ||
24 | $ bitbake-layers add-layer ../meta-intel | ||
25 | $ bitbake-layers add-layer ../meta-clang | ||
26 | ``` | ||
27 | |||
28 | Distro | ||
29 | ====== | ||
30 | |||
31 | Note that oneAPI DPC++/C++ compiler currently only works when the vendor string is "oe". | ||
32 | |||
33 | ``` | ||
34 | DISTRO ?= "nodistro" | ||
35 | ``` | ||
36 | |||
37 | MACHINE configuration | ||
38 | ===================== | ||
39 | |||
40 | ``` | ||
41 | MACHINE ?= "intel-skylake-64" | ||
42 | ``` | ||
43 | |||
44 | Package installation | ||
45 | ==================== | ||
46 | |||
47 | ``` | ||
48 | # To include OpenCL driver that might be needed when compiling SYCL programs, include: | ||
49 | IMAGE_INSTALL:append = " intel-compute-runtime intel-graphics-compiler" | ||
50 | |||
51 | # To install only runtime libraries, include: | ||
52 | IMAGE_INSTALL:append = " intel-oneapi-dpcpp-cpp-runtime intel-oneapi-dpcpp-cpp-runtime-dev" | ||
53 | |||
54 | # To install the toolchain, include: | ||
55 | IMAGE_INSTALL:append = " intel-oneapi-dpcpp-cpp intel-oneapi-dpcpp-cpp-dev" | ||
56 | ``` | ||
57 | in local.conf. | ||
58 | |||
59 | Build an image | ||
60 | ============== | ||
61 | |||
62 | ``` | ||
63 | $ bitbake core-image-minimal | ||
64 | ``` | ||
65 | |||
66 | Including oneAPI C++/DPC++ compiler in generated SDK toolchain | ||
67 | ============================================================== | ||
68 | |||
69 | The compiler is not included in the generated SDK by default. If it is expected to be part of SDK, add ICXSDK = "1" in local.conf: | ||
70 | |||
71 | ``` | ||
72 | ICXSDK = "1" | ||
73 | ``` | ||
74 | |||
75 | Generate SDK: | ||
76 | ``` | ||
77 | bitbake core-image-minimal -c populate_sdk | ||
78 | ``` | ||
79 | |||
80 | |||
81 | To setup PATH variables on target | ||
82 | ================================= | ||
83 | |||
84 | Once image is booted successfully, some variables would need to be exported to make sure compiler can be used: | ||
85 | |||
86 | ``` | ||
87 | $ source /opt/intel/oneapi/compiler/2022.1.0/env/vars.sh | ||
88 | |||
89 | $ mkdir -p /lib64 | ||
90 | |||
91 | $ ln -sf /lib/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2 | ||
92 | ``` | ||
93 | |||
94 | Build application and run | ||
95 | ========================= | ||
96 | |||
97 | To compile a sycl application, for example: | ||
98 | |||
99 | ``` | ||
100 | $ icpx --target=x86_64-oe-linux -fsycl simple-sycl-app.c -o simple-sycl-app | ||
101 | ``` | ||
102 | |||
103 | To run: | ||
104 | |||
105 | ``` | ||
106 | $ ./simple-sycl-app | ||
107 | ``` | ||
diff --git a/documentation/openvino.md b/documentation/openvino.md new file mode 100644 index 00000000..9794b928 --- /dev/null +++ b/documentation/openvino.md | |||
@@ -0,0 +1,92 @@ | |||
1 | Build a Yocto Image with OpenVINO™ toolkit | ||
2 | ========================================== | ||
3 | |||
4 | Follow the [Yocto Project official documentation](https://docs.yoctoproject.org/brief-yoctoprojectqs/index.html#compatible-linux-distribution) to set up and configure your host machine to be compatible with BitBake. | ||
5 | |||
6 | ## Step 1: Set Up Environment | ||
7 | |||
8 | 1. Clone the repositories. | ||
9 | |||
10 | ``` | ||
11 | git clone https://git.yoctoproject.org/git/poky | ||
12 | git clone https://github.com/openembedded/meta-openembedded | ||
13 | git clone https://git.yoctoproject.org/git/meta-intel | ||
14 | git clone https://github.com/intel/meta-openvino | ||
15 | ``` | ||
16 | |||
17 | |||
18 | 2. Set up the OpenEmbedded build environment. | ||
19 | |||
20 | ``` | ||
21 | source poky/oe-init-build-env | ||
22 | |||
23 | ``` | ||
24 | |||
25 | |||
26 | |||
27 | 3. Add BitBake layers. | ||
28 | |||
29 | |||
30 | ``` | ||
31 | bitbake-layers add-layer ../meta-openembedded/meta-oe | ||
32 | bitbake-layers add-layer ../meta-openembedded/meta-python | ||
33 | bitbake-layers add-layer ../meta-intel | ||
34 | bitbake-layers add-layer ../meta-openvino | ||
35 | |||
36 | ``` | ||
37 | |||
38 | |||
39 | 4. Set up BitBake configurations. | ||
40 | Include extra configuration in the `conf/local.conf` file in your build directory as required. | ||
41 | |||
42 | |||
43 | ``` | ||
44 | MACHINE = "intel-skylake-64" | ||
45 | |||
46 | # Enable building OpenVINO Python API. | ||
47 | # This requires meta-python layer to be included in bblayers.conf. | ||
48 | PACKAGECONFIG:append:pn-openvino-inference-engine = " python3" | ||
49 | |||
50 | # This adds OpenVINO related libraries in the target image. | ||
51 | CORE_IMAGE_EXTRA_INSTALL:append = " openvino-inference-engine" | ||
52 | |||
53 | # This adds OpenVINO samples in the target image. | ||
54 | CORE_IMAGE_EXTRA_INSTALL:append = " openvino-inference-engine-samples" | ||
55 | |||
56 | # Include OpenVINO Python API package in the target image. | ||
57 | CORE_IMAGE_EXTRA_INSTALL:append = " openvino-inference-engine-python3" | ||
58 | |||
59 | ``` | ||
60 | |||
61 | ## Step 2: Build a Yocto Image with OpenVINO Packages | ||
62 | |||
63 | Run BitBake to build your image with OpenVINO packages. For example, to build the minimal image, run the following command: | ||
64 | |||
65 | |||
66 | ``` | ||
67 | bitbake core-image-minimal | ||
68 | |||
69 | ``` | ||
70 | |||
71 | ## Step 3: Verify the Yocto Image | ||
72 | |||
73 | Verify that OpenVINO packages were built successfully. Run the following command: | ||
74 | |||
75 | ``` | ||
76 | oe-pkgdata-util list-pkgs | grep openvino | ||
77 | |||
78 | ``` | ||
79 | |||
80 | |||
81 | If the image build is successful, it will return the list of packages as below: | ||
82 | |||
83 | ``` | ||
84 | openvino-inference-engine | ||
85 | openvino-inference-engine-dbg | ||
86 | openvino-inference-engine-dev | ||
87 | openvino-inference-engine-python3 | ||
88 | openvino-inference-engine-samples | ||
89 | openvino-inference-engine-src | ||
90 | openvino-inference-engine-doc | ||
91 | |||
92 | ``` | ||
diff --git a/documentation/reporting_bugs.md b/documentation/reporting_bugs.md new file mode 100644 index 00000000..5fbc3d27 --- /dev/null +++ b/documentation/reporting_bugs.md | |||
@@ -0,0 +1,22 @@ | |||
1 | ## Reporting bugs | ||
2 | |||
3 | If you have problems with or questions about a particular BSP, please | ||
4 | contact the maintainer listed in the [Maintainer](../README.md#maintainers) section directly (cc:ing | ||
5 | the Yocto mailing list puts it in the archive and helps other people | ||
6 | who might have the same questions in the future), but please try to do | ||
7 | the following first: | ||
8 | |||
9 | - look in the [Yocto Project Bugzilla](http://bugzilla.yoctoproject.org/) to see if a | ||
10 | problem has already been reported | ||
11 | |||
12 | - look through recent entries of the [meta-intel](https://lists.yoctoproject.org/g/meta-intel/messages) | ||
13 | and [Yocto Archives](https://lists.yoctoproject.org/g/yocto/messages) mailing list archives to see | ||
14 | if other people have run into similar problems or had similar questions answered. | ||
15 | |||
16 | If you believe you have encountered a bug, you can open a new bug and | ||
17 | enter the details in the [Yocto Project Bugzilla](https://bugzilla.yoctoproject.org/). | ||
18 | If you're relatively certain that it's a bug against the BSP itself, please use the | ||
19 | 'BSPs | bsps-meta-intel' category for the bug; otherwise, please submit the bug against | ||
20 | the most likely category for the problem. if you're wrong, it's not a big deal and | ||
21 | the bug will be recategorized upon triage. | ||
22 | |||
diff --git a/documentation/secureboot/README b/documentation/secureboot/README deleted file mode 100644 index 3d5703bb..00000000 --- a/documentation/secureboot/README +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | Currently, only one implementation of Secure Boot is available out of the box, | ||
2 | which is using a single signed EFI application to directly boot the kernel with | ||
3 | an optional initramfs. | ||
4 | |||
5 | This can be added to your build either through local.conf, or via your own | ||
6 | custom image recipe. | ||
7 | |||
8 | If you are adding it via local.conf, set the following variables: | ||
9 | |||
10 | IMAGE_FEATURES += "secureboot" | ||
11 | WKS_FILE = "generic-bootdisk.wks.in" | ||
12 | SECURE_BOOT_SIGNING_KEY = "/path/to/your/signing/key" | ||
13 | SECURE_BOOT_SIGNING_CERT = "/path/to/your/signing/cert" | ||
14 | IMAGE_CLASSES += "uefi-comboapp" | ||
15 | |||
16 | If working with an image recipe, you can inherit uefi-comboapp directly instead | ||
17 | of using the IMAGE_CLASSES variable. | ||
18 | |||
19 | The signing keys and certs can be created via openssl commands. Here's an | ||
20 | example: | ||
21 | openssl req -new -x509 -newkey rsa:2048 -subj "/CN=your-subject/" -keyout \ | ||
22 | your-key.key -out your-key.crt -days 365 -nodes -sha256 | ||
23 | openssl x509 -in your-key.crt -out your-key.cer -outform DER | ||
24 | |||
25 | The .crt file is your SECURE_BOOT_SIGNING_CERT, and the .key file is your | ||
26 | SECURE_BOOT_SIGNING_KEY. | ||
27 | |||
28 | You should enroll the .crt key in your firmware under the PK, KEK, and DB | ||
29 | options (methods are different depending on your firmware). If a key should ever | ||
30 | become invalid, enroll it under DBX to blacklist it. | ||
31 | |||
32 | The comboapp can be further manipulated in a number of ways. You can modify the | ||
33 | kernel command line via the APPEND variable, you can change the default UUID via | ||
34 | the DISK_SIGNATURE_UUID variable, and you can modify the contents of the | ||
35 | initramfs via the INITRD_IMAGE or INITRD_LIVE variables. | ||
36 | |||
37 | A simple Secure Boot enabled image used for testing can be viewed at: | ||
38 | common/recipes-selftest/images/secureboot-selftest-image-signed.bb | ||
diff --git a/documentation/submitting_patches.md b/documentation/submitting_patches.md new file mode 100644 index 00000000..f36c4b08 --- /dev/null +++ b/documentation/submitting_patches.md | |||
@@ -0,0 +1,26 @@ | |||
1 | ## Guidelines for submitting patches | ||
2 | |||
3 | Please submit any patches against meta-intel BSPs to the | ||
4 | [meta-intel mailing list](https://lists.yoctoproject.org/g/meta-intel) | ||
5 | (email: meta-intel@lists.yoctoproject.org). Also, if your patches are | ||
6 | available via a public git repository, please also include a URL to | ||
7 | the repo and branch containing your patches as that makes it easier | ||
8 | for maintainers to grab and test your patches. | ||
9 | |||
10 | The patches should follow the suggestions outlined in the | ||
11 | [Yocto Project and OpenEmbedded Contributor Guide](https://docs.yoctoproject.org/dev/contributor-guide/index.html). | ||
12 | In addition, for any non-trivial patch, provide information about how you | ||
13 | tested the patch, and for any non-trivial or non-obvious testing | ||
14 | setup, provide details of that setup. | ||
15 | |||
16 | Doing a quick 'git log' in meta-intel will provide you with many | ||
17 | examples of good example commits if you have questions about any | ||
18 | aspect of the preferred format. | ||
19 | |||
20 | The meta-intel maintainers will do their best to review and/or pull in | ||
21 | a patch or patch sets within 24 hours of the time it was posted. For | ||
22 | larger and/or more involved patches and patch sets, the review process | ||
23 | may take longer. | ||
24 | |||
25 | Please see the [maintainers](../README.md#maintainers) section for the list of maintainers. It's also | ||
26 | a good idea to cc: the maintainer, if applicable. | ||
diff --git a/documentation/tested_hardware.md b/documentation/tested_hardware.md new file mode 100644 index 00000000..1fa81454 --- /dev/null +++ b/documentation/tested_hardware.md | |||
@@ -0,0 +1,21 @@ | |||
1 | ## Tested Hardware | ||
2 | |||
3 | The following undergo regular testing with their respective MACHINE types: | ||
4 | |||
5 | - intel-corei7-64: | ||
6 | * Alder Lake-P/S/PS | ||
7 | * Amston Lake | ||
8 | * Elkhart Lake | ||
9 | * Metor Lake-P | ||
10 | * Raptor Lake-P/S | ||
11 | * Tiger Lake | ||
12 | |||
13 | - intel-skylake-64: | ||
14 | * Alder Lake-P/S/PS | ||
15 | * Amston Lake | ||
16 | * Metor Lake-P | ||
17 | * Raptor Lake-P/S | ||
18 | * Tiger Lake | ||
19 | |||
20 | - intel-core2-32: | ||
21 | * MinnowBoard Turbot | ||
diff --git a/dynamic-layers/clang-layer/recipes-core/dnn/onednn_2.6.bb b/dynamic-layers/clang-layer/recipes-core/dnn/onednn_3.5.3.bb index 44162301..6d4f69a3 100644 --- a/dynamic-layers/clang-layer/recipes-core/dnn/onednn_2.6.bb +++ b/dynamic-layers/clang-layer/recipes-core/dnn/onednn_3.5.3.bb | |||
@@ -3,7 +3,7 @@ SUMMARY = "Deep Neural Network Library" | |||
3 | DESCRIPTION = "This software is a user mode library that accelerates\ | 3 | DESCRIPTION = "This software is a user mode library that accelerates\ |
4 | deep-learning applications and frameworks on Intel architecture." | 4 | deep-learning applications and frameworks on Intel architecture." |
5 | LICENSE = "Apache-2.0 & BSD-3-Clause & BSL-1.0" | 5 | LICENSE = "Apache-2.0 & BSD-3-Clause & BSL-1.0" |
6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=b48e3de3bfd47c27882a0d85b20823f5 \ | 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3b64000f6e7d52516017622a37a94ce9 \ |
7 | file://tests/gtests/gtest/LICENSE;md5=cbbd27594afd089daa160d3a16dd515a \ | 7 | file://tests/gtests/gtest/LICENSE;md5=cbbd27594afd089daa160d3a16dd515a \ |
8 | file://src/cpu/x64/xbyak/COPYRIGHT;md5=3b9bf048d063d54cdb28964db558bcc7 \ | 8 | file://src/cpu/x64/xbyak/COPYRIGHT;md5=3b9bf048d063d54cdb28964db558bcc7 \ |
9 | file://src/common/ittnotify/LICENSE.BSD;md5=e671ff178b24a95a382ba670503c66fb \ | 9 | file://src/common/ittnotify/LICENSE.BSD;md5=e671ff178b24a95a382ba670503c66fb \ |
@@ -12,9 +12,10 @@ SECTION = "lib" | |||
12 | 12 | ||
13 | inherit pkgconfig cmake ptest | 13 | inherit pkgconfig cmake ptest |
14 | 14 | ||
15 | S = "${WORKDIR}/git" | 15 | DNN_BRANCH = "rls-v${@'.'.join(d.getVar('PV').split('.')[0:2])}" |
16 | SRCREV = "52b5f107dd9cf10910aaa19cb47f3abf9b349815" | 16 | |
17 | SRC_URI = "git://github.com/oneapi-src/oneDNN.git;branch=rls-v2.6;protocol=https \ | 17 | SRCREV = "66f0cb9eb66affd2da3bf5f8d897376f04aae6af" |
18 | SRC_URI = "git://github.com/oneapi-src/oneDNN.git;branch=${DNN_BRANCH};protocol=https \ | ||
18 | file://run-ptest \ | 19 | file://run-ptest \ |
19 | " | 20 | " |
20 | 21 | ||
@@ -32,10 +33,11 @@ EXTRA_OECMAKE += " \ | |||
32 | -DDNNL_CPU_RUNTIME=OMP \ | 33 | -DDNNL_CPU_RUNTIME=OMP \ |
33 | -DDNNL_ARCH_OPT_FLAGS="" \ | 34 | -DDNNL_ARCH_OPT_FLAGS="" \ |
34 | -DCMAKE_SKIP_RPATH=ON \ | 35 | -DCMAKE_SKIP_RPATH=ON \ |
36 | -DONEDNN_BUILD_GRAPH=OFF \ | ||
35 | " | 37 | " |
36 | 38 | ||
37 | PACKAGECONFIG ??= "" | 39 | PACKAGECONFIG ??= "gpu" |
38 | PACKAGECONFIG[gpu] = "-DDNNL_GPU_RUNTIME=OCL, , opencl-headers ocl-icd, intel-compute-runtime" | 40 | PACKAGECONFIG[gpu] = "-DDNNL_GPU_RUNTIME=OCL, , opencl-headers virtual/opencl-icd, intel-compute-runtime" |
39 | 41 | ||
40 | do_install:append () { | 42 | do_install:append () { |
41 | install -d ${D}${bindir}/mkl-dnn/tests/benchdnn/inputs | 43 | install -d ${D}${bindir}/mkl-dnn/tests/benchdnn/inputs |
diff --git a/dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-CMakeLists.txt-link-with-libclang-cpp-library-instea.patch b/dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-CMakeLists.txt-link-with-libclang-cpp-library-instea.patch deleted file mode 100644 index 4e25420c..00000000 --- a/dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-CMakeLists.txt-link-with-libclang-cpp-library-instea.patch +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | From b9bc0df996d1e65fd70d5eb2d40866693f23bb67 Mon Sep 17 00:00:00 2001 | ||
2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
3 | Date: Thu, 24 Jun 2021 17:53:27 +0800 | ||
4 | Subject: [PATCH] CMakeLists.txt: link with libclang-cpp library instead | ||
5 | |||
6 | Upstream-Status: Inappropriate | ||
7 | |||
8 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
9 | --- | ||
10 | CMakeLists.txt | 2 +- | ||
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
14 | index ef88317e..7507d6a5 100644 | ||
15 | --- a/CMakeLists.txt | ||
16 | +++ b/CMakeLists.txt | ||
17 | @@ -281,7 +281,7 @@ if (WASM_ENABLED) | ||
18 | list(APPEND ISPC_TARGETS wasm-i32x4) | ||
19 | endif() | ||
20 | |||
21 | -set(CLANG_LIBRARY_LIST clangFrontend clangDriver clangSerialization clangParse clangSema clangAnalysis clangAST clangBasic clangEdit clangLex) | ||
22 | +set(CLANG_LIBRARY_LIST clang-cpp) | ||
23 | set(LLVM_COMPONENTS engine ipo bitreader bitwriter instrumentation linker option frontendopenmp) | ||
24 | |||
25 | if (X86_ENABLED) | ||
26 | -- | ||
27 | 2.17.1 | ||
28 | |||
diff --git a/dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-Enable-LLVM-15.0-support.patch b/dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-Enable-LLVM-15.0-support.patch deleted file mode 100644 index fe82ff25..00000000 --- a/dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-Enable-LLVM-15.0-support.patch +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | From 9b722217a2818bc4335bf2c7d3293d30aa5977b1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Dmitry Babokin <dmitry.y.babokin@intel.com> | ||
3 | Date: Fri, 4 Feb 2022 16:45:34 -0800 | ||
4 | Subject: [PATCH 01/24] Enable LLVM 15.0 support | ||
5 | |||
6 | Upstream-Status: Backport [https://github.com/ispc/ispc/commit/9b722217a2818bc4335bf2c7d3293d30aa5977b1] | ||
7 | |||
8 | Signed-off-by: Dmitry Babokin <dmitry.y.babokin@intel.com> | ||
9 | --- | ||
10 | src/ispc.h | 4 ++-- | ||
11 | src/ispc_version.h | 3 ++- | ||
12 | 2 files changed, 4 insertions(+), 3 deletions(-) | ||
13 | |||
14 | diff --git a/src/ispc.h b/src/ispc.h | ||
15 | index 362c2b93..581d5de6 100644 | ||
16 | --- a/src/ispc.h | ||
17 | +++ b/src/ispc.h | ||
18 | @@ -1,5 +1,5 @@ | ||
19 | /* | ||
20 | - Copyright (c) 2010-2021, Intel Corporation | ||
21 | + Copyright (c) 2010-2022, Intel Corporation | ||
22 | All rights reserved. | ||
23 | |||
24 | Redistribution and use in source and binary forms, with or without | ||
25 | @@ -42,7 +42,7 @@ | ||
26 | #include "target_registry.h" | ||
27 | |||
28 | #if ISPC_LLVM_VERSION < OLDEST_SUPPORTED_LLVM || ISPC_LLVM_VERSION > LATEST_SUPPORTED_LLVM | ||
29 | -#error "Only LLVM 11.0 - 13.0 and 14.0 development branch are supported" | ||
30 | +#error "Only LLVM 11.0 - 14.0 and 15.0 development branch are supported" | ||
31 | #endif | ||
32 | |||
33 | #if defined(_WIN32) || defined(_WIN64) | ||
34 | diff --git a/src/ispc_version.h b/src/ispc_version.h | ||
35 | index e8487e5b..04a3cf64 100644 | ||
36 | --- a/src/ispc_version.h | ||
37 | +++ b/src/ispc_version.h | ||
38 | @@ -50,9 +50,10 @@ | ||
39 | #define ISPC_LLVM_12_0 120000 | ||
40 | #define ISPC_LLVM_13_0 130000 | ||
41 | #define ISPC_LLVM_14_0 140000 | ||
42 | +#define ISPC_LLVM_15_0 150000 | ||
43 | |||
44 | #define OLDEST_SUPPORTED_LLVM ISPC_LLVM_10_0 | ||
45 | -#define LATEST_SUPPORTED_LLVM ISPC_LLVM_14_0 | ||
46 | +#define LATEST_SUPPORTED_LLVM ISPC_LLVM_15_0 | ||
47 | |||
48 | #ifdef __ispc__xstr | ||
49 | #undef __ispc__xstr | ||
50 | -- | ||
51 | 2.17.1 | ||
52 | |||
diff --git a/dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.17.0.bb b/dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.17.0.bb deleted file mode 100644 index cfd8e5bc..00000000 --- a/dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.17.0.bb +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
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=3cd6f8a7c3bd9d2bb898fcb27c75221a" | ||
9 | |||
10 | inherit cmake python3native | ||
11 | |||
12 | S = "${WORKDIR}/git" | ||
13 | |||
14 | SRC_URI = "git://github.com/ispc/ispc.git;protocol=https;branch=main \ | ||
15 | file://0001-CMakeLists.txt-link-with-libclang-cpp-library-instea.patch \ | ||
16 | file://0002-cmake-don-t-build-for-32-bit-targets.patch \ | ||
17 | file://0001-Enable-LLVM-15.0-support.patch \ | ||
18 | " | ||
19 | SRCREV = "7ad8429369a4d5ced6b524fdfffe623939d8fe9a" | ||
20 | |||
21 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
22 | |||
23 | DEPENDS += " clang-native bison-native " | ||
24 | RDEPENDS:${PN} += " clang-libllvm clang" | ||
25 | |||
26 | EXTRA_OECMAKE += " \ | ||
27 | -DISPC_INCLUDE_TESTS=OFF \ | ||
28 | -DISPC_INCLUDE_EXAMPLES=OFF \ | ||
29 | -DISPC_NO_DUMPS=ON \ | ||
30 | -DARM_ENABLED=OFF \ | ||
31 | -DISPC_CROSS=ON \ | ||
32 | -DISPC_ANDROID_TARGET=OFF \ | ||
33 | -DISPC_FREEBSD_TARGET=OFF \ | ||
34 | -DISPC_WINDOWS_TARGET=OFF \ | ||
35 | -DISPC_IOS_TARGET=OFF \ | ||
36 | -DISPC_PS4_TARGET=OFF \ | ||
37 | -DSYSROOT_DIR=${STAGING_DIR_NATIVE} \ | ||
38 | " | ||
39 | |||
40 | TOOLCHAIN = "clang" | ||
41 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/dynamic-layers/clang-layer/recipes-devtools/clang/files/llvm12-0001-Remove-__IMAGE_SUPPORT__-macro-for-SPIR-since-SPIR-d.patch b/dynamic-layers/clang-layer/recipes-devtools/clang/files/llvm12-0001-Remove-__IMAGE_SUPPORT__-macro-for-SPIR-since-SPIR-d.patch deleted file mode 100644 index 00f3607a..00000000 --- a/dynamic-layers/clang-layer/recipes-devtools/clang/files/llvm12-0001-Remove-__IMAGE_SUPPORT__-macro-for-SPIR-since-SPIR-d.patch +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | From 3632f727dfd786a8eca50bd01219669bbe7b0df9 Mon Sep 17 00:00:00 2001 | ||
2 | From: haonanya <haonan.yang@intel.com> | ||
3 | Date: Tue, 11 May 2021 11:13:02 +0800 | ||
4 | Subject: [PATCH 1/3] Remove __IMAGE_SUPPORT__ macro for SPIR since SPIR | ||
5 | doesn't require image support | ||
6 | |||
7 | Upstream-Status: Inappropriate | ||
8 | |||
9 | Signed-off-by: haonanya <haonan.yang@intel.com> | ||
10 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
11 | --- | ||
12 | clang/lib/Frontend/InitPreprocessor.cpp | 3 --- | ||
13 | clang/test/Preprocessor/predefined-macros.c | 2 -- | ||
14 | 2 files changed, 5 deletions(-) | ||
15 | |||
16 | diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp | ||
17 | index c64a912ce919..c60972c96e5d 100644 | ||
18 | --- a/clang/lib/Frontend/InitPreprocessor.cpp | ||
19 | +++ b/clang/lib/Frontend/InitPreprocessor.cpp | ||
20 | @@ -1121,9 +1121,6 @@ static void InitializePredefinedMacros(const TargetInfo &TI, | ||
21 | // OpenCL definitions. | ||
22 | if (LangOpts.OpenCL) { | ||
23 | TI.getOpenCLFeatureDefines(LangOpts, Builder); | ||
24 | - | ||
25 | - if (TI.getTriple().isSPIR()) | ||
26 | - Builder.defineMacro("__IMAGE_SUPPORT__"); | ||
27 | } | ||
28 | |||
29 | if (TI.hasInt128Type() && LangOpts.CPlusPlus && LangOpts.GNUMode) { | ||
30 | diff --git a/clang/test/Preprocessor/predefined-macros.c b/clang/test/Preprocessor/predefined-macros.c | ||
31 | index e406b9a70570..88606518c7de 100644 | ||
32 | --- a/clang/test/Preprocessor/predefined-macros.c | ||
33 | +++ b/clang/test/Preprocessor/predefined-macros.c | ||
34 | @@ -188,14 +188,12 @@ | ||
35 | |||
36 | // RUN: %clang_cc1 %s -E -dM -o - -x cl -triple spir-unknown-unknown \ | ||
37 | // RUN: | FileCheck -match-full-lines %s --check-prefix=CHECK-SPIR | ||
38 | -// CHECK-SPIR-DAG: #define __IMAGE_SUPPORT__ 1 | ||
39 | // CHECK-SPIR-DAG: #define __SPIR__ 1 | ||
40 | // CHECK-SPIR-DAG: #define __SPIR32__ 1 | ||
41 | // CHECK-SPIR-NOT: #define __SPIR64__ 1 | ||
42 | |||
43 | // RUN: %clang_cc1 %s -E -dM -o - -x cl -triple spir64-unknown-unknown \ | ||
44 | // RUN: | FileCheck -match-full-lines %s --check-prefix=CHECK-SPIR64 | ||
45 | -// CHECK-SPIR64-DAG: #define __IMAGE_SUPPORT__ 1 | ||
46 | // CHECK-SPIR64-DAG: #define __SPIR__ 1 | ||
47 | // CHECK-SPIR64-DAG: #define __SPIR64__ 1 | ||
48 | // CHECK-SPIR64-NOT: #define __SPIR32__ 1 | ||
49 | -- | ||
50 | 2.17.1 | ||
51 | |||
diff --git a/dynamic-layers/clang-layer/recipes-devtools/clang/files/llvm12-0002-Avoid-calling-ParseCommandLineOptions-in-BackendUtil.patch b/dynamic-layers/clang-layer/recipes-devtools/clang/files/llvm12-0002-Avoid-calling-ParseCommandLineOptions-in-BackendUtil.patch deleted file mode 100644 index 497db4f5..00000000 --- a/dynamic-layers/clang-layer/recipes-devtools/clang/files/llvm12-0002-Avoid-calling-ParseCommandLineOptions-in-BackendUtil.patch +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | From 60854c328d8729b2ef10b9bb4dcbcc282f43c5e7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Raphael Isemann <teemperor@gmail.com> | ||
3 | Date: Thu, 1 Apr 2021 18:41:44 +0200 | ||
4 | Subject: [PATCH] Avoid calling ParseCommandLineOptions in BackendUtil if | ||
5 | possible | ||
6 | |||
7 | Calling `ParseCommandLineOptions` should only be called from `main` as the | ||
8 | CommandLine setup code isn't thread-safe. As BackendUtil is part of the | ||
9 | generic Clang FrontendAction logic, a process which has several threads executing | ||
10 | Clang FrontendActions will randomly crash in the unsafe setup code. | ||
11 | |||
12 | This patch avoids calling the function unless either the debug-pass option or | ||
13 | limit-float-precision option is set. Without these two options set the | ||
14 | `ParseCommandLineOptions` call doesn't do anything beside parsing | ||
15 | the command line `clang` which doesn't set any options. | ||
16 | |||
17 | See also D99652 where LLDB received a workaround for this crash. | ||
18 | |||
19 | Reviewed By: JDevlieghere | ||
20 | |||
21 | Differential Revision: https://reviews.llvm.org/D99740 | ||
22 | |||
23 | Upstream-Status: Backport [https://github.com/llvm/llvm-project/commit/60854c328d8729b2ef10b9bb4dcbcc282f43c5e7] | ||
24 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
25 | |||
26 | --- | ||
27 | clang/lib/CodeGen/BackendUtil.cpp | 8 ++++++++ | ||
28 | 1 file changed, 8 insertions(+) | ||
29 | |||
30 | diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp | ||
31 | index 41eafd13d97c..00d92e7beadd 100644 | ||
32 | --- a/clang/lib/CodeGen/BackendUtil.cpp | ||
33 | +++ b/clang/lib/CodeGen/BackendUtil.cpp | ||
34 | @@ -871,7 +871,15 @@ static void setCommandLineOpts(const CodeGenOptions &CodeGenOpts) { | ||
35 | BackendArgs.push_back("-limit-float-precision"); | ||
36 | BackendArgs.push_back(CodeGenOpts.LimitFloatPrecision.c_str()); | ||
37 | } | ||
38 | + // Check for the default "clang" invocation that won't set any cl::opt values. | ||
39 | + // Skip trying to parse the command line invocation to avoid the issues | ||
40 | + // described below. | ||
41 | + if (BackendArgs.size() == 1) | ||
42 | + return; | ||
43 | BackendArgs.push_back(nullptr); | ||
44 | + // FIXME: The command line parser below is not thread-safe and shares a global | ||
45 | + // state, so this call might crash or overwrite the options of another Clang | ||
46 | + // instance in the same process. | ||
47 | llvm::cl::ParseCommandLineOptions(BackendArgs.size() - 1, | ||
48 | BackendArgs.data()); | ||
49 | } | ||
50 | -- | ||
51 | 2.29.2 | ||
52 | |||
diff --git a/dynamic-layers/clang-layer/recipes-devtools/clang/files/llvm12-0003-Support-cl_ext_float_atomics.patch b/dynamic-layers/clang-layer/recipes-devtools/clang/files/llvm12-0003-Support-cl_ext_float_atomics.patch deleted file mode 100644 index c609b08b..00000000 --- a/dynamic-layers/clang-layer/recipes-devtools/clang/files/llvm12-0003-Support-cl_ext_float_atomics.patch +++ /dev/null | |||
@@ -1,561 +0,0 @@ | |||
1 | From 85505bdb386a426310c1fb0a845780beeeec4353 Mon Sep 17 00:00:00 2001 | ||
2 | From: haonanya <haonan.yang@intel.com> | ||
3 | Date: Wed, 9 Feb 2022 09:16:35 +0800 | ||
4 | Subject: [PATCH] Support cl_ext_float_atomics | ||
5 | |||
6 | This backports https://reviews.llvm.org/D106343 and https://reviews.llvm.org/D109740 | ||
7 | |||
8 | Signed-off-by: haonanya <haonan.yang@intel.com> | ||
9 | |||
10 | Upstream-Status: Backport | ||
11 | |||
12 | https://github.com/llvm/llvm-project/commit/d353d1c50112a1cb315eccdab18ce7bd1563cd06 | ||
13 | https://github.com/llvm/llvm-project/commit/544d89e847d42ce8856296752b0fb279aa89aace | ||
14 | |||
15 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
16 | |||
17 | --- | ||
18 | clang/lib/Headers/opencl-c-base.h | 19 ++ | ||
19 | clang/lib/Headers/opencl-c.h | 378 ++++++++++++++++++++++++++ | ||
20 | clang/lib/Sema/Sema.cpp | 3 + | ||
21 | clang/test/Headers/opencl-c-header.cl | 84 ++++++ | ||
22 | 4 files changed, 484 insertions(+) | ||
23 | |||
24 | diff --git a/clang/lib/Headers/opencl-c-base.h b/clang/lib/Headers/opencl-c-base.h | ||
25 | index e8dcd70377e5..d94d64372dbb 100644 | ||
26 | --- a/clang/lib/Headers/opencl-c-base.h | ||
27 | +++ b/clang/lib/Headers/opencl-c-base.h | ||
28 | @@ -21,6 +21,25 @@ | ||
29 | #define cl_khr_subgroup_shuffle 1 | ||
30 | #define cl_khr_subgroup_shuffle_relative 1 | ||
31 | #define cl_khr_subgroup_clustered_reduce 1 | ||
32 | +#define cl_ext_float_atomics | ||
33 | +#ifdef cl_khr_fp16 | ||
34 | +#define __opencl_c_ext_fp16_global_atomic_load_store 1 | ||
35 | +#define __opencl_c_ext_fp16_local_atomic_load_store 1 | ||
36 | +#define __opencl_c_ext_fp16_global_atomic_add 1 | ||
37 | +#define __opencl_c_ext_fp16_local_atomic_add 1 | ||
38 | +#define __opencl_c_ext_fp16_global_atomic_min_max 1 | ||
39 | +#define __opencl_c_ext_fp16_local_atomic_min_max 1 | ||
40 | +#endif | ||
41 | +#ifdef cl_khr_fp64 | ||
42 | +#define __opencl_c_ext_fp64_global_atomic_add 1 | ||
43 | +#define __opencl_c_ext_fp64_local_atomic_add 1 | ||
44 | +#define __opencl_c_ext_fp64_global_atomic_min_max 1 | ||
45 | +#define __opencl_c_ext_fp64_local_atomic_min_max 1 | ||
46 | +#endif | ||
47 | +#define __opencl_c_ext_fp32_global_atomic_add 1 | ||
48 | +#define __opencl_c_ext_fp32_local_atomic_add 1 | ||
49 | +#define __opencl_c_ext_fp32_global_atomic_min_max 1 | ||
50 | +#define __opencl_c_ext_fp32_local_atomic_min_max 1 | ||
51 | #endif // defined(__SPIR__) | ||
52 | #endif // (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) | ||
53 | |||
54 | diff --git a/clang/lib/Headers/opencl-c.h b/clang/lib/Headers/opencl-c.h | ||
55 | index ab665628c8e1..584db7e81e04 100644 | ||
56 | --- a/clang/lib/Headers/opencl-c.h | ||
57 | +++ b/clang/lib/Headers/opencl-c.h | ||
58 | @@ -13531,6 +13531,384 @@ intptr_t __ovld atomic_fetch_max_explicit(volatile atomic_intptr_t *object, uint | ||
59 | intptr_t __ovld atomic_fetch_max_explicit(volatile atomic_intptr_t *object, uintptr_t opermax, memory_order minder, memory_scope scope); | ||
60 | #endif | ||
61 | |||
62 | +// The functionality added by cl_ext_float_atomics extension | ||
63 | +#if defined(cl_ext_float_atomics) | ||
64 | + | ||
65 | +#if defined(__opencl_c_ext_fp16_global_atomic_load_store) | ||
66 | +void __ovld atomic_store(volatile __global atomic_half *object, half operand); | ||
67 | +void __ovld atomic_store_explicit(volatile __global atomic_half *object, | ||
68 | + half operand, memory_order order); | ||
69 | +void __ovld atomic_store_explicit(volatile __global atomic_half *object, | ||
70 | + half operand, memory_order order, | ||
71 | + memory_scope scope); | ||
72 | +half __ovld atomic_load(volatile __global atomic_half *object); | ||
73 | +half __ovld atomic_load_explicit(volatile __global atomic_half *object, | ||
74 | + memory_order order); | ||
75 | +half __ovld atomic_load_explicit(volatile __global atomic_half *object, | ||
76 | + memory_order order, memory_scope scope); | ||
77 | +half __ovld atomic_exchange(volatile __global atomic_half *object, | ||
78 | + half operand); | ||
79 | +half __ovld atomic_exchange_explicit(volatile __global atomic_half *object, | ||
80 | + half operand, memory_order order); | ||
81 | +half __ovld atomic_exchange_explicit(volatile __global atomic_half *object, | ||
82 | + half operand, memory_order order, | ||
83 | + memory_scope scope); | ||
84 | +#endif // defined(__opencl_c_ext_fp16_global_atomic_load_store) | ||
85 | + | ||
86 | +#if defined(__opencl_c_ext_fp16_local_atomic_load_store) | ||
87 | +void __ovld atomic_store(volatile __local atomic_half *object, half operand); | ||
88 | +void __ovld atomic_store_explicit(volatile __local atomic_half *object, | ||
89 | + half operand, memory_order order); | ||
90 | +void __ovld atomic_store_explicit(volatile __local atomic_half *object, | ||
91 | + half operand, memory_order order, | ||
92 | + memory_scope scope); | ||
93 | +half __ovld atomic_load(volatile __local atomic_half *object); | ||
94 | +half __ovld atomic_load_explicit(volatile __local atomic_half *object, | ||
95 | + memory_order order); | ||
96 | +half __ovld atomic_load_explicit(volatile __local atomic_half *object, | ||
97 | + memory_order order, memory_scope scope); | ||
98 | +half __ovld atomic_exchange(volatile __local atomic_half *object, half operand); | ||
99 | +half __ovld atomic_exchange_explicit(volatile __local atomic_half *object, | ||
100 | + half operand, memory_order order); | ||
101 | +half __ovld atomic_exchange_explicit(volatile __local atomic_half *object, | ||
102 | + half operand, memory_order order, | ||
103 | + memory_scope scope); | ||
104 | +#endif // defined(__opencl_c_ext_fp16_local_atomic_load_store) | ||
105 | + | ||
106 | +#if defined(__opencl_c_ext_fp16_global_atomic_load_store) && \ | ||
107 | + defined(__opencl_c_ext_fp16_local_atomic_load_store) | ||
108 | +void __ovld atomic_store(volatile atomic_half *object, half operand); | ||
109 | +void __ovld atomic_store_explicit(volatile atomic_half *object, half operand, | ||
110 | + memory_order order); | ||
111 | +void __ovld atomic_store_explicit(volatile atomic_half *object, half operand, | ||
112 | + memory_order order, memory_scope scope); | ||
113 | +half __ovld atomic_load(volatile atomic_half *object); | ||
114 | +half __ovld atomic_load_explicit(volatile atomic_half *object, | ||
115 | + memory_order order); | ||
116 | +half __ovld atomic_load_explicit(volatile atomic_half *object, | ||
117 | + memory_order order, memory_scope scope); | ||
118 | +half __ovld atomic_exchange(volatile atomic_half *object, half operand); | ||
119 | +half __ovld atomic_exchange_explicit(volatile atomic_half *object, half operand, | ||
120 | + memory_order order); | ||
121 | +half __ovld atomic_exchange_explicit(volatile atomic_half *object, half operand, | ||
122 | + memory_order order, memory_scope scope); | ||
123 | +#endif // defined(__opencl_c_ext_fp16_global_atomic_load_store) && | ||
124 | + // defined(__opencl_c_ext_fp16_local_atomic_load_store) | ||
125 | + | ||
126 | +#if defined(__opencl_c_ext_fp16_global_atomic_min_max) | ||
127 | +half __ovld atomic_fetch_min(volatile __global atomic_half *object, | ||
128 | + half operand); | ||
129 | +half __ovld atomic_fetch_max(volatile __global atomic_half *object, | ||
130 | + half operand); | ||
131 | +half __ovld atomic_fetch_min_explicit(volatile __global atomic_half *object, | ||
132 | + half operand, memory_order order); | ||
133 | +half __ovld atomic_fetch_max_explicit(volatile __global atomic_half *object, | ||
134 | + half operand, memory_order order); | ||
135 | +half __ovld atomic_fetch_min_explicit(volatile __global atomic_half *object, | ||
136 | + half operand, memory_order order, | ||
137 | + memory_scope scope); | ||
138 | +half __ovld atomic_fetch_max_explicit(volatile __global atomic_half *object, | ||
139 | + half operand, memory_order order, | ||
140 | + memory_scope scope); | ||
141 | +#endif // defined(__opencl_c_ext_fp16_global_atomic_min_max) | ||
142 | + | ||
143 | +#if defined(__opencl_c_ext_fp16_local_atomic_min_max) | ||
144 | +half __ovld atomic_fetch_min(volatile __local atomic_half *object, | ||
145 | + half operand); | ||
146 | +half __ovld atomic_fetch_max(volatile __local atomic_half *object, | ||
147 | + half operand); | ||
148 | +half __ovld atomic_fetch_min_explicit(volatile __local atomic_half *object, | ||
149 | + half operand, memory_order order); | ||
150 | +half __ovld atomic_fetch_max_explicit(volatile __local atomic_half *object, | ||
151 | + half operand, memory_order order); | ||
152 | +half __ovld atomic_fetch_min_explicit(volatile __local atomic_half *object, | ||
153 | + half operand, memory_order order, | ||
154 | + memory_scope scope); | ||
155 | +half __ovld atomic_fetch_max_explicit(volatile __local atomic_half *object, | ||
156 | + half operand, memory_order order, | ||
157 | + memory_scope scope); | ||
158 | +#endif // defined(__opencl_c_ext_fp16_local_atomic_min_max) | ||
159 | + | ||
160 | +#if defined(__opencl_c_ext_fp16_global_atomic_min_max) && \ | ||
161 | + defined(__opencl_c_ext_fp16_local_atomic_min_max) | ||
162 | +half __ovld atomic_fetch_min(volatile atomic_half *object, half operand); | ||
163 | +half __ovld atomic_fetch_max(volatile atomic_half *object, half operand); | ||
164 | +half __ovld atomic_fetch_min_explicit(volatile atomic_half *object, | ||
165 | + half operand, memory_order order); | ||
166 | +half __ovld atomic_fetch_max_explicit(volatile atomic_half *object, | ||
167 | + half operand, memory_order order); | ||
168 | +half __ovld atomic_fetch_min_explicit(volatile atomic_half *object, | ||
169 | + half operand, memory_order order, | ||
170 | + memory_scope scope); | ||
171 | +half __ovld atomic_fetch_max_explicit(volatile atomic_half *object, | ||
172 | + half operand, memory_order order, | ||
173 | + memory_scope scope); | ||
174 | +#endif // defined(__opencl_c_ext_fp16_global_atomic_min_max) && \ | ||
175 | + defined(__opencl_c_ext_fp16_local_atomic_min_max) | ||
176 | + | ||
177 | +#if defined(__opencl_c_ext_fp32_global_atomic_min_max) | ||
178 | +float __ovld atomic_fetch_min(volatile __global atomic_float *object, | ||
179 | + float operand); | ||
180 | +float __ovld atomic_fetch_max(volatile __global atomic_float *object, | ||
181 | + float operand); | ||
182 | +float __ovld atomic_fetch_min_explicit(volatile __global atomic_float *object, | ||
183 | + float operand, memory_order order); | ||
184 | +float __ovld atomic_fetch_max_explicit(volatile __global atomic_float *object, | ||
185 | + float operand, memory_order order); | ||
186 | +float __ovld atomic_fetch_min_explicit(volatile __global atomic_float *object, | ||
187 | + float operand, memory_order order, | ||
188 | + memory_scope scope); | ||
189 | +float __ovld atomic_fetch_max_explicit(volatile __global atomic_float *object, | ||
190 | + float operand, memory_order order, | ||
191 | + memory_scope scope); | ||
192 | +#endif // defined(__opencl_c_ext_fp32_global_atomic_min_max) | ||
193 | + | ||
194 | +#if defined(__opencl_c_ext_fp32_local_atomic_min_max) | ||
195 | +float __ovld atomic_fetch_min(volatile __local atomic_float *object, | ||
196 | + float operand); | ||
197 | +float __ovld atomic_fetch_max(volatile __local atomic_float *object, | ||
198 | + float operand); | ||
199 | +float __ovld atomic_fetch_min_explicit(volatile __local atomic_float *object, | ||
200 | + float operand, memory_order order); | ||
201 | +float __ovld atomic_fetch_max_explicit(volatile __local atomic_float *object, | ||
202 | + float operand, memory_order order); | ||
203 | +float __ovld atomic_fetch_min_explicit(volatile __local atomic_float *object, | ||
204 | + float operand, memory_order order, | ||
205 | + memory_scope scope); | ||
206 | +float __ovld atomic_fetch_max_explicit(volatile __local atomic_float *object, | ||
207 | + float operand, memory_order order, | ||
208 | + memory_scope scope); | ||
209 | +#endif // defined(__opencl_c_ext_fp32_local_atomic_min_max) | ||
210 | + | ||
211 | +#if defined(__opencl_c_ext_fp32_global_atomic_min_max) && \ | ||
212 | + defined(__opencl_c_ext_fp32_local_atomic_min_max) | ||
213 | +float __ovld atomic_fetch_min(volatile atomic_float *object, float operand); | ||
214 | +float __ovld atomic_fetch_max(volatile atomic_float *object, float operand); | ||
215 | +float __ovld atomic_fetch_min_explicit(volatile atomic_float *object, | ||
216 | + float operand, memory_order order); | ||
217 | +float __ovld atomic_fetch_max_explicit(volatile atomic_float *object, | ||
218 | + float operand, memory_order order); | ||
219 | +float __ovld atomic_fetch_min_explicit(volatile atomic_float *object, | ||
220 | + float operand, memory_order order, | ||
221 | + memory_scope scope); | ||
222 | +float __ovld atomic_fetch_max_explicit(volatile atomic_float *object, | ||
223 | + float operand, memory_order order, | ||
224 | + memory_scope scope); | ||
225 | +#endif // defined(__opencl_c_ext_fp32_global_atomic_min_max) && \ | ||
226 | + defined(__opencl_c_ext_fp32_local_atomic_min_max) | ||
227 | + | ||
228 | +#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics) | ||
229 | +#if defined(__opencl_c_ext_fp64_global_atomic_min_max) | ||
230 | +double __ovld atomic_fetch_min(volatile __global atomic_double *object, | ||
231 | + double operand); | ||
232 | +double __ovld atomic_fetch_max(volatile __global atomic_double *object, | ||
233 | + double operand); | ||
234 | +double __ovld atomic_fetch_min_explicit(volatile __global atomic_double *object, | ||
235 | + double operand, memory_order order); | ||
236 | +double __ovld atomic_fetch_max_explicit(volatile __global atomic_double *object, | ||
237 | + double operand, memory_order order); | ||
238 | +double __ovld atomic_fetch_min_explicit(volatile __global atomic_double *object, | ||
239 | + double operand, memory_order order, | ||
240 | + memory_scope scope); | ||
241 | +double __ovld atomic_fetch_max_explicit(volatile __global atomic_double *object, | ||
242 | + double operand, memory_order order, | ||
243 | + memory_scope scope); | ||
244 | +#endif // defined(__opencl_c_ext_fp64_global_atomic_min_max) | ||
245 | + | ||
246 | +#if defined(__opencl_c_ext_fp64_local_atomic_min_max) | ||
247 | +double __ovld atomic_fetch_min(volatile __local atomic_double *object, | ||
248 | + double operand); | ||
249 | +double __ovld atomic_fetch_max(volatile __local atomic_double *object, | ||
250 | + double operand); | ||
251 | +double __ovld atomic_fetch_min_explicit(volatile __local atomic_double *object, | ||
252 | + double operand, memory_order order); | ||
253 | +double __ovld atomic_fetch_max_explicit(volatile __local atomic_double *object, | ||
254 | + double operand, memory_order order); | ||
255 | +double __ovld atomic_fetch_min_explicit(volatile __local atomic_double *object, | ||
256 | + double operand, memory_order order, | ||
257 | + memory_scope scope); | ||
258 | +double __ovld atomic_fetch_max_explicit(volatile __local atomic_double *object, | ||
259 | + double operand, memory_order order, | ||
260 | + memory_scope scope); | ||
261 | +#endif // defined(__opencl_c_ext_fp64_local_atomic_min_max) | ||
262 | + | ||
263 | +#if defined(__opencl_c_ext_fp64_global_atomic_min_max) && \ | ||
264 | + defined(__opencl_c_ext_fp64_local_atomic_min_max) | ||
265 | +double __ovld atomic_fetch_min(volatile atomic_double *object, double operand); | ||
266 | +double __ovld atomic_fetch_max(volatile atomic_double *object, double operand); | ||
267 | +double __ovld atomic_fetch_min_explicit(volatile atomic_double *object, | ||
268 | + double operand, memory_order order); | ||
269 | +double __ovld atomic_fetch_max_explicit(volatile atomic_double *object, | ||
270 | + double operand, memory_order order); | ||
271 | +double __ovld atomic_fetch_min_explicit(volatile atomic_double *object, | ||
272 | + double operand, memory_order order, | ||
273 | + memory_scope scope); | ||
274 | +double __ovld atomic_fetch_max_explicit(volatile atomic_double *object, | ||
275 | + double operand, memory_order order, | ||
276 | + memory_scope scope); | ||
277 | +#endif // defined(__opencl_c_ext_fp64_global_atomic_min_max) && \ | ||
278 | + defined(__opencl_c_ext_fp64_local_atomic_min_max) | ||
279 | +#endif // defined(cl_khr_int64_base_atomics) && | ||
280 | + // defined(cl_khr_int64_extended_atomics) | ||
281 | + | ||
282 | +#if defined(__opencl_c_ext_fp16_global_atomic_add) | ||
283 | +half __ovld atomic_fetch_add(volatile __global atomic_half *object, | ||
284 | + half operand); | ||
285 | +half __ovld atomic_fetch_sub(volatile __global atomic_half *object, | ||
286 | + half operand); | ||
287 | +half __ovld atomic_fetch_add_explicit(volatile __global atomic_half *object, | ||
288 | + half operand, memory_order order); | ||
289 | +half __ovld atomic_fetch_sub_explicit(volatile __global atomic_half *object, | ||
290 | + half operand, memory_order order); | ||
291 | +half __ovld atomic_fetch_add_explicit(volatile __global atomic_half *object, | ||
292 | + half operand, memory_order order, | ||
293 | + memory_scope scope); | ||
294 | +half __ovld atomic_fetch_sub_explicit(volatile __global atomic_half *object, | ||
295 | + half operand, memory_order order, | ||
296 | + memory_scope scope); | ||
297 | +#endif // defined(__opencl_c_ext_fp16_global_atomic_add) | ||
298 | + | ||
299 | +#if defined(__opencl_c_ext_fp16_local_atomic_add) | ||
300 | +half __ovld atomic_fetch_add(volatile __local atomic_half *object, | ||
301 | + half operand); | ||
302 | +half __ovld atomic_fetch_sub(volatile __local atomic_half *object, | ||
303 | + half operand); | ||
304 | +half __ovld atomic_fetch_add_explicit(volatile __local atomic_half *object, | ||
305 | + half operand, memory_order order); | ||
306 | +half __ovld atomic_fetch_sub_explicit(volatile __local atomic_half *object, | ||
307 | + half operand, memory_order order); | ||
308 | +half __ovld atomic_fetch_add_explicit(volatile __local atomic_half *object, | ||
309 | + half operand, memory_order order, | ||
310 | + memory_scope scope); | ||
311 | +half __ovld atomic_fetch_sub_explicit(volatile __local atomic_half *object, | ||
312 | + half operand, memory_order order, | ||
313 | + memory_scope scope); | ||
314 | +#endif // defined(__opencl_c_ext_fp16_local_atomic_add) | ||
315 | + | ||
316 | +#if defined(__opencl_c_ext_fp16_global_atomic_add) && \ | ||
317 | + defined(__opencl_c_ext_fp16_local_atomic_add) | ||
318 | +half __ovld atomic_fetch_add(volatile atomic_half *object, half operand); | ||
319 | +half __ovld atomic_fetch_sub(volatile atomic_half *object, half operand); | ||
320 | +half __ovld atomic_fetch_add_explicit(volatile atomic_half *object, | ||
321 | + half operand, memory_order order); | ||
322 | +half __ovld atomic_fetch_sub_explicit(volatile atomic_half *object, | ||
323 | + half operand, memory_order order); | ||
324 | +half __ovld atomic_fetch_add_explicit(volatile atomic_half *object, | ||
325 | + half operand, memory_order order, | ||
326 | + memory_scope scope); | ||
327 | +half __ovld atomic_fetch_sub_explicit(volatile atomic_half *object, | ||
328 | + half operand, memory_order order, | ||
329 | + memory_scope scope); | ||
330 | +#endif // defined(__opencl_c_ext_fp16_global_atomic_add) && \ | ||
331 | + defined(__opencl_c_ext_fp16_local_atomic_add) | ||
332 | + | ||
333 | +#if defined(__opencl_c_ext_fp32_global_atomic_add) | ||
334 | +float __ovld atomic_fetch_add(volatile __global atomic_float *object, | ||
335 | + float operand); | ||
336 | +float __ovld atomic_fetch_sub(volatile __global atomic_float *object, | ||
337 | + float operand); | ||
338 | +float __ovld atomic_fetch_add_explicit(volatile __global atomic_float *object, | ||
339 | + float operand, memory_order order); | ||
340 | +float __ovld atomic_fetch_sub_explicit(volatile __global atomic_float *object, | ||
341 | + float operand, memory_order order); | ||
342 | +float __ovld atomic_fetch_add_explicit(volatile __global atomic_float *object, | ||
343 | + float operand, memory_order order, | ||
344 | + memory_scope scope); | ||
345 | +float __ovld atomic_fetch_sub_explicit(volatile __global atomic_float *object, | ||
346 | + float operand, memory_order order, | ||
347 | + memory_scope scope); | ||
348 | +#endif // defined(__opencl_c_ext_fp32_global_atomic_add) | ||
349 | + | ||
350 | +#if defined(__opencl_c_ext_fp32_local_atomic_add) | ||
351 | +float __ovld atomic_fetch_add(volatile __local atomic_float *object, | ||
352 | + float operand); | ||
353 | +float __ovld atomic_fetch_sub(volatile __local atomic_float *object, | ||
354 | + float operand); | ||
355 | +float __ovld atomic_fetch_add_explicit(volatile __local atomic_float *object, | ||
356 | + float operand, memory_order order); | ||
357 | +float __ovld atomic_fetch_sub_explicit(volatile __local atomic_float *object, | ||
358 | + float operand, memory_order order); | ||
359 | +float __ovld atomic_fetch_add_explicit(volatile __local atomic_float *object, | ||
360 | + float operand, memory_order order, | ||
361 | + memory_scope scope); | ||
362 | +float __ovld atomic_fetch_sub_explicit(volatile __local atomic_float *object, | ||
363 | + float operand, memory_order order, | ||
364 | + memory_scope scope); | ||
365 | +#endif // defined(__opencl_c_ext_fp32_local_atomic_add) | ||
366 | + | ||
367 | +#if defined(__opencl_c_ext_fp32_global_atomic_add) && \ | ||
368 | + defined(__opencl_c_ext_fp32_local_atomic_add) | ||
369 | +float __ovld atomic_fetch_add(volatile atomic_float *object, float operand); | ||
370 | +float __ovld atomic_fetch_sub(volatile atomic_float *object, float operand); | ||
371 | +float __ovld atomic_fetch_add_explicit(volatile atomic_float *object, | ||
372 | + float operand, memory_order order); | ||
373 | +float __ovld atomic_fetch_sub_explicit(volatile atomic_float *object, | ||
374 | + float operand, memory_order order); | ||
375 | +float __ovld atomic_fetch_add_explicit(volatile atomic_float *object, | ||
376 | + float operand, memory_order order, | ||
377 | + memory_scope scope); | ||
378 | +float __ovld atomic_fetch_sub_explicit(volatile atomic_float *object, | ||
379 | + float operand, memory_order order, | ||
380 | + memory_scope scope); | ||
381 | +#endif // defined(__opencl_c_ext_fp32_global_atomic_add) && \ | ||
382 | + defined(__opencl_c_ext_fp32_local_atomic_add) | ||
383 | + | ||
384 | +#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics) | ||
385 | +#if defined(__opencl_c_ext_fp64_global_atomic_add) | ||
386 | +double __ovld atomic_fetch_add(volatile __global atomic_double *object, | ||
387 | + double operand); | ||
388 | +double __ovld atomic_fetch_sub(volatile __global atomic_double *object, | ||
389 | + double operand); | ||
390 | +double __ovld atomic_fetch_add_explicit(volatile __global atomic_double *object, | ||
391 | + double operand, memory_order order); | ||
392 | +double __ovld atomic_fetch_sub_explicit(volatile __global atomic_double *object, | ||
393 | + double operand, memory_order order); | ||
394 | +double __ovld atomic_fetch_add_explicit(volatile __global atomic_double *object, | ||
395 | + double operand, memory_order order, | ||
396 | + memory_scope scope); | ||
397 | +double __ovld atomic_fetch_sub_explicit(volatile __global atomic_double *object, | ||
398 | + double operand, memory_order order, | ||
399 | + memory_scope scope); | ||
400 | +#endif // defined(__opencl_c_ext_fp64_global_atomic_add) | ||
401 | + | ||
402 | +#if defined(__opencl_c_ext_fp64_local_atomic_add) | ||
403 | +double __ovld atomic_fetch_add(volatile __local atomic_double *object, | ||
404 | + double operand); | ||
405 | +double __ovld atomic_fetch_sub(volatile __local atomic_double *object, | ||
406 | + double operand); | ||
407 | +double __ovld atomic_fetch_add_explicit(volatile __local atomic_double *object, | ||
408 | + double operand, memory_order order); | ||
409 | +double __ovld atomic_fetch_sub_explicit(volatile __local atomic_double *object, | ||
410 | + double operand, memory_order order); | ||
411 | +double __ovld atomic_fetch_add_explicit(volatile __local atomic_double *object, | ||
412 | + double operand, memory_order order, | ||
413 | + memory_scope scope); | ||
414 | +double __ovld atomic_fetch_sub_explicit(volatile __local atomic_double *object, | ||
415 | + double operand, memory_order order, | ||
416 | + memory_scope scope); | ||
417 | +#endif // defined(__opencl_c_ext_fp64_local_atomic_add) | ||
418 | + | ||
419 | +#if defined(__opencl_c_ext_fp64_global_atomic_add) && \ | ||
420 | + defined(__opencl_c_ext_fp64_local_atomic_add) | ||
421 | +double __ovld atomic_fetch_add(volatile atomic_double *object, double operand); | ||
422 | +double __ovld atomic_fetch_sub(volatile atomic_double *object, double operand); | ||
423 | +double __ovld atomic_fetch_add_explicit(volatile atomic_double *object, | ||
424 | + double operand, memory_order order); | ||
425 | +double __ovld atomic_fetch_sub_explicit(volatile atomic_double *object, | ||
426 | + double operand, memory_order order); | ||
427 | +double __ovld atomic_fetch_add_explicit(volatile atomic_double *object, | ||
428 | + double operand, memory_order order, | ||
429 | + memory_scope scope); | ||
430 | +double __ovld atomic_fetch_sub_explicit(volatile atomic_double *object, | ||
431 | + double operand, memory_order order, | ||
432 | + memory_scope scope); | ||
433 | +#endif // defined(__opencl_c_ext_fp64_global_atomic_add) && \ | ||
434 | + defined(__opencl_c_ext_fp64_local_atomic_add) | ||
435 | +#endif // defined(cl_khr_int64_base_atomics) && | ||
436 | + // defined(cl_khr_int64_extended_atomics) | ||
437 | + | ||
438 | +#endif // cl_ext_float_atomics | ||
439 | + | ||
440 | // atomic_store() | ||
441 | |||
442 | void __ovld atomic_store(volatile atomic_int *object, int desired); | ||
443 | diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp | ||
444 | index 450f9c020f7f..a91291c7af38 100644 | ||
445 | --- a/clang/lib/Sema/Sema.cpp | ||
446 | +++ b/clang/lib/Sema/Sema.cpp | ||
447 | @@ -313,6 +313,9 @@ void Sema::Initialize() { | ||
448 | addImplicitTypedef("atomic_long", AtomicLongT); | ||
449 | auto AtomicULongT = Context.getAtomicType(Context.UnsignedLongTy); | ||
450 | addImplicitTypedef("atomic_ulong", AtomicULongT); | ||
451 | + auto AtomicHalfT = Context.getAtomicType(Context.HalfTy); | ||
452 | + addImplicitTypedef("atomic_half", AtomicHalfT); | ||
453 | + setOpenCLExtensionForType(AtomicHalfT, "cl_khr_fp16"); | ||
454 | addImplicitTypedef("atomic_float", | ||
455 | Context.getAtomicType(Context.FloatTy)); | ||
456 | auto AtomicDoubleT = Context.getAtomicType(Context.DoubleTy); | ||
457 | diff --git a/clang/test/Headers/opencl-c-header.cl b/clang/test/Headers/opencl-c-header.cl | ||
458 | index 13a3b62481ec..443f682c711a 100644 | ||
459 | --- a/clang/test/Headers/opencl-c-header.cl | ||
460 | +++ b/clang/test/Headers/opencl-c-header.cl | ||
461 | @@ -124,6 +124,48 @@ global atomic_int z = ATOMIC_VAR_INIT(99); | ||
462 | #if cl_khr_subgroup_clustered_reduce != 1 | ||
463 | #error "Incorrectly defined cl_khr_subgroup_clustered_reduce" | ||
464 | #endif | ||
465 | +#if __opencl_c_ext_fp16_global_atomic_load_store != 1 | ||
466 | +#error "Incorrectly defined __opencl_c_ext_fp16_global_atomic_load_store" | ||
467 | +#endif | ||
468 | +#if __opencl_c_ext_fp16_local_atomic_load_store != 1 | ||
469 | +#error "Incorrectly defined __opencl_c_ext_fp16_local_atomic_load_store" | ||
470 | +#endif | ||
471 | +#if __opencl_c_ext_fp16_global_atomic_add != 1 | ||
472 | +#error "Incorrectly defined __opencl_c_ext_fp16_global_atomic_add" | ||
473 | +#endif | ||
474 | +#if __opencl_c_ext_fp32_global_atomic_add != 1 | ||
475 | +#error "Incorrectly defined __opencl_c_ext_fp32_global_atomic_add" | ||
476 | +#endif | ||
477 | +#if __opencl_c_ext_fp64_global_atomic_add != 1 | ||
478 | +#error "Incorrectly defined __opencl_c_ext_fp64_global_atomic_add" | ||
479 | +#endif | ||
480 | +#if __opencl_c_ext_fp16_local_atomic_add != 1 | ||
481 | +#error "Incorrectly defined __opencl_c_ext_fp16_local_atomic_add" | ||
482 | +#endif | ||
483 | +#if __opencl_c_ext_fp32_local_atomic_add != 1 | ||
484 | +#error "Incorrectly defined __opencl_c_ext_fp32_local_atomic_add" | ||
485 | +#endif | ||
486 | +#if __opencl_c_ext_fp64_local_atomic_add != 1 | ||
487 | +#error "Incorrectly defined __opencl_c_ext_fp64_local_atomic_add" | ||
488 | +#endif | ||
489 | +#if __opencl_c_ext_fp16_global_atomic_min_max != 1 | ||
490 | +#error "Incorrectly defined __opencl_c_ext_fp16_global_atomic_min_max" | ||
491 | +#endif | ||
492 | +#if __opencl_c_ext_fp32_global_atomic_min_max != 1 | ||
493 | +#error "Incorrectly defined __opencl_c_ext_fp32_global_atomic_min_max" | ||
494 | +#endif | ||
495 | +#if __opencl_c_ext_fp64_global_atomic_min_max != 1 | ||
496 | +#error "Incorrectly defined __opencl_c_ext_fp64_global_atomic_min_max" | ||
497 | +#endif | ||
498 | +#if __opencl_c_ext_fp16_local_atomic_min_max != 1 | ||
499 | +#error "Incorrectly defined __opencl_c_ext_fp16_local_atomic_min_max" | ||
500 | +#endif | ||
501 | +#if __opencl_c_ext_fp32_local_atomic_min_max != 1 | ||
502 | +#error "Incorrectly defined __opencl_c_ext_fp32_local_atomic_min_max" | ||
503 | +#endif | ||
504 | +#if __opencl_c_ext_fp64_local_atomic_min_max != 1 | ||
505 | +#error "Incorrectly defined __opencl_c_ext_fp64_local_atomic_min_max" | ||
506 | +#endif | ||
507 | |||
508 | #else | ||
509 | |||
510 | @@ -148,6 +190,48 @@ global atomic_int z = ATOMIC_VAR_INIT(99); | ||
511 | #ifdef cl_khr_subgroup_clustered_reduce | ||
512 | #error "Incorrect cl_khr_subgroup_clustered_reduce define" | ||
513 | #endif | ||
514 | +#ifdef __opencl_c_ext_fp16_global_atomic_load_store | ||
515 | +#error "Incorrectly __opencl_c_ext_fp16_global_atomic_load_store defined" | ||
516 | +#endif | ||
517 | +#ifdef __opencl_c_ext_fp16_local_atomic_load_store | ||
518 | +#error "Incorrectly __opencl_c_ext_fp16_local_atomic_load_store defined" | ||
519 | +#endif | ||
520 | +#ifdef __opencl_c_ext_fp16_global_atomic_add | ||
521 | +#error "Incorrectly __opencl_c_ext_fp16_global_atomic_add defined" | ||
522 | +#endif | ||
523 | +#ifdef __opencl_c_ext_fp32_global_atomic_add | ||
524 | +#error "Incorrectly __opencl_c_ext_fp32_global_atomic_add defined" | ||
525 | +#endif | ||
526 | +#ifdef __opencl_c_ext_fp64_global_atomic_add | ||
527 | +#error "Incorrectly __opencl_c_ext_fp64_global_atomic_add defined" | ||
528 | +#endif | ||
529 | +#ifdef __opencl_c_ext_fp16_local_atomic_add | ||
530 | +#error "Incorrectly __opencl_c_ext_fp16_local_atomic_add defined" | ||
531 | +#endif | ||
532 | +#ifdef __opencl_c_ext_fp32_local_atomic_add | ||
533 | +#error "Incorrectly __opencl_c_ext_fp32_local_atomic_add defined" | ||
534 | +#endif | ||
535 | +#ifdef __opencl_c_ext_fp64_local_atomic_add | ||
536 | +#error "Incorrectly __opencl_c_ext_fp64_local_atomic_add defined" | ||
537 | +#endif | ||
538 | +#ifdef __opencl_c_ext_fp16_global_atomic_min_max | ||
539 | +#error "Incorrectly __opencl_c_ext_fp16_global_atomic_min_max defined" | ||
540 | +#endif | ||
541 | +#ifdef __opencl_c_ext_fp32_global_atomic_min_max | ||
542 | +#error "Incorrectly __opencl_c_ext_fp32_global_atomic_min_max defined" | ||
543 | +#endif | ||
544 | +#ifdef __opencl_c_ext_fp64_global_atomic_min_max | ||
545 | +#error "Incorrectly __opencl_c_ext_fp64_global_atomic_min_max defined" | ||
546 | +#endif | ||
547 | +#ifdef __opencl_c_ext_fp16_local_atomic_min_max | ||
548 | +#error "Incorrectly __opencl_c_ext_fp16_local_atomic_min_max defined" | ||
549 | +#endif | ||
550 | +#ifdef __opencl_c_ext_fp32_local_atomic_min_max | ||
551 | +#error "Incorrectly __opencl_c_ext_fp32_local_atomic_min_max defined" | ||
552 | +#endif | ||
553 | +#ifdef __opencl_c_ext_fp64_local_atomic_min_max | ||
554 | +#error "Incorrectly __opencl_c_ext_fp64_local_atomic_min_max defined" | ||
555 | +#endif | ||
556 | |||
557 | #endif //(defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) | ||
558 | |||
559 | -- | ||
560 | 2.29.2 | ||
561 | |||
diff --git a/dynamic-layers/clang-layer/recipes-devtools/clang/files/llvm12-0004-ispc-12_0_disable-A-B-A-B-and-BSWAP-in-InstCombine.patch b/dynamic-layers/clang-layer/recipes-devtools/clang/files/llvm12-0004-ispc-12_0_disable-A-B-A-B-and-BSWAP-in-InstCombine.patch deleted file mode 100644 index fb15d19c..00000000 --- a/dynamic-layers/clang-layer/recipes-devtools/clang/files/llvm12-0004-ispc-12_0_disable-A-B-A-B-and-BSWAP-in-InstCombine.patch +++ /dev/null | |||
@@ -1,67 +0,0 @@ | |||
1 | From 0c4ba4947d1630f2e13fc260399f0892b2c9b323 Mon Sep 17 00:00:00 2001 | ||
2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
3 | Date: Fri, 27 Aug 2021 10:55:13 +0800 | ||
4 | Subject: [PATCH 1/2] This patch is needed for ISPC for Gen only | ||
5 | |||
6 | 1. Transformation of add to or is not safe for VC backend. | ||
7 | 2. bswap intrinsics is not supported in VC backend yet. | ||
8 | |||
9 | Upstream-Status: Backport [Taken from ispc, https://github.com/ispc/ispc/blob/v1.16.1/llvm_patches/12_0_disable-A-B-A-B-and-BSWAP-in-InstCombine.patch] | ||
10 | |||
11 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
12 | --- | ||
13 | llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp | 10 +++++++--- | ||
14 | .../lib/Transforms/InstCombine/InstCombineAndOrXor.cpp | 9 ++++++--- | ||
15 | 2 files changed, 13 insertions(+), 6 deletions(-) | ||
16 | |||
17 | diff --git a/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp b/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp | ||
18 | index bacb8689892a..f3d0120db256 100644 | ||
19 | --- a/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp | ||
20 | +++ b/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp | ||
21 | @@ -15,6 +15,7 @@ | ||
22 | #include "llvm/ADT/APInt.h" | ||
23 | #include "llvm/ADT/STLExtras.h" | ||
24 | #include "llvm/ADT/SmallVector.h" | ||
25 | +#include "llvm/ADT/Triple.h" | ||
26 | #include "llvm/Analysis/InstructionSimplify.h" | ||
27 | #include "llvm/Analysis/ValueTracking.h" | ||
28 | #include "llvm/IR/Constant.h" | ||
29 | @@ -1363,9 +1364,12 @@ Instruction *InstCombinerImpl::visitAdd(BinaryOperator &I) { | ||
30 | } | ||
31 | } | ||
32 | |||
33 | - // A+B --> A|B iff A and B have no bits set in common. | ||
34 | - if (haveNoCommonBitsSet(LHS, RHS, DL, &AC, &I, &DT)) | ||
35 | - return BinaryOperator::CreateOr(LHS, RHS); | ||
36 | + // Disable this transformation for ISPC SPIR-V | ||
37 | + if (!Triple(I.getModule()->getTargetTriple()).isSPIR()) { | ||
38 | + // A+B --> A|B iff A and B have no bits set in common. | ||
39 | + if (haveNoCommonBitsSet(LHS, RHS, DL, &AC, &I, &DT)) | ||
40 | + return BinaryOperator::CreateOr(LHS, RHS); | ||
41 | + } | ||
42 | |||
43 | // add (select X 0 (sub n A)) A --> select X A n | ||
44 | { | ||
45 | diff --git a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp | ||
46 | index 68c4156af2c4..b145b863ca84 100644 | ||
47 | --- a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp | ||
48 | +++ b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp | ||
49 | @@ -2584,9 +2584,12 @@ Instruction *InstCombinerImpl::visitOr(BinaryOperator &I) { | ||
50 | if (Instruction *FoldedLogic = foldBinOpIntoSelectOrPhi(I)) | ||
51 | return FoldedLogic; | ||
52 | |||
53 | - if (Instruction *BSwap = matchBSwapOrBitReverse(I, /*MatchBSwaps*/ true, | ||
54 | - /*MatchBitReversals*/ false)) | ||
55 | - return BSwap; | ||
56 | + // Disable this transformation for ISPC SPIR-V | ||
57 | + if (!Triple(I.getModule()->getTargetTriple()).isSPIR()) { | ||
58 | + if (Instruction *BSwap = matchBSwapOrBitReverse(I, /*MatchBSwaps*/ true, | ||
59 | + /*MatchBitReversals*/ false)) | ||
60 | + return BSwap; | ||
61 | + } | ||
62 | |||
63 | if (Instruction *Funnel = matchFunnelShift(I, *this)) | ||
64 | return Funnel; | ||
65 | -- | ||
66 | 2.17.1 | ||
67 | |||
diff --git a/dynamic-layers/clang-layer/recipes-devtools/clang/files/llvm12-0005-ispc-12_0_fix_for_2111.patch b/dynamic-layers/clang-layer/recipes-devtools/clang/files/llvm12-0005-ispc-12_0_fix_for_2111.patch deleted file mode 100644 index 4951a63d..00000000 --- a/dynamic-layers/clang-layer/recipes-devtools/clang/files/llvm12-0005-ispc-12_0_fix_for_2111.patch +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | From 913e07ea5acf2148e3748b45ddfe3fac3b2d051c Mon Sep 17 00:00:00 2001 | ||
2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
3 | Date: Fri, 27 Aug 2021 10:56:57 +0800 | ||
4 | Subject: [PATCH 2/2] This patch is a fix for #2111 | ||
5 | |||
6 | It ensures that shuffle is lowered for this particular case correctly. | ||
7 | |||
8 | Upstream-Status: Backport [https://github.com/llvm/llvm-project/commit/9ab99f773fec7da4183495a3fdc655a797d3bea2] | ||
9 | |||
10 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
11 | --- | ||
12 | llvm/lib/Target/X86/X86ISelLowering.cpp | 7 ++++--- | ||
13 | 1 file changed, 4 insertions(+), 3 deletions(-) | ||
14 | |||
15 | diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp | ||
16 | index 6b816c710f98..3121b0e818ac 100644 | ||
17 | --- a/llvm/lib/Target/X86/X86ISelLowering.cpp | ||
18 | +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp | ||
19 | @@ -43192,9 +43192,10 @@ static SDValue combineHorizOpWithShuffle(SDNode *N, SelectionDAG &DAG, | ||
20 | ShuffleVectorSDNode::commuteMask(ShuffleMask1); | ||
21 | } | ||
22 | if ((Op00 == Op10) && (Op01 == Op11)) { | ||
23 | - SmallVector<int, 4> ShuffleMask; | ||
24 | - ShuffleMask.append(ShuffleMask0.begin(), ShuffleMask0.end()); | ||
25 | - ShuffleMask.append(ShuffleMask1.begin(), ShuffleMask1.end()); | ||
26 | + const int Map[4] = {0, 2, 1, 3}; | ||
27 | + SmallVector<int, 4> ShuffleMask( | ||
28 | + {Map[ShuffleMask0[0]], Map[ShuffleMask1[0]], Map[ShuffleMask0[1]], | ||
29 | + Map[ShuffleMask1[1]]}); | ||
30 | SDLoc DL(N); | ||
31 | MVT ShufVT = VT.isFloatingPoint() ? MVT::v4f64 : MVT::v4i64; | ||
32 | SDValue Res = DAG.getNode(Opcode, DL, VT, Op00, Op01); | ||
33 | -- | ||
34 | 2.17.1 | ||
35 | |||
diff --git a/dynamic-layers/clang-layer/recipes-devtools/clang/files/llvm12-0006-OpenCL-Add-cl_khr_integer_dot_product.patch b/dynamic-layers/clang-layer/recipes-devtools/clang/files/llvm12-0006-OpenCL-Add-cl_khr_integer_dot_product.patch deleted file mode 100644 index 25174047..00000000 --- a/dynamic-layers/clang-layer/recipes-devtools/clang/files/llvm12-0006-OpenCL-Add-cl_khr_integer_dot_product.patch +++ /dev/null | |||
@@ -1,146 +0,0 @@ | |||
1 | From 54802abece1e4742050795162e3a773f0e143aa3 Mon Sep 17 00:00:00 2001 | ||
2 | From: haonanya <haonan.yang@intel.com> | ||
3 | Date: Fri, 24 Dec 2021 15:27:46 +0800 | ||
4 | Subject: [PATCH] [OpenCL] Add cl_khr_integer_dot_product | ||
5 | |||
6 | This is backporting of https://reviews.llvm.org/D106434 | ||
7 | Add the builtins defined by Section 42 "Integer dot product" in the OpenCL | ||
8 | Extension Specification. | ||
9 | |||
10 | See https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_Ext.html#cl_khr_integer_dot_product | ||
11 | |||
12 | Signed-off-by: haonanya <haonan.yang@intel.com> | ||
13 | |||
14 | Upstream-Status: Backport [https://github.com/llvm/llvm-project/commit/989bedec7a6ae95a0db865f23677047f78dc9257] | ||
15 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
16 | --- | ||
17 | clang/lib/Headers/opencl-c-base.h | 3 +++ | ||
18 | clang/lib/Headers/opencl-c.h | 24 ++++++++++++++++++++++++ | ||
19 | clang/lib/Sema/OpenCLBuiltins.td | 25 +++++++++++++++++++++++++ | ||
20 | clang/test/Headers/opencl-c-header.cl | 18 ++++++++++++++++++ | ||
21 | 4 files changed, 70 insertions(+) | ||
22 | |||
23 | diff --git a/clang/lib/Headers/opencl-c-base.h b/clang/lib/Headers/opencl-c-base.h | ||
24 | index d94d64372dbb..b55d9601a452 100644 | ||
25 | --- a/clang/lib/Headers/opencl-c-base.h | ||
26 | +++ b/clang/lib/Headers/opencl-c-base.h | ||
27 | @@ -40,6 +40,9 @@ | ||
28 | #define __opencl_c_ext_fp32_local_atomic_add 1 | ||
29 | #define __opencl_c_ext_fp32_global_atomic_min_max 1 | ||
30 | #define __opencl_c_ext_fp32_local_atomic_min_max 1 | ||
31 | +#define cl_khr_integer_dot_product 1 | ||
32 | +#define __opencl_c_integer_dot_product_input_4x8bit 1 | ||
33 | +#define __opencl_c_integer_dot_product_input_4x8bit_packed 1 | ||
34 | #endif // defined(__SPIR__) | ||
35 | #endif // (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) | ||
36 | |||
37 | diff --git a/clang/lib/Headers/opencl-c.h b/clang/lib/Headers/opencl-c.h | ||
38 | index 501a04f6e82b..50dcc03955cb 100644 | ||
39 | --- a/clang/lib/Headers/opencl-c.h | ||
40 | +++ b/clang/lib/Headers/opencl-c.h | ||
41 | @@ -16362,6 +16362,30 @@ double __ovld sub_group_clustered_reduce_max( double value, uint clustersize ); | ||
42 | |||
43 | #endif // cl_khr_subgroup_clustered_reduce | ||
44 | |||
45 | +#if defined(__opencl_c_integer_dot_product_input_4x8bit) | ||
46 | +uint __ovld __cnfn dot(uchar4, uchar4); | ||
47 | +int __ovld __cnfn dot(char4, char4); | ||
48 | +int __ovld __cnfn dot(uchar4, char4); | ||
49 | +int __ovld __cnfn dot(char4, uchar4); | ||
50 | + | ||
51 | +uint __ovld __cnfn dot_acc_sat(uchar4, uchar4, uint); | ||
52 | +int __ovld __cnfn dot_acc_sat(char4, char4, int); | ||
53 | +int __ovld __cnfn dot_acc_sat(uchar4, char4, int); | ||
54 | +int __ovld __cnfn dot_acc_sat(char4, uchar4, int); | ||
55 | +#endif // __opencl_c_integer_dot_product_input_4x8bit | ||
56 | + | ||
57 | +#if defined(__opencl_c_integer_dot_product_input_4x8bit_packed) | ||
58 | +uint __ovld __cnfn dot_4x8packed_uu_uint(uint, uint); | ||
59 | +int __ovld __cnfn dot_4x8packed_ss_int(uint, uint); | ||
60 | +int __ovld __cnfn dot_4x8packed_us_int(uint, uint); | ||
61 | +int __ovld __cnfn dot_4x8packed_su_int(uint, uint); | ||
62 | + | ||
63 | +uint __ovld __cnfn dot_acc_sat_4x8packed_uu_uint(uint, uint, uint); | ||
64 | +int __ovld __cnfn dot_acc_sat_4x8packed_ss_int(uint, uint, int); | ||
65 | +int __ovld __cnfn dot_acc_sat_4x8packed_us_int(uint, uint, int); | ||
66 | +int __ovld __cnfn dot_acc_sat_4x8packed_su_int(uint, uint, int); | ||
67 | +#endif // __opencl_c_integer_dot_product_input_4x8bit_packed | ||
68 | + | ||
69 | #if defined(cl_intel_subgroups) | ||
70 | // Intel-Specific Sub Group Functions | ||
71 | float __ovld __conv intel_sub_group_shuffle( float x, uint c ); | ||
72 | diff --git a/clang/lib/Sema/OpenCLBuiltins.td b/clang/lib/Sema/OpenCLBuiltins.td | ||
73 | index 745363a6b43f..3c5f8821063d 100644 | ||
74 | --- a/clang/lib/Sema/OpenCLBuiltins.td | ||
75 | +++ b/clang/lib/Sema/OpenCLBuiltins.td | ||
76 | @@ -1482,6 +1482,31 @@ let Extension = FuncExtKhrSubgroups in { | ||
77 | } | ||
78 | } | ||
79 | |||
80 | +// Section 42.3 - cl_khr_integer_dot_product | ||
81 | +let Extension = FunctionExtension<"__opencl_c_integer_dot_product_input_4x8bit"> in { | ||
82 | + def : Builtin<"dot", [UInt, VectorType<UChar, 4>, VectorType<UChar, 4>], Attr.Const>; | ||
83 | + def : Builtin<"dot", [Int, VectorType<Char, 4>, VectorType<Char, 4>], Attr.Const>; | ||
84 | + def : Builtin<"dot", [Int, VectorType<UChar, 4>, VectorType<Char, 4>], Attr.Const>; | ||
85 | + def : Builtin<"dot", [Int, VectorType<Char, 4>, VectorType<UChar, 4>], Attr.Const>; | ||
86 | + | ||
87 | + def : Builtin<"dot_acc_sat", [UInt, VectorType<UChar, 4>, VectorType<UChar, 4>, UInt], Attr.Const>; | ||
88 | + def : Builtin<"dot_acc_sat", [Int, VectorType<Char, 4>, VectorType<Char, 4>, Int], Attr.Const>; | ||
89 | + def : Builtin<"dot_acc_sat", [Int, VectorType<UChar, 4>, VectorType<Char, 4>, Int], Attr.Const>; | ||
90 | + def : Builtin<"dot_acc_sat", [Int, VectorType<Char, 4>, VectorType<UChar, 4>, Int], Attr.Const>; | ||
91 | +} | ||
92 | + | ||
93 | +let Extension = FunctionExtension<"__opencl_c_integer_dot_product_input_4x8bit_packed"> in { | ||
94 | + def : Builtin<"dot_4x8packed_uu_uint", [UInt, UInt, UInt], Attr.Const>; | ||
95 | + def : Builtin<"dot_4x8packed_ss_int", [Int, UInt, UInt], Attr.Const>; | ||
96 | + def : Builtin<"dot_4x8packed_us_int", [Int, UInt, UInt], Attr.Const>; | ||
97 | + def : Builtin<"dot_4x8packed_su_int", [Int, UInt, UInt], Attr.Const>; | ||
98 | + | ||
99 | + def : Builtin<"dot_acc_sat_4x8packed_uu_uint", [UInt, UInt, UInt, UInt], Attr.Const>; | ||
100 | + def : Builtin<"dot_acc_sat_4x8packed_ss_int", [Int, UInt, UInt, Int], Attr.Const>; | ||
101 | + def : Builtin<"dot_acc_sat_4x8packed_us_int", [Int, UInt, UInt, Int], Attr.Const>; | ||
102 | + def : Builtin<"dot_acc_sat_4x8packed_su_int", [Int, UInt, UInt, Int], Attr.Const>; | ||
103 | +} | ||
104 | + | ||
105 | //-------------------------------------------------------------------- | ||
106 | // Arm extensions. | ||
107 | let Extension = ArmIntegerDotProductInt8 in { | ||
108 | diff --git a/clang/test/Headers/opencl-c-header.cl b/clang/test/Headers/opencl-c-header.cl | ||
109 | index 443f682c711a..184eefd9f9c3 100644 | ||
110 | --- a/clang/test/Headers/opencl-c-header.cl | ||
111 | +++ b/clang/test/Headers/opencl-c-header.cl | ||
112 | @@ -166,6 +166,15 @@ global atomic_int z = ATOMIC_VAR_INIT(99); | ||
113 | #if __opencl_c_ext_fp64_local_atomic_min_max != 1 | ||
114 | #error "Incorrectly defined __opencl_c_ext_fp64_local_atomic_min_max" | ||
115 | #endif | ||
116 | +#if cl_khr_integer_dot_product != 1 | ||
117 | +#error "Incorrectly defined cl_khr_integer_dot_product" | ||
118 | +#endif | ||
119 | +#if __opencl_c_integer_dot_product_input_4x8bit != 1 | ||
120 | +#error "Incorrectly defined __opencl_c_integer_dot_product_input_4x8bit" | ||
121 | +#endif | ||
122 | +#if __opencl_c_integer_dot_product_input_4x8bit_packed != 1 | ||
123 | +#error "Incorrectly defined __opencl_c_integer_dot_product_input_4x8bit_packed" | ||
124 | +#endif | ||
125 | |||
126 | #else | ||
127 | |||
128 | @@ -232,6 +241,15 @@ global atomic_int z = ATOMIC_VAR_INIT(99); | ||
129 | #ifdef __opencl_c_ext_fp64_local_atomic_min_max | ||
130 | #error "Incorrectly __opencl_c_ext_fp64_local_atomic_min_max defined" | ||
131 | #endif | ||
132 | +#ifdef cl_khr_integer_dot_product | ||
133 | +#error "Incorrect cl_khr_integer_dot_product define" | ||
134 | +#endif | ||
135 | +#ifdef __opencl_c_integer_dot_product_input_4x8bit | ||
136 | +#error "Incorrect __opencl_c_integer_dot_product_input_4x8bit define" | ||
137 | +#endif | ||
138 | +#ifdef __opencl_c_integer_dot_product_input_4x8bit_packed | ||
139 | +#error "Incorrect __opencl_c_integer_dot_product_input_4x8bit_packed define" | ||
140 | +#endif | ||
141 | |||
142 | #endif //(defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) | ||
143 | |||
144 | -- | ||
145 | 2.17.1 | ||
146 | |||
diff --git a/dynamic-layers/clang-layer/recipes-devtools/clang/files/llvm12-0007-OpenCL-3.0-support.patch b/dynamic-layers/clang-layer/recipes-devtools/clang/files/llvm12-0007-OpenCL-3.0-support.patch deleted file mode 100644 index 567db40d..00000000 --- a/dynamic-layers/clang-layer/recipes-devtools/clang/files/llvm12-0007-OpenCL-3.0-support.patch +++ /dev/null | |||
@@ -1,4628 +0,0 @@ | |||
1 | From cc23dafd55bfe102e490c719f8b088e6b2a52561 Mon Sep 17 00:00:00 2001 | ||
2 | From: Haonan Yang <haonan.yang@intel.com> | ||
3 | Date: Fri, 15 Apr 2022 15:52:37 +0800 | ||
4 | Subject: [PATCH] OpenCL 3.0 support | ||
5 | |||
6 | Signed-off-by: Haonan Yang <haonan.yang@intel.com> | ||
7 | |||
8 | Upstream-Status: Submitted | ||
9 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
10 | --- | ||
11 | clang/docs/OpenCLSupport.rst | 19 +- | ||
12 | .../clang/Basic/DiagnosticCommonKinds.td | 10 + | ||
13 | clang/include/clang/Basic/DiagnosticGroups.td | 2 + | ||
14 | .../clang/Basic/DiagnosticParseKinds.td | 5 +- | ||
15 | .../clang/Basic/DiagnosticSemaKinds.td | 13 +- | ||
16 | clang/include/clang/Basic/LangOptions.def | 2 + | ||
17 | .../include/clang/Basic/OpenCLExtensions.def | 82 +-- | ||
18 | clang/include/clang/Basic/OpenCLOptions.h | 71 ++- | ||
19 | clang/include/clang/Basic/TargetInfo.h | 18 +- | ||
20 | clang/include/clang/Sema/Overload.h | 3 - | ||
21 | clang/include/clang/Sema/Sema.h | 82 --- | ||
22 | clang/include/clang/Serialization/ASTWriter.h | 2 - | ||
23 | clang/lib/Basic/OpenCLOptions.cpp | 103 +++- | ||
24 | clang/lib/Basic/TargetInfo.cpp | 26 + | ||
25 | clang/lib/Basic/Targets.cpp | 43 +- | ||
26 | clang/lib/Basic/Targets/AMDGPU.h | 6 +- | ||
27 | clang/lib/Basic/Targets/NVPTX.h | 1 + | ||
28 | clang/lib/Basic/Targets/X86.cpp | 10 +- | ||
29 | clang/lib/Frontend/CompilerInstance.cpp | 5 + | ||
30 | clang/lib/Frontend/CompilerInvocation.cpp | 3 + | ||
31 | clang/lib/Frontend/InitPreprocessor.cpp | 25 +- | ||
32 | clang/lib/Headers/opencl-c-base.h | 15 + | ||
33 | clang/lib/Headers/opencl-c.h | 493 ++++++++++-------- | ||
34 | clang/lib/Parse/ParseDecl.cpp | 16 +- | ||
35 | clang/lib/Parse/ParsePragma.cpp | 17 +- | ||
36 | clang/lib/Parse/Parser.cpp | 2 - | ||
37 | clang/lib/Sema/DeclSpec.cpp | 3 +- | ||
38 | clang/lib/Sema/Sema.cpp | 185 ++----- | ||
39 | clang/lib/Sema/SemaCast.cpp | 4 +- | ||
40 | clang/lib/Sema/SemaChecking.cpp | 3 +- | ||
41 | clang/lib/Sema/SemaDecl.cpp | 36 +- | ||
42 | clang/lib/Sema/SemaDeclAttr.cpp | 17 +- | ||
43 | clang/lib/Sema/SemaExpr.cpp | 26 +- | ||
44 | clang/lib/Sema/SemaInit.cpp | 8 +- | ||
45 | clang/lib/Sema/SemaLookup.cpp | 22 +- | ||
46 | clang/lib/Sema/SemaOverload.cpp | 17 - | ||
47 | clang/lib/Sema/SemaType.cpp | 56 +- | ||
48 | clang/lib/Serialization/ASTReader.cpp | 27 +- | ||
49 | clang/lib/Serialization/ASTWriter.cpp | 71 +-- | ||
50 | .../CodeGenOpenCL/addr-space-struct-arg.cl | 6 +- | ||
51 | .../address-spaces-conversions.cl | 2 + | ||
52 | .../CodeGenOpenCL/address-spaces-mangling.cl | 6 +- | ||
53 | clang/test/CodeGenOpenCL/address-spaces.cl | 4 + | ||
54 | .../CodeGenOpenCL/amdgpu-sizeof-alignof.cl | 21 +- | ||
55 | .../CodeGenOpenCL/arm-integer-dot-product.cl | 11 +- | ||
56 | clang/test/CodeGenOpenCL/extension-begin.cl | 25 - | ||
57 | clang/test/CodeGenOpenCL/overload.cl | 1 + | ||
58 | clang/test/CodeGenOpenCL/printf.cl | 6 +- | ||
59 | clang/test/Headers/opencl-c-header.cl | 84 +++ | ||
60 | clang/test/Misc/nvptx.unsupported_core.cl | 7 + | ||
61 | clang/test/Misc/warning-flags.c | 2 +- | ||
62 | clang/test/Parser/opencl-atomics-cl20.cl | 104 ++-- | ||
63 | clang/test/SemaOpenCL/access-qualifier.cl | 40 +- | ||
64 | .../address-spaces-conversions-cl2.0.cl | 3 + | ||
65 | clang/test/SemaOpenCL/address-spaces.cl | 1 + | ||
66 | .../SemaOpenCL/arm-integer-dot-product.cl | 42 +- | ||
67 | .../SemaOpenCL/cl20-device-side-enqueue.cl | 4 +- | ||
68 | clang/test/SemaOpenCL/extension-begin.cl | 28 +- | ||
69 | clang/test/SemaOpenCL/extension-begin.h | 9 +- | ||
70 | clang/test/SemaOpenCL/extension-version.cl | 62 ++- | ||
71 | clang/test/SemaOpenCL/extensions.cl | 71 ++- | ||
72 | .../SemaOpenCL/fdeclare-opencl-builtins.cl | 27 +- | ||
73 | clang/test/SemaOpenCL/features.cl | 48 ++ | ||
74 | .../intel-subgroup-avc-ext-types.cl | 69 ++- | ||
75 | clang/test/SemaOpenCL/storageclass.cl | 234 ++++++++- | ||
76 | clang/test/SemaOpenCL/unsupported-image.cl | 69 +++ | ||
77 | 66 files changed, 1502 insertions(+), 1033 deletions(-) | ||
78 | delete mode 100644 clang/test/CodeGenOpenCL/extension-begin.cl | ||
79 | create mode 100644 clang/test/Misc/nvptx.unsupported_core.cl | ||
80 | create mode 100644 clang/test/SemaOpenCL/features.cl | ||
81 | create mode 100644 clang/test/SemaOpenCL/unsupported-image.cl | ||
82 | |||
83 | diff --git a/clang/docs/OpenCLSupport.rst b/clang/docs/OpenCLSupport.rst | ||
84 | index 0eaf0f300ee4..cba2539a6d11 100644 | ||
85 | --- a/clang/docs/OpenCLSupport.rst | ||
86 | +++ b/clang/docs/OpenCLSupport.rst | ||
87 | @@ -61,7 +61,24 @@ Missing features or with limited support | ||
88 | |||
89 | .. _opencl_300: | ||
90 | |||
91 | -OpenCL 3.0 Implementation Status | ||
92 | +OpenCL C 3.0 Usage | ||
93 | +================================ | ||
94 | + | ||
95 | +OpenCL C 3.0 language standard makes most OpenCL C 2.0 features optional. Optional | ||
96 | +functionality in OpenCL C 3.0 is indicated with the presence of feature-test macros | ||
97 | +(list of feature-test macros is `here <https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_C.html#features>`_). | ||
98 | +Command-line flag :ref:`-cl-ext <opencl_cl_ext>` can be used to override features supported by a target. | ||
99 | + | ||
100 | +For cases when there is an associated extension for a specific feature (fp64 and 3d image writes) | ||
101 | +user should specify both (extension and feature) in command-line flag: | ||
102 | + | ||
103 | + .. code-block:: console | ||
104 | + | ||
105 | + $ clang -cc1 -cl-std=CL3.0 -cl-ext=+cl_khr_fp64,+__opencl_c_fp64 ... | ||
106 | + $ clang -cc1 -cl-std=CL3.0 -cl-ext=-cl_khr_fp64,-__opencl_c_fp64 ... | ||
107 | + | ||
108 | + | ||
109 | +OpenCL C 3.0 Implementation Status | ||
110 | ================================ | ||
111 | |||
112 | The following table provides an overview of features in OpenCL C 3.0 and their | ||
113 | diff --git a/clang/include/clang/Basic/DiagnosticCommonKinds.td b/clang/include/clang/Basic/DiagnosticCommonKinds.td | ||
114 | index a4f96a97991e..734701ce9d9d 100644 | ||
115 | --- a/clang/include/clang/Basic/DiagnosticCommonKinds.td | ||
116 | +++ b/clang/include/clang/Basic/DiagnosticCommonKinds.td | ||
117 | @@ -347,4 +347,14 @@ def note_suggest_disabling_all_checkers : Note< | ||
118 | def warn_poison_system_directories : Warning < | ||
119 | "include location '%0' is unsafe for cross-compilation">, | ||
120 | InGroup<DiagGroup<"poison-system-directories">>, DefaultIgnore; | ||
121 | + | ||
122 | +def warn_opencl_unsupported_core_feature : Warning< | ||
123 | + "%0 is a core feature in %select{OpenCL C|C++ for OpenCL}1 version %2 but not supported on this target">, | ||
124 | + InGroup<OpenCLCoreFeaturesDiagGroup>, DefaultIgnore; | ||
125 | + | ||
126 | +def err_opencl_extension_and_feature_differs : Error< | ||
127 | + "options %0 and %1 are set to different values">; | ||
128 | + | ||
129 | +def err_opencl_feature_requires : Error< | ||
130 | + "feature %0 requires support of %1 feature">; | ||
131 | } | ||
132 | diff --git a/clang/include/clang/Basic/DiagnosticGroups.td b/clang/include/clang/Basic/DiagnosticGroups.td | ||
133 | index 04ba89aa457e..93099dd19a80 100644 | ||
134 | --- a/clang/include/clang/Basic/DiagnosticGroups.td | ||
135 | +++ b/clang/include/clang/Basic/DiagnosticGroups.td | ||
136 | @@ -1247,3 +1247,5 @@ in addition with the pragmas or -fmax-tokens flag to get any warnings. | ||
137 | def WebAssemblyExceptionSpec : DiagGroup<"wasm-exception-spec">; | ||
138 | |||
139 | def RTTI : DiagGroup<"rtti">; | ||
140 | + | ||
141 | +def OpenCLCoreFeaturesDiagGroup : DiagGroup<"pedantic-core-features">; | ||
142 | diff --git a/clang/include/clang/Basic/DiagnosticParseKinds.td b/clang/include/clang/Basic/DiagnosticParseKinds.td | ||
143 | index 0ed80a481e78..5887cc81e32a 100644 | ||
144 | --- a/clang/include/clang/Basic/DiagnosticParseKinds.td | ||
145 | +++ b/clang/include/clang/Basic/DiagnosticParseKinds.td | ||
146 | @@ -1228,14 +1228,13 @@ def warn_pragma_expected_colon : Warning< | ||
147 | "missing ':' after %0 - ignoring">, InGroup<IgnoredPragmas>; | ||
148 | def warn_pragma_expected_predicate : Warning< | ||
149 | "expected %select{'enable', 'disable', 'begin' or 'end'|'disable'}0 - ignoring">, InGroup<IgnoredPragmas>; | ||
150 | -def warn_pragma_begin_end_mismatch : Warning< | ||
151 | - "OpenCL extension end directive mismatches begin directive - ignoring">, InGroup<IgnoredPragmas>; | ||
152 | def warn_pragma_unknown_extension : Warning< | ||
153 | "unknown OpenCL extension %0 - ignoring">, InGroup<IgnoredPragmas>; | ||
154 | def warn_pragma_unsupported_extension : Warning< | ||
155 | "unsupported OpenCL extension %0 - ignoring">, InGroup<IgnoredPragmas>; | ||
156 | def warn_pragma_extension_is_core : Warning< | ||
157 | - "OpenCL extension %0 is core feature or supported optional core feature - ignoring">, InGroup<DiagGroup<"pedantic-core-features">>, DefaultIgnore; | ||
158 | + "OpenCL extension %0 is core feature or supported optional core feature - ignoring">, | ||
159 | + InGroup<OpenCLCoreFeaturesDiagGroup>, DefaultIgnore; | ||
160 | |||
161 | // OpenCL errors. | ||
162 | def err_opencl_taking_function_address_parser : Error< | ||
163 | diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td | ||
164 | index 67c59f3ca09a..7d45654f5ea2 100644 | ||
165 | --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td | ||
166 | +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td | ||
167 | @@ -118,7 +118,8 @@ def warn_float_underflow : Warning< | ||
168 | "magnitude of floating-point constant too small for type %0; minimum is %1">, | ||
169 | InGroup<LiteralRange>; | ||
170 | def warn_double_const_requires_fp64 : Warning< | ||
171 | - "double precision constant requires cl_khr_fp64, casting to single precision">; | ||
172 | + "double precision constant requires %select{cl_khr_fp64|cl_khr_fp64 and __opencl_c_fp64}0, " | ||
173 | + "casting to single precision">; | ||
174 | def err_half_const_requires_fp16 : Error< | ||
175 | "half precision constant requires cl_khr_fp16">; | ||
176 | |||
177 | @@ -4279,8 +4280,6 @@ def warn_diagnose_if_succeeded : Warning<"%0">, InGroup<UserDefinedWarnings>, | ||
178 | ShowInSystemHeader; | ||
179 | def note_ovl_candidate_disabled_by_function_cond_attr : Note< | ||
180 | "candidate disabled: %0">; | ||
181 | -def note_ovl_candidate_disabled_by_extension : Note< | ||
182 | - "candidate unavailable as it requires OpenCL extension '%0' to be enabled">; | ||
183 | def err_addrof_function_disabled_by_enable_if_attr : Error< | ||
184 | "cannot take address of function %0 because it has one or more " | ||
185 | "non-tautological enable_if conditions">; | ||
186 | @@ -9892,7 +9891,10 @@ def warn_opencl_attr_deprecated_ignored : Warning < | ||
187 | def err_opencl_variadic_function : Error< | ||
188 | "invalid prototype, variadic arguments are not allowed in OpenCL">; | ||
189 | def err_opencl_requires_extension : Error< | ||
190 | - "use of %select{type|declaration}0 %1 requires %2 extension to be enabled">; | ||
191 | + "use of %select{type|declaration}0 %1 requires %2 support">; | ||
192 | +def ext_opencl_double_without_pragma : Extension< | ||
193 | + "Clang permits use of type 'double' regardless pragma if 'cl_khr_fp64' is" | ||
194 | + " supported">; | ||
195 | def warn_opencl_generic_address_space_arg : Warning< | ||
196 | "passing non-generic address space pointer to %0" | ||
197 | " may cause dynamic conversion affecting performance">, | ||
198 | @@ -9912,7 +9914,8 @@ def err_opencl_builtin_pipe_invalid_access_modifier : Error< | ||
199 | def err_opencl_invalid_access_qualifier : Error< | ||
200 | "access qualifier can only be used for pipe and image type">; | ||
201 | def err_opencl_invalid_read_write : Error< | ||
202 | - "access qualifier %0 can not be used for %1 %select{|prior to OpenCL version 2.0}2">; | ||
203 | + "access qualifier %0 can not be used for %1 %select{|prior to OpenCL C version 2.0 or in version 3.0 " | ||
204 | + "and without __opencl_c_read_write_images feature}2">; | ||
205 | def err_opencl_multiple_access_qualifiers : Error< | ||
206 | "multiple access qualifiers">; | ||
207 | def note_opencl_typedef_access_qualifier : Note< | ||
208 | diff --git a/clang/include/clang/Basic/LangOptions.def b/clang/include/clang/Basic/LangOptions.def | ||
209 | index c01f0cca9c9c..d41ef34ad5df 100644 | ||
210 | --- a/clang/include/clang/Basic/LangOptions.def | ||
211 | +++ b/clang/include/clang/Basic/LangOptions.def | ||
212 | @@ -215,6 +215,8 @@ LANGOPT(OpenCL , 1, 0, "OpenCL") | ||
213 | LANGOPT(OpenCLVersion , 32, 0, "OpenCL C version") | ||
214 | LANGOPT(OpenCLCPlusPlus , 1, 0, "C++ for OpenCL") | ||
215 | LANGOPT(OpenCLCPlusPlusVersion , 32, 0, "C++ for OpenCL version") | ||
216 | +LANGOPT(OpenCLPipe , 1, 0, "OpenCL pipe keyword") | ||
217 | +LANGOPT(OpenCLGenericAddressSpace, 1, 0, "OpenCL generic keyword") | ||
218 | LANGOPT(NativeHalfType , 1, 0, "Native half type support") | ||
219 | LANGOPT(NativeHalfArgsAndReturns, 1, 0, "Native half args and returns") | ||
220 | LANGOPT(HalfArgsAndReturns, 1, 0, "half args and returns") | ||
221 | diff --git a/clang/include/clang/Basic/OpenCLExtensions.def b/clang/include/clang/Basic/OpenCLExtensions.def | ||
222 | index 801916c3ab94..c5352dadc0de 100644 | ||
223 | --- a/clang/include/clang/Basic/OpenCLExtensions.def | ||
224 | +++ b/clang/include/clang/Basic/OpenCLExtensions.def | ||
225 | @@ -16,8 +16,12 @@ | ||
226 | // If extensions are to be enumerated with information about whether | ||
227 | // an extension is core or optional core and minimum OpenCL version | ||
228 | // when an extension becomes available, | ||
229 | -// define OPENCL_GENERIC_EXTENSION(ext, avail, core, opt) where | ||
230 | +// define OPENCL_GENERIC_EXTENSION(ext, pragma, avail, core, opt) where | ||
231 | // ext - name of the extension or optional core feature. | ||
232 | +// pragma - true if extension needs pragmas or false otherwise. | ||
233 | +// NOTE: extension pragma without any documentation detailing | ||
234 | +// its behavior explicitly is deprecated. Therefore the default | ||
235 | +// value is false. | ||
236 | // avail - minimum OpenCL version supporting it. | ||
237 | // core - OpenCL versions mask when the extension becomes core feature. | ||
238 | // 0U indicates not a core feature. | ||
239 | @@ -50,55 +54,67 @@ | ||
240 | #endif // OPENCL_GENERIC_EXTENSION | ||
241 | |||
242 | // Declaration helpers | ||
243 | -#define OPENCL_EXTENSION(ext, avail) OPENCL_GENERIC_EXTENSION(ext, avail, 0U, 0U) | ||
244 | -#define OPENCL_COREFEATURE(ext, avail, core) OPENCL_GENERIC_EXTENSION(ext, avail, core, 0U) | ||
245 | -#define OPENCL_OPTIONALCOREFEATURE(ext, avail, opt) OPENCL_GENERIC_EXTENSION(ext, avail, 0U, opt) | ||
246 | +#define OPENCL_EXTENSION(ext, pragma, avail) OPENCL_GENERIC_EXTENSION(ext, pragma, avail, 0U, 0U) | ||
247 | +#define OPENCL_COREFEATURE(ext, pragma, avail, core) OPENCL_GENERIC_EXTENSION(ext, pragma, avail, core, 0U) | ||
248 | +#define OPENCL_OPTIONALCOREFEATURE(ext, pragma, avail, opt) OPENCL_GENERIC_EXTENSION(ext, pragma, avail, 0U, opt) | ||
249 | |||
250 | // OpenCL 1.0. | ||
251 | -OPENCL_COREFEATURE(cl_khr_byte_addressable_store, 100, OCL_C_11P) | ||
252 | -OPENCL_COREFEATURE(cl_khr_global_int32_base_atomics, 100, OCL_C_11P) | ||
253 | -OPENCL_COREFEATURE(cl_khr_global_int32_extended_atomics, 100, OCL_C_11P) | ||
254 | -OPENCL_COREFEATURE(cl_khr_local_int32_base_atomics, 100, OCL_C_11P) | ||
255 | -OPENCL_COREFEATURE(cl_khr_local_int32_extended_atomics, 100, OCL_C_11P) | ||
256 | -OPENCL_OPTIONALCOREFEATURE(cl_khr_fp64, 100, OCL_C_12P) | ||
257 | -OPENCL_EXTENSION(cl_khr_fp16, 100) | ||
258 | -OPENCL_EXTENSION(cl_khr_int64_base_atomics, 100) | ||
259 | -OPENCL_EXTENSION(cl_khr_int64_extended_atomics, 100) | ||
260 | -OPENCL_GENERIC_EXTENSION(cl_khr_3d_image_writes, 100, OCL_C_20, OCL_C_30) | ||
261 | +OPENCL_COREFEATURE(cl_khr_byte_addressable_store, true, 100, OCL_C_11P) | ||
262 | +OPENCL_COREFEATURE(cl_khr_global_int32_base_atomics, true, 100, OCL_C_11P) | ||
263 | +OPENCL_COREFEATURE(cl_khr_global_int32_extended_atomics, true, 100, OCL_C_11P) | ||
264 | +OPENCL_COREFEATURE(cl_khr_local_int32_base_atomics, true, 100, OCL_C_11P) | ||
265 | +OPENCL_COREFEATURE(cl_khr_local_int32_extended_atomics, true, 100, OCL_C_11P) | ||
266 | +OPENCL_OPTIONALCOREFEATURE(cl_khr_fp64, true, 100, OCL_C_12P) | ||
267 | +OPENCL_EXTENSION(cl_khr_fp16, true, 100) | ||
268 | +OPENCL_EXTENSION(cl_khr_int64_base_atomics, true, 100) | ||
269 | +OPENCL_EXTENSION(cl_khr_int64_extended_atomics, true, 100) | ||
270 | +OPENCL_COREFEATURE(cl_khr_3d_image_writes, true, 100, OCL_C_20) | ||
271 | |||
272 | // EMBEDDED_PROFILE | ||
273 | -OPENCL_EXTENSION(cles_khr_int64, 110) | ||
274 | +OPENCL_EXTENSION(cles_khr_int64, true, 110) | ||
275 | |||
276 | // OpenCL 1.2. | ||
277 | -OPENCL_EXTENSION(cl_khr_depth_images, 120) | ||
278 | -OPENCL_EXTENSION(cl_khr_gl_msaa_sharing, 120) | ||
279 | +OPENCL_EXTENSION(cl_khr_depth_images, true, 120) | ||
280 | +OPENCL_EXTENSION(cl_khr_gl_msaa_sharing,true, 120) | ||
281 | |||
282 | // OpenCL 2.0. | ||
283 | -OPENCL_EXTENSION(cl_khr_mipmap_image, 200) | ||
284 | -OPENCL_EXTENSION(cl_khr_mipmap_image_writes, 200) | ||
285 | -OPENCL_EXTENSION(cl_khr_srgb_image_writes, 200) | ||
286 | -OPENCL_EXTENSION(cl_khr_subgroups, 200) | ||
287 | +OPENCL_EXTENSION(cl_khr_mipmap_image, true, 200) | ||
288 | +OPENCL_EXTENSION(cl_khr_mipmap_image_writes, true, 200) | ||
289 | +OPENCL_EXTENSION(cl_khr_srgb_image_writes, true, 200) | ||
290 | +OPENCL_EXTENSION(cl_khr_subgroups, true, 200) | ||
291 | |||
292 | // Clang Extensions. | ||
293 | -OPENCL_EXTENSION(cl_clang_storage_class_specifiers, 100) | ||
294 | -OPENCL_EXTENSION(__cl_clang_function_pointers, 100) | ||
295 | -OPENCL_EXTENSION(__cl_clang_variadic_functions, 100) | ||
296 | +OPENCL_EXTENSION(cl_clang_storage_class_specifiers, true, 100) | ||
297 | +OPENCL_EXTENSION(__cl_clang_function_pointers, true, 100) | ||
298 | +OPENCL_EXTENSION(__cl_clang_variadic_functions, true, 100) | ||
299 | |||
300 | // AMD OpenCL extensions | ||
301 | -OPENCL_EXTENSION(cl_amd_media_ops, 100) | ||
302 | -OPENCL_EXTENSION(cl_amd_media_ops2, 100) | ||
303 | +OPENCL_EXTENSION(cl_amd_media_ops, true, 100) | ||
304 | +OPENCL_EXTENSION(cl_amd_media_ops2, true, 100) | ||
305 | |||
306 | // ARM OpenCL extensions | ||
307 | -OPENCL_EXTENSION(cl_arm_integer_dot_product_int8, 120) | ||
308 | -OPENCL_EXTENSION(cl_arm_integer_dot_product_accumulate_int8, 120) | ||
309 | -OPENCL_EXTENSION(cl_arm_integer_dot_product_accumulate_int16, 120) | ||
310 | -OPENCL_EXTENSION(cl_arm_integer_dot_product_accumulate_saturate_int8, 120) | ||
311 | +OPENCL_EXTENSION(cl_arm_integer_dot_product_int8, true, 120) | ||
312 | +OPENCL_EXTENSION(cl_arm_integer_dot_product_accumulate_int8, true, 120) | ||
313 | +OPENCL_EXTENSION(cl_arm_integer_dot_product_accumulate_int16, true, 120) | ||
314 | +OPENCL_EXTENSION(cl_arm_integer_dot_product_accumulate_saturate_int8, true, 120) | ||
315 | |||
316 | // Intel OpenCL extensions | ||
317 | -OPENCL_EXTENSION(cl_intel_subgroups, 120) | ||
318 | -OPENCL_EXTENSION(cl_intel_subgroups_short, 120) | ||
319 | -OPENCL_EXTENSION(cl_intel_device_side_avc_motion_estimation, 120) | ||
320 | +OPENCL_EXTENSION(cl_intel_subgroups, true, 120) | ||
321 | +OPENCL_EXTENSION(cl_intel_subgroups_short, true, 120) | ||
322 | +OPENCL_EXTENSION(cl_intel_device_side_avc_motion_estimation, true, 120) | ||
323 | |||
324 | +// OpenCL C 3.0 features (6.2.1. Features) | ||
325 | +OPENCL_OPTIONALCOREFEATURE(__opencl_c_pipes, false, 300, OCL_C_30) | ||
326 | +OPENCL_OPTIONALCOREFEATURE(__opencl_c_generic_address_space, false, 300, OCL_C_30) | ||
327 | +OPENCL_OPTIONALCOREFEATURE(__opencl_c_atomic_order_acq_rel, false, 300, OCL_C_30) | ||
328 | +OPENCL_OPTIONALCOREFEATURE(__opencl_c_atomic_order_seq_cst, false, 300, OCL_C_30) | ||
329 | +OPENCL_OPTIONALCOREFEATURE(__opencl_c_subgroups, false, 300, OCL_C_30) | ||
330 | +OPENCL_OPTIONALCOREFEATURE(__opencl_c_3d_image_writes, false, 300, OCL_C_30) | ||
331 | +OPENCL_OPTIONALCOREFEATURE(__opencl_c_device_enqueue, false, 300, OCL_C_30) | ||
332 | +OPENCL_OPTIONALCOREFEATURE(__opencl_c_read_write_images, false, 300, OCL_C_30) | ||
333 | +OPENCL_OPTIONALCOREFEATURE(__opencl_c_program_scope_global_variables, false, 300, OCL_C_30) | ||
334 | +OPENCL_OPTIONALCOREFEATURE(__opencl_c_fp64, false, 300, OCL_C_30) | ||
335 | +OPENCL_OPTIONALCOREFEATURE(__opencl_c_images, false, 300, OCL_C_30) | ||
336 | |||
337 | #undef OPENCL_OPTIONALCOREFEATURE | ||
338 | #undef OPENCL_COREFEATURE | ||
339 | diff --git a/clang/include/clang/Basic/OpenCLOptions.h b/clang/include/clang/Basic/OpenCLOptions.h | ||
340 | index fe27ef19d4d5..4779ad4d6507 100644 | ||
341 | --- a/clang/include/clang/Basic/OpenCLOptions.h | ||
342 | +++ b/clang/include/clang/Basic/OpenCLOptions.h | ||
343 | @@ -19,6 +19,9 @@ | ||
344 | |||
345 | namespace clang { | ||
346 | |||
347 | +class DiagnosticsEngine; | ||
348 | +class TargetInfo; | ||
349 | + | ||
350 | namespace { | ||
351 | // This enum maps OpenCL version(s) into value. These values are used as | ||
352 | // a mask to indicate in which OpenCL version(s) extension is a core or | ||
353 | @@ -64,15 +67,33 @@ static inline bool isOpenCLVersionIsContainedInMask(const LangOptions &LO, | ||
354 | /// OpenCL supported extensions and optional core features | ||
355 | class OpenCLOptions { | ||
356 | public: | ||
357 | + // OpenCL C v1.2 s6.5 - All program scope variables must be declared in the | ||
358 | + // __constant address space. | ||
359 | + // OpenCL C v2.0 s6.5.1 - Variables defined at program scope and static | ||
360 | + // variables inside a function can also be declared in the global | ||
361 | + // address space. | ||
362 | + // OpenCL C v3.0 s6.7.1 - Variables at program scope or static or extern | ||
363 | + // variables inside functions can be declared in global address space if | ||
364 | + // the __opencl_c_program_scope_global_variables feature is supported | ||
365 | + // C++ for OpenCL inherits rule from OpenCL C v2.0. | ||
366 | + bool areProgramScopeVariablesSupported(const LangOptions &Opts) const { | ||
367 | + return Opts.OpenCLCPlusPlus || Opts.OpenCLVersion == 200 || | ||
368 | + (Opts.OpenCLVersion == 300 && | ||
369 | + isSupported("__opencl_c_program_scope_global_variables", Opts)); | ||
370 | + } | ||
371 | + | ||
372 | struct OpenCLOptionInfo { | ||
373 | + // Does this option have pragma. | ||
374 | + bool WithPragma = false; | ||
375 | + | ||
376 | // Option starts to be available in this OpenCL version | ||
377 | - unsigned Avail; | ||
378 | + unsigned Avail = 100U; | ||
379 | |||
380 | // Option becomes core feature in this OpenCL versions | ||
381 | - unsigned Core; | ||
382 | + unsigned Core = 0U; | ||
383 | |||
384 | // Option becomes optional core feature in this OpenCL versions | ||
385 | - unsigned Opt; | ||
386 | + unsigned Opt = 0U; | ||
387 | |||
388 | // Is this option supported | ||
389 | bool Supported = false; | ||
390 | @@ -80,8 +101,10 @@ public: | ||
391 | // Is this option enabled | ||
392 | bool Enabled = false; | ||
393 | |||
394 | - OpenCLOptionInfo(unsigned A = 100, unsigned C = 0U, unsigned O = 0U) | ||
395 | - : Avail(A), Core(C), Opt(O) {} | ||
396 | + OpenCLOptionInfo() = default; | ||
397 | + OpenCLOptionInfo(bool Pragma, unsigned AvailV, unsigned CoreV, | ||
398 | + unsigned OptV) | ||
399 | + : WithPragma(Pragma), Avail(AvailV), Core(CoreV), Opt(OptV) {} | ||
400 | |||
401 | bool isCore() const { return Core != 0U; } | ||
402 | |||
403 | @@ -107,7 +130,12 @@ public: | ||
404 | |||
405 | bool isKnown(llvm::StringRef Ext) const; | ||
406 | |||
407 | - bool isEnabled(llvm::StringRef Ext) const; | ||
408 | + // For core or optional core feature check that it is supported | ||
409 | + // by a target, for any other option (extension) check that it is | ||
410 | + // enabled via pragma | ||
411 | + bool isAvailableOption(llvm::StringRef Ext, const LangOptions &LO) const; | ||
412 | + | ||
413 | + bool isWithPragma(llvm::StringRef Ext) const; | ||
414 | |||
415 | // Is supported as either an extension or an (optional) core feature for | ||
416 | // OpenCL version \p LO. | ||
417 | @@ -131,6 +159,11 @@ public: | ||
418 | // For supported core or optional core feature, return false. | ||
419 | bool isSupportedExtension(llvm::StringRef Ext, const LangOptions &LO) const; | ||
420 | |||
421 | + // FIXME: Whether extension should accept pragma should not | ||
422 | + // be reset dynamically. But it currently required when | ||
423 | + // registering new extensions via pragmas. | ||
424 | + void acceptsPragma(llvm::StringRef Ext, bool V = true); | ||
425 | + | ||
426 | void enable(llvm::StringRef Ext, bool V = true); | ||
427 | |||
428 | /// Enable or disable support for OpenCL extensions | ||
429 | @@ -148,15 +181,35 @@ public: | ||
430 | // Disable all extensions | ||
431 | void disableAll(); | ||
432 | |||
433 | - // Enable supported core and optional core features | ||
434 | - void enableSupportedCore(const LangOptions &LO); | ||
435 | - | ||
436 | friend class ASTWriter; | ||
437 | friend class ASTReader; | ||
438 | |||
439 | using OpenCLOptionInfoMap = llvm::StringMap<OpenCLOptionInfo>; | ||
440 | |||
441 | + template <typename... Args> | ||
442 | + static bool isOpenCLOptionCoreIn(const LangOptions &LO, Args &&... args) { | ||
443 | + return OpenCLOptionInfo(std::forward<Args>(args)...).isCoreIn(LO); | ||
444 | + } | ||
445 | + | ||
446 | + template <typename... Args> | ||
447 | + static bool isOpenCLOptionAvailableIn(const LangOptions &LO, | ||
448 | + Args &&... args) { | ||
449 | + return OpenCLOptionInfo(std::forward<Args>(args)...).isAvailableIn(LO); | ||
450 | + } | ||
451 | + | ||
452 | + // Diagnose feature dependencies for OpenCL C 3.0. Return false if target | ||
453 | + // doesn't follow these requirements. | ||
454 | + static bool diagnoseUnsupportedFeatureDependencies(const TargetInfo &TI, | ||
455 | + DiagnosticsEngine &Diags); | ||
456 | + | ||
457 | + // Diagnose that features and equivalent extension are set to same values. | ||
458 | + // Return false if target doesn't follow these requirements. | ||
459 | + static bool diagnoseFeatureExtensionDifferences(const TargetInfo &TI, | ||
460 | + DiagnosticsEngine &Diags); | ||
461 | + | ||
462 | private: | ||
463 | + // Option is enabled via pragma | ||
464 | + bool isEnabled(llvm::StringRef Ext) const; | ||
465 | OpenCLOptionInfoMap OptMap; | ||
466 | }; | ||
467 | |||
468 | diff --git a/clang/include/clang/Basic/TargetInfo.h b/clang/include/clang/Basic/TargetInfo.h | ||
469 | index b782172d93a3..ec51758a35d4 100644 | ||
470 | --- a/clang/include/clang/Basic/TargetInfo.h | ||
471 | +++ b/clang/include/clang/Basic/TargetInfo.h | ||
472 | @@ -1192,6 +1192,12 @@ public: | ||
473 | return false; | ||
474 | } | ||
475 | |||
476 | + /// Check if target has a given feature enabled | ||
477 | + virtual bool hasFeatureEnabled(const llvm::StringMap<bool> &Features, | ||
478 | + StringRef Name) const { | ||
479 | + return Features.lookup(Name); | ||
480 | + } | ||
481 | + | ||
482 | /// Enable or disable a specific target feature; | ||
483 | /// the feature name must be valid. | ||
484 | virtual void setFeatureEnabled(llvm::StringMap<bool> &Features, | ||
485 | @@ -1439,7 +1445,8 @@ public: | ||
486 | virtual void setSupportedOpenCLOpts() {} | ||
487 | |||
488 | virtual void supportAllOpenCLOpts(bool V = true) { | ||
489 | -#define OPENCLEXTNAME(Ext) getTargetOpts().OpenCLFeaturesMap[#Ext] = V; | ||
490 | +#define OPENCLEXTNAME(Ext) \ | ||
491 | + setFeatureEnabled(getTargetOpts().OpenCLFeaturesMap, #Ext, V); | ||
492 | #include "clang/Basic/OpenCLExtensions.def" | ||
493 | } | ||
494 | |||
495 | @@ -1459,10 +1466,6 @@ public: | ||
496 | } | ||
497 | } | ||
498 | |||
499 | - /// Define OpenCL macros based on target settings and language version | ||
500 | - void getOpenCLFeatureDefines(const LangOptions &Opts, | ||
501 | - MacroBuilder &Builder) const; | ||
502 | - | ||
503 | /// Get supported OpenCL extensions and optional core features. | ||
504 | llvm::StringMap<bool> &getSupportedOpenCLOpts() { | ||
505 | return getTargetOpts().OpenCLFeaturesMap; | ||
506 | @@ -1502,6 +1505,11 @@ public: | ||
507 | return true; | ||
508 | } | ||
509 | |||
510 | + /// Check that OpenCL target has valid options setting based on OpenCL | ||
511 | + /// version. | ||
512 | + virtual bool validateOpenCLTarget(const LangOptions &Opts, | ||
513 | + DiagnosticsEngine &Diags) const; | ||
514 | + | ||
515 | virtual void setAuxTarget(const TargetInfo *Aux) {} | ||
516 | |||
517 | /// Whether target allows debuginfo types for decl only variables. | ||
518 | diff --git a/clang/include/clang/Sema/Overload.h b/clang/include/clang/Sema/Overload.h | ||
519 | index 5be6a618711c..699c3e808872 100644 | ||
520 | --- a/clang/include/clang/Sema/Overload.h | ||
521 | +++ b/clang/include/clang/Sema/Overload.h | ||
522 | @@ -760,9 +760,6 @@ class Sema; | ||
523 | /// This candidate was not viable because its address could not be taken. | ||
524 | ovl_fail_addr_not_available, | ||
525 | |||
526 | - /// This candidate was not viable because its OpenCL extension is disabled. | ||
527 | - ovl_fail_ext_disabled, | ||
528 | - | ||
529 | /// This inherited constructor is not viable because it would slice the | ||
530 | /// argument. | ||
531 | ovl_fail_inhctor_slice, | ||
532 | diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h | ||
533 | index 2530a2776373..7e7348d6de2a 100644 | ||
534 | --- a/clang/include/clang/Sema/Sema.h | ||
535 | +++ b/clang/include/clang/Sema/Sema.h | ||
536 | @@ -10106,73 +10106,6 @@ public: | ||
537 | /// potentially-throwing. | ||
538 | bool checkFinalSuspendNoThrow(const Stmt *FinalSuspend); | ||
539 | |||
540 | - //===--------------------------------------------------------------------===// | ||
541 | - // OpenCL extensions. | ||
542 | - // | ||
543 | -private: | ||
544 | - std::string CurrOpenCLExtension; | ||
545 | - /// Extensions required by an OpenCL type. | ||
546 | - llvm::DenseMap<const Type*, std::set<std::string>> OpenCLTypeExtMap; | ||
547 | - /// Extensions required by an OpenCL declaration. | ||
548 | - llvm::DenseMap<const Decl*, std::set<std::string>> OpenCLDeclExtMap; | ||
549 | -public: | ||
550 | - llvm::StringRef getCurrentOpenCLExtension() const { | ||
551 | - return CurrOpenCLExtension; | ||
552 | - } | ||
553 | - | ||
554 | - /// Check if a function declaration \p FD associates with any | ||
555 | - /// extensions present in OpenCLDeclExtMap and if so return the | ||
556 | - /// extension(s) name(s). | ||
557 | - std::string getOpenCLExtensionsFromDeclExtMap(FunctionDecl *FD); | ||
558 | - | ||
559 | - /// Check if a function type \p FT associates with any | ||
560 | - /// extensions present in OpenCLTypeExtMap and if so return the | ||
561 | - /// extension(s) name(s). | ||
562 | - std::string getOpenCLExtensionsFromTypeExtMap(FunctionType *FT); | ||
563 | - | ||
564 | - /// Find an extension in an appropriate extension map and return its name | ||
565 | - template<typename T, typename MapT> | ||
566 | - std::string getOpenCLExtensionsFromExtMap(T* FT, MapT &Map); | ||
567 | - | ||
568 | - void setCurrentOpenCLExtension(llvm::StringRef Ext) { | ||
569 | - CurrOpenCLExtension = std::string(Ext); | ||
570 | - } | ||
571 | - | ||
572 | - /// Set OpenCL extensions for a type which can only be used when these | ||
573 | - /// OpenCL extensions are enabled. If \p Exts is empty, do nothing. | ||
574 | - /// \param Exts A space separated list of OpenCL extensions. | ||
575 | - void setOpenCLExtensionForType(QualType T, llvm::StringRef Exts); | ||
576 | - | ||
577 | - /// Set OpenCL extensions for a declaration which can only be | ||
578 | - /// used when these OpenCL extensions are enabled. If \p Exts is empty, do | ||
579 | - /// nothing. | ||
580 | - /// \param Exts A space separated list of OpenCL extensions. | ||
581 | - void setOpenCLExtensionForDecl(Decl *FD, llvm::StringRef Exts); | ||
582 | - | ||
583 | - /// Set current OpenCL extensions for a type which can only be used | ||
584 | - /// when these OpenCL extensions are enabled. If current OpenCL extension is | ||
585 | - /// empty, do nothing. | ||
586 | - void setCurrentOpenCLExtensionForType(QualType T); | ||
587 | - | ||
588 | - /// Set current OpenCL extensions for a declaration which | ||
589 | - /// can only be used when these OpenCL extensions are enabled. If current | ||
590 | - /// OpenCL extension is empty, do nothing. | ||
591 | - void setCurrentOpenCLExtensionForDecl(Decl *FD); | ||
592 | - | ||
593 | - bool isOpenCLDisabledDecl(Decl *FD); | ||
594 | - | ||
595 | - /// Check if type \p T corresponding to declaration specifier \p DS | ||
596 | - /// is disabled due to required OpenCL extensions being disabled. If so, | ||
597 | - /// emit diagnostics. | ||
598 | - /// \return true if type is disabled. | ||
599 | - bool checkOpenCLDisabledTypeDeclSpec(const DeclSpec &DS, QualType T); | ||
600 | - | ||
601 | - /// Check if declaration \p D used by expression \p E | ||
602 | - /// is disabled due to required OpenCL extensions being disabled. If so, | ||
603 | - /// emit diagnostics. | ||
604 | - /// \return true if type is disabled. | ||
605 | - bool checkOpenCLDisabledDecl(const NamedDecl &D, const Expr &E); | ||
606 | - | ||
607 | //===--------------------------------------------------------------------===// | ||
608 | // OpenMP directives and clauses. | ||
609 | // | ||
610 | @@ -10203,21 +10136,6 @@ private: | ||
611 | /// Pop OpenMP function region for non-capturing function. | ||
612 | void popOpenMPFunctionRegion(const sema::FunctionScopeInfo *OldFSI); | ||
613 | |||
614 | - /// Checks if a type or a declaration is disabled due to the owning extension | ||
615 | - /// being disabled, and emits diagnostic messages if it is disabled. | ||
616 | - /// \param D type or declaration to be checked. | ||
617 | - /// \param DiagLoc source location for the diagnostic message. | ||
618 | - /// \param DiagInfo information to be emitted for the diagnostic message. | ||
619 | - /// \param SrcRange source range of the declaration. | ||
620 | - /// \param Map maps type or declaration to the extensions. | ||
621 | - /// \param Selector selects diagnostic message: 0 for type and 1 for | ||
622 | - /// declaration. | ||
623 | - /// \return true if the type or declaration is disabled. | ||
624 | - template <typename T, typename DiagLocT, typename DiagInfoT, typename MapT> | ||
625 | - bool checkOpenCLDisabledTypeOrDecl(T D, DiagLocT DiagLoc, DiagInfoT DiagInfo, | ||
626 | - MapT &Map, unsigned Selector = 0, | ||
627 | - SourceRange SrcRange = SourceRange()); | ||
628 | - | ||
629 | /// Helper to keep information about the current `omp begin/end declare | ||
630 | /// variant` nesting. | ||
631 | struct OMPDeclareVariantScope { | ||
632 | diff --git a/clang/include/clang/Serialization/ASTWriter.h b/clang/include/clang/Serialization/ASTWriter.h | ||
633 | index 12073a38a77a..176badf7a0d1 100644 | ||
634 | --- a/clang/include/clang/Serialization/ASTWriter.h | ||
635 | +++ b/clang/include/clang/Serialization/ASTWriter.h | ||
636 | @@ -510,8 +510,6 @@ private: | ||
637 | void WriteDeclContextVisibleUpdate(const DeclContext *DC); | ||
638 | void WriteFPPragmaOptions(const FPOptionsOverride &Opts); | ||
639 | void WriteOpenCLExtensions(Sema &SemaRef); | ||
640 | - void WriteOpenCLExtensionTypes(Sema &SemaRef); | ||
641 | - void WriteOpenCLExtensionDecls(Sema &SemaRef); | ||
642 | void WriteCUDAPragmas(Sema &SemaRef); | ||
643 | void WriteObjCCategories(); | ||
644 | void WriteLateParsedTemplates(Sema &SemaRef); | ||
645 | diff --git a/clang/lib/Basic/OpenCLOptions.cpp b/clang/lib/Basic/OpenCLOptions.cpp | ||
646 | index 266acc5fe477..d7729ffb09ce 100644 | ||
647 | --- a/clang/lib/Basic/OpenCLOptions.cpp | ||
648 | +++ b/clang/lib/Basic/OpenCLOptions.cpp | ||
649 | @@ -7,6 +7,8 @@ | ||
650 | //===----------------------------------------------------------------------===// | ||
651 | |||
652 | #include "clang/Basic/OpenCLOptions.h" | ||
653 | +#include "clang/Basic/Diagnostic.h" | ||
654 | +#include "clang/Basic/TargetInfo.h" | ||
655 | |||
656 | namespace clang { | ||
657 | |||
658 | @@ -14,9 +16,26 @@ bool OpenCLOptions::isKnown(llvm::StringRef Ext) const { | ||
659 | return OptMap.find(Ext) != OptMap.end(); | ||
660 | } | ||
661 | |||
662 | +bool OpenCLOptions::isAvailableOption(llvm::StringRef Ext, | ||
663 | + const LangOptions &LO) const { | ||
664 | + if (!isKnown(Ext)) | ||
665 | + return false; | ||
666 | + | ||
667 | + auto &OptInfo = OptMap.find(Ext)->getValue(); | ||
668 | + if (OptInfo.isCoreIn(LO) || OptInfo.isOptionalCoreIn(LO)) | ||
669 | + return isSupported(Ext, LO); | ||
670 | + | ||
671 | + return isEnabled(Ext); | ||
672 | +} | ||
673 | + | ||
674 | bool OpenCLOptions::isEnabled(llvm::StringRef Ext) const { | ||
675 | + auto I = OptMap.find(Ext); | ||
676 | + return I != OptMap.end() && I->getValue().Enabled; | ||
677 | +} | ||
678 | + | ||
679 | +bool OpenCLOptions::isWithPragma(llvm::StringRef Ext) const { | ||
680 | auto E = OptMap.find(Ext); | ||
681 | - return E != OptMap.end() && E->second.Enabled; | ||
682 | + return E != OptMap.end() && E->second.WithPragma; | ||
683 | } | ||
684 | |||
685 | bool OpenCLOptions::isSupported(llvm::StringRef Ext, | ||
686 | @@ -31,22 +50,16 @@ bool OpenCLOptions::isSupported(llvm::StringRef Ext, | ||
687 | |||
688 | bool OpenCLOptions::isSupportedCore(llvm::StringRef Ext, | ||
689 | const LangOptions &LO) const { | ||
690 | - auto E = OptMap.find(Ext); | ||
691 | - if (E == OptMap.end()) { | ||
692 | - return false; | ||
693 | - } | ||
694 | - auto I = OptMap.find(Ext)->getValue(); | ||
695 | - return I.Supported && I.isCoreIn(LO); | ||
696 | + auto I = OptMap.find(Ext); | ||
697 | + return I != OptMap.end() && I->getValue().Supported && | ||
698 | + I->getValue().isCoreIn(LO); | ||
699 | } | ||
700 | |||
701 | bool OpenCLOptions::isSupportedOptionalCore(llvm::StringRef Ext, | ||
702 | const LangOptions &LO) const { | ||
703 | - auto E = OptMap.find(Ext); | ||
704 | - if (E == OptMap.end()) { | ||
705 | - return false; | ||
706 | - } | ||
707 | - auto I = OptMap.find(Ext)->getValue(); | ||
708 | - return I.Supported && I.isOptionalCoreIn(LO); | ||
709 | + auto I = OptMap.find(Ext); | ||
710 | + return I != OptMap.end() && I->getValue().Supported && | ||
711 | + I->getValue().isOptionalCoreIn(LO); | ||
712 | } | ||
713 | |||
714 | bool OpenCLOptions::isSupportedCoreOrOptionalCore(llvm::StringRef Ext, | ||
715 | @@ -56,12 +69,9 @@ bool OpenCLOptions::isSupportedCoreOrOptionalCore(llvm::StringRef Ext, | ||
716 | |||
717 | bool OpenCLOptions::isSupportedExtension(llvm::StringRef Ext, | ||
718 | const LangOptions &LO) const { | ||
719 | - auto E = OptMap.find(Ext); | ||
720 | - if (E == OptMap.end()) { | ||
721 | - return false; | ||
722 | - } | ||
723 | - auto I = OptMap.find(Ext)->getValue(); | ||
724 | - return I.Supported && I.isAvailableIn(LO) && | ||
725 | + auto I = OptMap.find(Ext); | ||
726 | + return I != OptMap.end() && I->getValue().Supported && | ||
727 | + I->getValue().isAvailableIn(LO) && | ||
728 | !isSupportedCoreOrOptionalCore(Ext, LO); | ||
729 | } | ||
730 | |||
731 | @@ -69,6 +79,10 @@ void OpenCLOptions::enable(llvm::StringRef Ext, bool V) { | ||
732 | OptMap[Ext].Enabled = V; | ||
733 | } | ||
734 | |||
735 | +void OpenCLOptions::acceptsPragma(llvm::StringRef Ext, bool V) { | ||
736 | + OptMap[Ext].WithPragma = V; | ||
737 | +} | ||
738 | + | ||
739 | void OpenCLOptions::support(llvm::StringRef Ext, bool V) { | ||
740 | assert(!Ext.empty() && "Extension is empty."); | ||
741 | assert(Ext[0] != '+' && Ext[0] != '-'); | ||
742 | @@ -76,11 +90,9 @@ void OpenCLOptions::support(llvm::StringRef Ext, bool V) { | ||
743 | } | ||
744 | |||
745 | OpenCLOptions::OpenCLOptions() { | ||
746 | -#define OPENCL_GENERIC_EXTENSION(Ext, AvailVer, CoreVer, OptVer) \ | ||
747 | - OptMap[#Ext].Avail = AvailVer; \ | ||
748 | - OptMap[#Ext].Core = CoreVer; \ | ||
749 | - OptMap[#Ext].Opt = OptVer; | ||
750 | -#include "clang/Basic/OpenCLExtensions.def" | ||
751 | +#define OPENCL_GENERIC_EXTENSION(Ext, ...) \ | ||
752 | + OptMap.insert_or_assign(#Ext, OpenCLOptionInfo{__VA_ARGS__}); | ||
753 | + #include "clang/Basic/OpenCLExtensions.def" | ||
754 | } | ||
755 | |||
756 | void OpenCLOptions::addSupport(const llvm::StringMap<bool> &FeaturesMap, | ||
757 | @@ -97,10 +109,45 @@ void OpenCLOptions::disableAll() { | ||
758 | Opt.getValue().Enabled = false; | ||
759 | } | ||
760 | |||
761 | -void OpenCLOptions::enableSupportedCore(const LangOptions &LO) { | ||
762 | - for (auto &Opt : OptMap) | ||
763 | - if (isSupportedCoreOrOptionalCore(Opt.getKey(), LO)) | ||
764 | - Opt.getValue().Enabled = true; | ||
765 | +bool OpenCLOptions::diagnoseUnsupportedFeatureDependencies( | ||
766 | + const TargetInfo &TI, DiagnosticsEngine &Diags) { | ||
767 | + // Feature pairs. First feature in a pair requires the second one to be | ||
768 | + // supported. | ||
769 | + static const llvm::StringMap<llvm::StringRef> DependentFeaturesMap = { | ||
770 | + {"__opencl_c_read_write_images", "__opencl_c_images"}, | ||
771 | + {"__opencl_c_3d_image_writes", "__opencl_c_images"}}; | ||
772 | + | ||
773 | + auto OpenCLFeaturesMap = TI.getSupportedOpenCLOpts(); | ||
774 | + | ||
775 | + bool IsValid = true; | ||
776 | + for (auto &FeaturePair : DependentFeaturesMap) | ||
777 | + if (TI.hasFeatureEnabled(OpenCLFeaturesMap, FeaturePair.getKey()) && | ||
778 | + !TI.hasFeatureEnabled(OpenCLFeaturesMap, FeaturePair.getValue())) { | ||
779 | + IsValid = false; | ||
780 | + Diags.Report(diag::err_opencl_feature_requires) | ||
781 | + << FeaturePair.getKey() << FeaturePair.getValue(); | ||
782 | + } | ||
783 | + return IsValid; | ||
784 | +} | ||
785 | + | ||
786 | +bool OpenCLOptions::diagnoseFeatureExtensionDifferences( | ||
787 | + const TargetInfo &TI, DiagnosticsEngine &Diags) { | ||
788 | + // Extensions and equivalent feature pairs. | ||
789 | + static const llvm::StringMap<llvm::StringRef> FeatureExtensionMap = { | ||
790 | + {"cl_khr_fp64", "__opencl_c_fp64"}, | ||
791 | + {"cl_khr_3d_image_writes", "__opencl_c_3d_image_writes"}}; | ||
792 | + | ||
793 | + auto OpenCLFeaturesMap = TI.getSupportedOpenCLOpts(); | ||
794 | + | ||
795 | + bool IsValid = true; | ||
796 | + for (auto &ExtAndFeat : FeatureExtensionMap) | ||
797 | + if (TI.hasFeatureEnabled(OpenCLFeaturesMap, ExtAndFeat.getKey()) != | ||
798 | + TI.hasFeatureEnabled(OpenCLFeaturesMap, ExtAndFeat.getValue())) { | ||
799 | + IsValid = false; | ||
800 | + Diags.Report(diag::err_opencl_extension_and_feature_differs) | ||
801 | + << ExtAndFeat.getKey() << ExtAndFeat.getValue(); | ||
802 | + } | ||
803 | + return IsValid; | ||
804 | } | ||
805 | |||
806 | } // end namespace clang | ||
807 | diff --git a/clang/lib/Basic/TargetInfo.cpp b/clang/lib/Basic/TargetInfo.cpp | ||
808 | index 642ee753d224..61cfd59ccf28 100644 | ||
809 | --- a/clang/lib/Basic/TargetInfo.cpp | ||
810 | +++ b/clang/lib/Basic/TargetInfo.cpp | ||
811 | @@ -366,6 +366,19 @@ void TargetInfo::adjust(LangOptions &Opts) { | ||
812 | HalfWidth = HalfAlign = 16; | ||
813 | FloatWidth = FloatAlign = 32; | ||
814 | |||
815 | + // OpenCL C v3.0 s6.7.5 - The generic address space requires support for | ||
816 | + // OpenCL C 2.0 or OpenCL C 3.0 with the __opencl_c_generic_address_space | ||
817 | + // feature | ||
818 | + // FIXME: OpenCLGenericAddressSpace is also defined in setLangDefaults() | ||
819 | + // for OpenCL C 2.0 but with no access to target capabilities. Target | ||
820 | + // should be immutable once created and thus this language option needs | ||
821 | + // to be defined only once. | ||
822 | + if (Opts.OpenCLVersion >= 300) { | ||
823 | + const auto &OpenCLFeaturesMap = getSupportedOpenCLOpts(); | ||
824 | + Opts.OpenCLGenericAddressSpace = hasFeatureEnabled( | ||
825 | + OpenCLFeaturesMap, "__opencl_c_generic_address_space"); | ||
826 | + } | ||
827 | + | ||
828 | // Embedded 32-bit targets (OpenCL EP) might have double C type | ||
829 | // defined as float. Let's not override this as it might lead | ||
830 | // to generating illegal code that uses 64bit doubles. | ||
831 | @@ -388,6 +401,19 @@ void TargetInfo::adjust(LangOptions &Opts) { | ||
832 | HalfFormat = &llvm::APFloat::IEEEhalf(); | ||
833 | FloatFormat = &llvm::APFloat::IEEEsingle(); | ||
834 | LongDoubleFormat = &llvm::APFloat::IEEEquad(); | ||
835 | + | ||
836 | + // OpenCL C v3.0 s6.7.5 - The generic address space requires support for | ||
837 | + // OpenCL C 2.0 or OpenCL C 3.0 with the __opencl_c_generic_address_space | ||
838 | + // feature | ||
839 | + // FIXME: OpenCLGenericAddressSpace is also defined in setLangDefaults() | ||
840 | + // for OpenCL C 2.0 but with no access to target capabilities. Target | ||
841 | + // should be immutable once created and thus this language option needs | ||
842 | + // to be defined only once. | ||
843 | + if (Opts.OpenCLVersion >= 300) { | ||
844 | + const auto &OpenCLFeaturesMap = getSupportedOpenCLOpts(); | ||
845 | + Opts.OpenCLGenericAddressSpace = hasFeatureEnabled( | ||
846 | + OpenCLFeaturesMap, "__opencl_c_generic_address_space"); | ||
847 | + } | ||
848 | } | ||
849 | |||
850 | if (Opts.DoubleSize) { | ||
851 | diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp | ||
852 | index 90a67d03b7b2..c171d2ed7c95 100644 | ||
853 | --- a/clang/lib/Basic/Targets.cpp | ||
854 | +++ b/clang/lib/Basic/Targets.cpp | ||
855 | @@ -715,29 +715,28 @@ TargetInfo::CreateTargetInfo(DiagnosticsEngine &Diags, | ||
856 | |||
857 | return Target.release(); | ||
858 | } | ||
859 | - | ||
860 | -/// getOpenCLFeatureDefines - Define OpenCL macros based on target settings | ||
861 | -/// and language version | ||
862 | -void TargetInfo::getOpenCLFeatureDefines(const LangOptions &Opts, | ||
863 | - MacroBuilder &Builder) const { | ||
864 | - | ||
865 | - auto defineOpenCLExtMacro = [&](llvm::StringRef Name, unsigned AvailVer, | ||
866 | - unsigned CoreVersions, | ||
867 | - unsigned OptionalVersions) { | ||
868 | - // Check if extension is supported by target and is available in this | ||
869 | - // OpenCL version | ||
870 | - auto It = getTargetOpts().OpenCLFeaturesMap.find(Name); | ||
871 | - if ((It != getTargetOpts().OpenCLFeaturesMap.end()) && It->getValue() && | ||
872 | - OpenCLOptions::OpenCLOptionInfo(AvailVer, CoreVersions, | ||
873 | - OptionalVersions) | ||
874 | - .isAvailableIn(Opts)) | ||
875 | - Builder.defineMacro(Name); | ||
876 | +/// validateOpenCLTarget - Check that OpenCL target has valid | ||
877 | +/// options setting based on OpenCL version. | ||
878 | +bool TargetInfo::validateOpenCLTarget(const LangOptions &Opts, | ||
879 | + DiagnosticsEngine &Diags) const { | ||
880 | + const llvm::StringMap<bool> &OpenCLFeaturesMap = getSupportedOpenCLOpts(); | ||
881 | + | ||
882 | + auto diagnoseNotSupportedCore = [&](llvm::StringRef Name, auto... OptArgs) { | ||
883 | + if (OpenCLOptions::isOpenCLOptionCoreIn(Opts, OptArgs...) && | ||
884 | + !hasFeatureEnabled(OpenCLFeaturesMap, Name)) | ||
885 | + Diags.Report(diag::warn_opencl_unsupported_core_feature) | ||
886 | + << Name << Opts.OpenCLCPlusPlus | ||
887 | + << Opts.getOpenCLVersionTuple().getAsString(); | ||
888 | }; | ||
889 | -#define OPENCL_GENERIC_EXTENSION(Ext, Avail, Core, Opt) \ | ||
890 | - defineOpenCLExtMacro(#Ext, Avail, Core, Opt); | ||
891 | +#define OPENCL_GENERIC_EXTENSION(Ext, ...) \ | ||
892 | + diagnoseNotSupportedCore(#Ext, __VA_ARGS__); | ||
893 | #include "clang/Basic/OpenCLExtensions.def" | ||
894 | |||
895 | - // FIXME: OpenCL options which affect language semantics/syntax | ||
896 | - // should be moved into LangOptions, thus macro definitions of | ||
897 | - // such options is better to be done in clang::InitializePreprocessor | ||
898 | + // Validate that feature macros are set properly for OpenCL C 3.0. | ||
899 | + // In other cases assume that target is always valid. | ||
900 | + if (Opts.OpenCLCPlusPlus || Opts.OpenCLVersion < 300) | ||
901 | + return true; | ||
902 | + | ||
903 | + return OpenCLOptions::diagnoseUnsupportedFeatureDependencies(*this, Diags) && | ||
904 | + OpenCLOptions::diagnoseFeatureExtensionDifferences(*this, Diags); | ||
905 | } | ||
906 | diff --git a/clang/lib/Basic/Targets/AMDGPU.h b/clang/lib/Basic/Targets/AMDGPU.h | ||
907 | index 8ee0ca30d305..b11fe212c3a2 100644 | ||
908 | --- a/clang/lib/Basic/Targets/AMDGPU.h | ||
909 | +++ b/clang/lib/Basic/Targets/AMDGPU.h | ||
910 | @@ -291,6 +291,7 @@ public: | ||
911 | bool IsAMDGCN = isAMDGCN(getTriple()); | ||
912 | |||
913 | Opts["cl_khr_fp64"] = hasFP64(); | ||
914 | + Opts["__opencl_c_fp64"] = hasFP64(); | ||
915 | |||
916 | if (IsAMDGCN || GPUKind >= llvm::AMDGPU::GK_CEDAR) { | ||
917 | Opts["cl_khr_byte_addressable_store"] = true; | ||
918 | @@ -307,9 +308,12 @@ public: | ||
919 | Opts["cl_khr_mipmap_image"] = true; | ||
920 | Opts["cl_khr_mipmap_image_writes"] = true; | ||
921 | Opts["cl_khr_subgroups"] = true; | ||
922 | - Opts["cl_khr_3d_image_writes"] = true; | ||
923 | Opts["cl_amd_media_ops"] = true; | ||
924 | Opts["cl_amd_media_ops2"] = true; | ||
925 | + | ||
926 | + Opts["__opencl_c_images"] = true; | ||
927 | + Opts["__opencl_c_3d_image_writes"] = true; | ||
928 | + Opts["cl_khr_3d_image_writes"] = true; | ||
929 | } | ||
930 | } | ||
931 | |||
932 | diff --git a/clang/lib/Basic/Targets/NVPTX.h b/clang/lib/Basic/Targets/NVPTX.h | ||
933 | index 038dec4a28bd..010e640804bf 100644 | ||
934 | --- a/clang/lib/Basic/Targets/NVPTX.h | ||
935 | +++ b/clang/lib/Basic/Targets/NVPTX.h | ||
936 | @@ -132,6 +132,7 @@ public: | ||
937 | Opts["__cl_clang_variadic_functions"] = true; | ||
938 | |||
939 | Opts["cl_khr_fp64"] = true; | ||
940 | + Opts["__opencl_c_fp64"] = true; | ||
941 | Opts["cl_khr_byte_addressable_store"] = true; | ||
942 | Opts["cl_khr_global_int32_base_atomics"] = true; | ||
943 | Opts["cl_khr_global_int32_extended_atomics"] = true; | ||
944 | diff --git a/clang/lib/Basic/Targets/X86.cpp b/clang/lib/Basic/Targets/X86.cpp | ||
945 | index c5ad1c7d2c2e..701b03c868d1 100644 | ||
946 | --- a/clang/lib/Basic/Targets/X86.cpp | ||
947 | +++ b/clang/lib/Basic/Targets/X86.cpp | ||
948 | @@ -1397,13 +1397,13 @@ bool X86TargetInfo::validateOperandSize(const llvm::StringMap<bool> &FeatureMap, | ||
949 | return Size <= 64; | ||
950 | case 'z': | ||
951 | // XMM0/YMM/ZMM0 | ||
952 | - if (FeatureMap.lookup("avx512f")) | ||
953 | + if (hasFeatureEnabled(FeatureMap, "avx512f")) | ||
954 | // ZMM0 can be used if target supports AVX512F. | ||
955 | return Size <= 512U; | ||
956 | - else if (FeatureMap.lookup("avx")) | ||
957 | + else if (hasFeatureEnabled(FeatureMap, "avx")) | ||
958 | // YMM0 can be used if target supports AVX. | ||
959 | return Size <= 256U; | ||
960 | - else if (FeatureMap.lookup("sse")) | ||
961 | + else if (hasFeatureEnabled(FeatureMap, "sse")) | ||
962 | return Size <= 128U; | ||
963 | return false; | ||
964 | case 'i': | ||
965 | @@ -1417,10 +1417,10 @@ bool X86TargetInfo::validateOperandSize(const llvm::StringMap<bool> &FeatureMap, | ||
966 | break; | ||
967 | case 'v': | ||
968 | case 'x': | ||
969 | - if (FeatureMap.lookup("avx512f")) | ||
970 | + if (hasFeatureEnabled(FeatureMap, "avx512f")) | ||
971 | // 512-bit zmm registers can be used if target supports AVX512F. | ||
972 | return Size <= 512U; | ||
973 | - else if (FeatureMap.lookup("avx")) | ||
974 | + else if (hasFeatureEnabled(FeatureMap, "avx")) | ||
975 | // 256-bit ymm registers can be used if target supports AVX. | ||
976 | return Size <= 256U; | ||
977 | return Size <= 128U; | ||
978 | diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp | ||
979 | index 956877d34680..3e5c07538662 100644 | ||
980 | --- a/clang/lib/Frontend/CompilerInstance.cpp | ||
981 | +++ b/clang/lib/Frontend/CompilerInstance.cpp | ||
982 | @@ -910,6 +910,11 @@ bool CompilerInstance::ExecuteAction(FrontendAction &Act) { | ||
983 | } | ||
984 | // FIXME: can we disable FEnvAccess? | ||
985 | } | ||
986 | + // We should do it here because target knows nothing about | ||
987 | + // language options when it's being created. | ||
988 | + if (getLangOpts().OpenCL && | ||
989 | + !getTarget().validateOpenCLTarget(getLangOpts(), getDiagnostics())) | ||
990 | + return false; | ||
991 | |||
992 | // Inform the target of the language options. | ||
993 | // | ||
994 | diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp | ||
995 | index 5c5cf46150e2..e1580b60dd89 100644 | ||
996 | --- a/clang/lib/Frontend/CompilerInvocation.cpp | ||
997 | +++ b/clang/lib/Frontend/CompilerInvocation.cpp | ||
998 | @@ -2041,6 +2041,9 @@ void CompilerInvocation::setLangDefaults(LangOptions &Opts, InputKind IK, | ||
999 | Opts.ZVector = 0; | ||
1000 | Opts.setDefaultFPContractMode(LangOptions::FPM_On); | ||
1001 | Opts.OpenCLCPlusPlus = Opts.CPlusPlus; | ||
1002 | + Opts.OpenCLPipe = Opts.OpenCLCPlusPlus || Opts.OpenCLVersion == 200; | ||
1003 | + Opts.OpenCLGenericAddressSpace = | ||
1004 | + Opts.OpenCLCPlusPlus || Opts.OpenCLVersion == 200; | ||
1005 | |||
1006 | // Include default header file for OpenCL. | ||
1007 | if (Opts.IncludeDefaultHeader) { | ||
1008 | diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp | ||
1009 | index c60972c96e5d..faa02c608540 100644 | ||
1010 | --- a/clang/lib/Frontend/InitPreprocessor.cpp | ||
1011 | +++ b/clang/lib/Frontend/InitPreprocessor.cpp | ||
1012 | @@ -598,6 +598,29 @@ static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts, | ||
1013 | Builder.defineMacro("__cpp_coroutines", "201703L"); | ||
1014 | } | ||
1015 | |||
1016 | +/// InitializeOpenCLFeatureTestMacros - Define OpenCL macros based on target | ||
1017 | +/// settings and language version | ||
1018 | +void InitializeOpenCLFeatureTestMacros(const TargetInfo &TI, | ||
1019 | + const LangOptions &Opts, | ||
1020 | + MacroBuilder &Builder) { | ||
1021 | + const llvm::StringMap<bool> &OpenCLFeaturesMap = TI.getSupportedOpenCLOpts(); | ||
1022 | + // FIXME: OpenCL options which affect language semantics/syntax | ||
1023 | + // should be moved into LangOptions. | ||
1024 | + auto defineOpenCLExtMacro = [&](llvm::StringRef Name, auto... OptArgs) { | ||
1025 | + // Check if extension is supported by target and is available in this | ||
1026 | + // OpenCL version | ||
1027 | + if (TI.hasFeatureEnabled(OpenCLFeaturesMap, Name) && | ||
1028 | + OpenCLOptions::isOpenCLOptionAvailableIn(Opts, OptArgs...)) | ||
1029 | + Builder.defineMacro(Name); | ||
1030 | + }; | ||
1031 | +#define OPENCL_GENERIC_EXTENSION(Ext, ...) \ | ||
1032 | + defineOpenCLExtMacro(#Ext, __VA_ARGS__); | ||
1033 | +#include "clang/Basic/OpenCLExtensions.def" | ||
1034 | + | ||
1035 | + // Assume compiling for FULL profile | ||
1036 | + Builder.defineMacro("__opencl_c_int64"); | ||
1037 | +} | ||
1038 | + | ||
1039 | static void InitializePredefinedMacros(const TargetInfo &TI, | ||
1040 | const LangOptions &LangOpts, | ||
1041 | const FrontendOptions &FEOpts, | ||
1042 | @@ -1120,7 +1143,7 @@ static void InitializePredefinedMacros(const TargetInfo &TI, | ||
1043 | |||
1044 | // OpenCL definitions. | ||
1045 | if (LangOpts.OpenCL) { | ||
1046 | - TI.getOpenCLFeatureDefines(LangOpts, Builder); | ||
1047 | + InitializeOpenCLFeatureTestMacros(TI, LangOpts, Builder); | ||
1048 | } | ||
1049 | |||
1050 | if (TI.hasInt128Type() && LangOpts.CPlusPlus && LangOpts.GNUMode) { | ||
1051 | diff --git a/clang/lib/Headers/opencl-c-base.h b/clang/lib/Headers/opencl-c-base.h | ||
1052 | index b55d9601a452..e8f293a0301b 100644 | ||
1053 | --- a/clang/lib/Headers/opencl-c-base.h | ||
1054 | +++ b/clang/lib/Headers/opencl-c-base.h | ||
1055 | @@ -46,6 +46,21 @@ | ||
1056 | #endif // defined(__SPIR__) | ||
1057 | #endif // (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) | ||
1058 | |||
1059 | +// Define feature macros for OpenCL C 2.0 | ||
1060 | +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ == 200) | ||
1061 | +#define __opencl_c_pipes 1 | ||
1062 | +#define __opencl_c_generic_address_space 1 | ||
1063 | +#define __opencl_c_work_group_collective_functions 1 | ||
1064 | +#define __opencl_c_atomic_order_acq_rel 1 | ||
1065 | +#define __opencl_c_atomic_order_seq_cst 1 | ||
1066 | +#define __opencl_c_atomic_scope_device 1 | ||
1067 | +#define __opencl_c_atomic_scope_all_devices 1 | ||
1068 | +#define __opencl_c_device_enqueue 1 | ||
1069 | +#define __opencl_c_read_write_images 1 | ||
1070 | +#define __opencl_c_program_scope_global_variables 1 | ||
1071 | +#define __opencl_c_images 1 | ||
1072 | +#endif | ||
1073 | + | ||
1074 | // built-in scalar data types: | ||
1075 | |||
1076 | /** | ||
1077 | diff --git a/clang/lib/Headers/opencl-c.h b/clang/lib/Headers/opencl-c.h | ||
1078 | index 80d318b16f57..62ff0aab1d40 100644 | ||
1079 | --- a/clang/lib/Headers/opencl-c.h | ||
1080 | +++ b/clang/lib/Headers/opencl-c.h | ||
1081 | @@ -11,11 +11,11 @@ | ||
1082 | |||
1083 | #include "opencl-c-base.h" | ||
1084 | |||
1085 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1086 | +#if defined(__opencl_c_images) | ||
1087 | #ifndef cl_khr_depth_images | ||
1088 | #define cl_khr_depth_images | ||
1089 | #endif //cl_khr_depth_images | ||
1090 | -#endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1091 | +#endif //defined(__opencl_c_images) | ||
1092 | |||
1093 | #if __OPENCL_C_VERSION__ < CL_VERSION_2_0 | ||
1094 | #ifdef cl_khr_3d_image_writes | ||
1095 | @@ -7354,7 +7354,7 @@ half16 __ovld __cnfn fmod(half16 x, half16 y); | ||
1096 | * Returns fmin(x - floor (x), 0x1.fffffep-1f ). | ||
1097 | * floor(x) is returned in iptr. | ||
1098 | */ | ||
1099 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1100 | +#if defined(__opencl_c_generic_address_space) | ||
1101 | float __ovld fract(float x, float *iptr); | ||
1102 | float2 __ovld fract(float2 x, float2 *iptr); | ||
1103 | float3 __ovld fract(float3 x, float3 *iptr); | ||
1104 | @@ -7444,7 +7444,7 @@ half16 __ovld fract(half16 x, __private half16 *iptr); | ||
1105 | * magnitude in the interval [1/2, 1) or 0. Each | ||
1106 | * component of x equals mantissa returned * 2^exp. | ||
1107 | */ | ||
1108 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1109 | +#if defined(__opencl_c_generic_address_space) | ||
1110 | float __ovld frexp(float x, int *exp); | ||
1111 | float2 __ovld frexp(float2 x, int2 *exp); | ||
1112 | float3 __ovld frexp(float3 x, int3 *exp); | ||
1113 | @@ -7651,7 +7651,7 @@ half8 __ovld __cnfn lgamma(half8 x); | ||
1114 | half16 __ovld __cnfn lgamma(half16 x); | ||
1115 | #endif //cl_khr_fp16 | ||
1116 | |||
1117 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1118 | +#if defined(__opencl_c_generic_address_space) | ||
1119 | float __ovld lgamma_r(float x, int *signp); | ||
1120 | float2 __ovld lgamma_r(float2 x, int2 *signp); | ||
1121 | float3 __ovld lgamma_r(float3 x, int3 *signp); | ||
1122 | @@ -7957,7 +7957,7 @@ half16 __ovld __cnfn minmag(half16 x, half16 y); | ||
1123 | * the argument. It stores the integral part in the object | ||
1124 | * pointed to by iptr. | ||
1125 | */ | ||
1126 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1127 | +#if defined(__opencl_c_generic_address_space) | ||
1128 | float __ovld modf(float x, float *iptr); | ||
1129 | float2 __ovld modf(float2 x, float2 *iptr); | ||
1130 | float3 __ovld modf(float3 x, float3 *iptr); | ||
1131 | @@ -8217,7 +8217,7 @@ half16 __ovld __cnfn remainder(half16 x, half16 y); | ||
1132 | * sign as x/y. It stores this signed value in the object | ||
1133 | * pointed to by quo. | ||
1134 | */ | ||
1135 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1136 | +#if defined(__opencl_c_generic_address_space) | ||
1137 | float __ovld remquo(float x, float y, int *quo); | ||
1138 | float2 __ovld remquo(float2 x, float2 y, int2 *quo); | ||
1139 | float3 __ovld remquo(float3 x, float3 y, int3 *quo); | ||
1140 | @@ -8441,7 +8441,7 @@ half16 __ovld __cnfn sin(half16); | ||
1141 | * is the return value and computed cosine is returned | ||
1142 | * in cosval. | ||
1143 | */ | ||
1144 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1145 | +#if defined(__opencl_c_generic_address_space) | ||
1146 | float __ovld sincos(float x, float *cosval); | ||
1147 | float2 __ovld sincos(float2 x, float2 *cosval); | ||
1148 | float3 __ovld sincos(float3 x, float3 *cosval); | ||
1149 | @@ -11342,7 +11342,7 @@ half8 __ovld vload8(size_t offset, const __constant half *p); | ||
1150 | half16 __ovld vload16(size_t offset, const __constant half *p); | ||
1151 | #endif //cl_khr_fp16 | ||
1152 | |||
1153 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1154 | +#if defined(__opencl_c_generic_address_space) | ||
1155 | char2 __ovld vload2(size_t offset, const char *p); | ||
1156 | uchar2 __ovld vload2(size_t offset, const uchar *p); | ||
1157 | short2 __ovld vload2(size_t offset, const short *p); | ||
1158 | @@ -11582,7 +11582,7 @@ half16 __ovld vload16(size_t offset, const __private half *p); | ||
1159 | #endif //cl_khr_fp16 | ||
1160 | #endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1161 | |||
1162 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1163 | +#if defined(__opencl_c_generic_address_space) | ||
1164 | void __ovld vstore2(char2 data, size_t offset, char *p); | ||
1165 | void __ovld vstore2(uchar2 data, size_t offset, uchar *p); | ||
1166 | void __ovld vstore2(short2 data, size_t offset, short *p); | ||
1167 | @@ -11827,7 +11827,7 @@ void __ovld vstore16(half16 data, size_t offset, __private half *p); | ||
1168 | * must be 16-bit aligned. | ||
1169 | */ | ||
1170 | float __ovld vload_half(size_t offset, const __constant half *p); | ||
1171 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1172 | +#if defined(__opencl_c_generic_address_space) | ||
1173 | float __ovld vload_half(size_t offset, const half *p); | ||
1174 | #else | ||
1175 | float __ovld vload_half(size_t offset, const __global half *p); | ||
1176 | @@ -11848,7 +11848,7 @@ float3 __ovld vload_half3(size_t offset, const __constant half *p); | ||
1177 | float4 __ovld vload_half4(size_t offset, const __constant half *p); | ||
1178 | float8 __ovld vload_half8(size_t offset, const __constant half *p); | ||
1179 | float16 __ovld vload_half16(size_t offset, const __constant half *p); | ||
1180 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1181 | +#if defined(__opencl_c_generic_address_space) | ||
1182 | float2 __ovld vload_half2(size_t offset, const half *p); | ||
1183 | float3 __ovld vload_half3(size_t offset, const half *p); | ||
1184 | float4 __ovld vload_half4(size_t offset, const half *p); | ||
1185 | @@ -11883,7 +11883,7 @@ float16 __ovld vload_half16(size_t offset, const __private half *p); | ||
1186 | * The default current rounding mode is round to | ||
1187 | * nearest even. | ||
1188 | */ | ||
1189 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1190 | +#if defined(__opencl_c_generic_address_space) | ||
1191 | void __ovld vstore_half(float data, size_t offset, half *p); | ||
1192 | void __ovld vstore_half_rte(float data, size_t offset, half *p); | ||
1193 | void __ovld vstore_half_rtz(float data, size_t offset, half *p); | ||
1194 | @@ -11942,7 +11942,7 @@ void __ovld vstore_half_rtn(double data, size_t offset, __private half *p); | ||
1195 | * The default current rounding mode is round to | ||
1196 | * nearest even. | ||
1197 | */ | ||
1198 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1199 | +#if defined(__opencl_c_generic_address_space) | ||
1200 | void __ovld vstore_half2(float2 data, size_t offset, half *p); | ||
1201 | void __ovld vstore_half3(float3 data, size_t offset, half *p); | ||
1202 | void __ovld vstore_half4(float4 data, size_t offset, half *p); | ||
1203 | @@ -12169,7 +12169,7 @@ float3 __ovld vloada_half3(size_t offset, const __constant half *p); | ||
1204 | float4 __ovld vloada_half4(size_t offset, const __constant half *p); | ||
1205 | float8 __ovld vloada_half8(size_t offset, const __constant half *p); | ||
1206 | float16 __ovld vloada_half16(size_t offset, const __constant half *p); | ||
1207 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1208 | +#if defined(__opencl_c_generic_address_space) | ||
1209 | float __ovld vloada_half(size_t offset, const half *p); | ||
1210 | float2 __ovld vloada_half2(size_t offset, const half *p); | ||
1211 | float3 __ovld vloada_half3(size_t offset, const half *p); | ||
1212 | @@ -12213,7 +12213,7 @@ float16 __ovld vloada_half16(size_t offset, const __private half *p); | ||
1213 | * mode. The default current rounding mode is | ||
1214 | * round to nearest even. | ||
1215 | */ | ||
1216 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1217 | +#if defined(__opencl_c_generic_address_space) | ||
1218 | void __ovld vstorea_half(float data, size_t offset, half *p); | ||
1219 | void __ovld vstorea_half2(float2 data, size_t offset, half *p); | ||
1220 | void __ovld vstorea_half3(float3 data, size_t offset, half *p); | ||
1221 | @@ -12582,7 +12582,7 @@ void __ovld write_mem_fence(cl_mem_fence_flags flags); | ||
1222 | |||
1223 | // OpenCL v2.0 s6.13.9 - Address Space Qualifier Functions | ||
1224 | |||
1225 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1226 | +#if defined(__opencl_c_generic_address_space) | ||
1227 | cl_mem_fence_flags __ovld get_fence(const void *ptr); | ||
1228 | cl_mem_fence_flags __ovld get_fence(void *ptr); | ||
1229 | |||
1230 | @@ -13397,138 +13397,113 @@ void __ovld atomic_init(volatile atomic_double *object, double value); | ||
1231 | void __ovld atomic_work_item_fence(cl_mem_fence_flags flags, memory_order order, memory_scope scope); | ||
1232 | |||
1233 | // atomic_fetch() | ||
1234 | +// OpenCL v2.0 s6.13.11.7.5: | ||
1235 | +// add/sub: atomic type argument can be uintptr_t/intptr_t, value type argument can be ptrdiff_t. | ||
1236 | |||
1237 | +#if defined(__opencl_c_atomic_order_seq_cst) && defined(__opencl_c_atomic_scope_device) | ||
1238 | int __ovld atomic_fetch_add(volatile atomic_int *object, int operand); | ||
1239 | -int __ovld atomic_fetch_add_explicit(volatile atomic_int *object, int operand, memory_order order); | ||
1240 | -int __ovld atomic_fetch_add_explicit(volatile atomic_int *object, int operand, memory_order order, memory_scope scope); | ||
1241 | uint __ovld atomic_fetch_add(volatile atomic_uint *object, uint operand); | ||
1242 | -uint __ovld atomic_fetch_add_explicit(volatile atomic_uint *object, uint operand, memory_order order); | ||
1243 | -uint __ovld atomic_fetch_add_explicit(volatile atomic_uint *object, uint operand, memory_order order, memory_scope scope); | ||
1244 | int __ovld atomic_fetch_sub(volatile atomic_int *object, int operand); | ||
1245 | -int __ovld atomic_fetch_sub_explicit(volatile atomic_int *object, int operand, memory_order order); | ||
1246 | -int __ovld atomic_fetch_sub_explicit(volatile atomic_int *object, int operand, memory_order order, memory_scope scope); | ||
1247 | uint __ovld atomic_fetch_sub(volatile atomic_uint *object, uint operand); | ||
1248 | -uint __ovld atomic_fetch_sub_explicit(volatile atomic_uint *object, uint operand, memory_order order); | ||
1249 | -uint __ovld atomic_fetch_sub_explicit(volatile atomic_uint *object, uint operand, memory_order order, memory_scope scope); | ||
1250 | int __ovld atomic_fetch_or(volatile atomic_int *object, int operand); | ||
1251 | -int __ovld atomic_fetch_or_explicit(volatile atomic_int *object, int operand, memory_order order); | ||
1252 | -int __ovld atomic_fetch_or_explicit(volatile atomic_int *object, int operand, memory_order order, memory_scope scope); | ||
1253 | uint __ovld atomic_fetch_or(volatile atomic_uint *object, uint operand); | ||
1254 | -uint __ovld atomic_fetch_or_explicit(volatile atomic_uint *object, uint operand, memory_order order); | ||
1255 | -uint __ovld atomic_fetch_or_explicit(volatile atomic_uint *object, uint operand, memory_order order, memory_scope scope); | ||
1256 | int __ovld atomic_fetch_xor(volatile atomic_int *object, int operand); | ||
1257 | -int __ovld atomic_fetch_xor_explicit(volatile atomic_int *object, int operand, memory_order order); | ||
1258 | -int __ovld atomic_fetch_xor_explicit(volatile atomic_int *object, int operand, memory_order order, memory_scope scope); | ||
1259 | uint __ovld atomic_fetch_xor(volatile atomic_uint *object, uint operand); | ||
1260 | -uint __ovld atomic_fetch_xor_explicit(volatile atomic_uint *object, uint operand, memory_order order); | ||
1261 | -uint __ovld atomic_fetch_xor_explicit(volatile atomic_uint *object, uint operand, memory_order order, memory_scope scope); | ||
1262 | int __ovld atomic_fetch_and(volatile atomic_int *object, int operand); | ||
1263 | -int __ovld atomic_fetch_and_explicit(volatile atomic_int *object, int operand, memory_order order); | ||
1264 | -int __ovld atomic_fetch_and_explicit(volatile atomic_int *object, int operand, memory_order order, memory_scope scope); | ||
1265 | uint __ovld atomic_fetch_and(volatile atomic_uint *object, uint operand); | ||
1266 | -uint __ovld atomic_fetch_and_explicit(volatile atomic_uint *object, uint operand, memory_order order); | ||
1267 | -uint __ovld atomic_fetch_and_explicit(volatile atomic_uint *object, uint operand, memory_order order, memory_scope scope); | ||
1268 | int __ovld atomic_fetch_min(volatile atomic_int *object, int operand); | ||
1269 | -int __ovld atomic_fetch_min_explicit(volatile atomic_int *object, int operand, memory_order order); | ||
1270 | -int __ovld atomic_fetch_min_explicit(volatile atomic_int *object, int operand, memory_order order, memory_scope scope); | ||
1271 | uint __ovld atomic_fetch_min(volatile atomic_uint *object, uint operand); | ||
1272 | -uint __ovld atomic_fetch_min_explicit(volatile atomic_uint *object, uint operand, memory_order order); | ||
1273 | -uint __ovld atomic_fetch_min_explicit(volatile atomic_uint *object, uint operand, memory_order order, memory_scope scope); | ||
1274 | int __ovld atomic_fetch_max(volatile atomic_int *object, int operand); | ||
1275 | -int __ovld atomic_fetch_max_explicit(volatile atomic_int *object, int operand, memory_order order); | ||
1276 | -int __ovld atomic_fetch_max_explicit(volatile atomic_int *object, int operand, memory_order order, memory_scope scope); | ||
1277 | uint __ovld atomic_fetch_max(volatile atomic_uint *object, uint operand); | ||
1278 | -uint __ovld atomic_fetch_max_explicit(volatile atomic_uint *object, uint operand, memory_order order); | ||
1279 | -uint __ovld atomic_fetch_max_explicit(volatile atomic_uint *object, uint operand, memory_order order, memory_scope scope); | ||
1280 | |||
1281 | #if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics) | ||
1282 | long __ovld atomic_fetch_add(volatile atomic_long *object, long operand); | ||
1283 | -long __ovld atomic_fetch_add_explicit(volatile atomic_long *object, long operand, memory_order order); | ||
1284 | -long __ovld atomic_fetch_add_explicit(volatile atomic_long *object, long operand, memory_order order, memory_scope scope); | ||
1285 | ulong __ovld atomic_fetch_add(volatile atomic_ulong *object, ulong operand); | ||
1286 | -ulong __ovld atomic_fetch_add_explicit(volatile atomic_ulong *object, ulong operand, memory_order order); | ||
1287 | -ulong __ovld atomic_fetch_add_explicit(volatile atomic_ulong *object, ulong operand, memory_order order, memory_scope scope); | ||
1288 | long __ovld atomic_fetch_sub(volatile atomic_long *object, long operand); | ||
1289 | -long __ovld atomic_fetch_sub_explicit(volatile atomic_long *object, long operand, memory_order order); | ||
1290 | -long __ovld atomic_fetch_sub_explicit(volatile atomic_long *object, long operand, memory_order order, memory_scope scope); | ||
1291 | ulong __ovld atomic_fetch_sub(volatile atomic_ulong *object, ulong operand); | ||
1292 | -ulong __ovld atomic_fetch_sub_explicit(volatile atomic_ulong *object, ulong operand, memory_order order); | ||
1293 | -ulong __ovld atomic_fetch_sub_explicit(volatile atomic_ulong *object, ulong operand, memory_order order, memory_scope scope); | ||
1294 | long __ovld atomic_fetch_or(volatile atomic_long *object, long operand); | ||
1295 | -long __ovld atomic_fetch_or_explicit(volatile atomic_long *object, long operand, memory_order order); | ||
1296 | -long __ovld atomic_fetch_or_explicit(volatile atomic_long *object, long operand, memory_order order, memory_scope scope); | ||
1297 | ulong __ovld atomic_fetch_or(volatile atomic_ulong *object, ulong operand); | ||
1298 | -ulong __ovld atomic_fetch_or_explicit(volatile atomic_ulong *object, ulong operand, memory_order order); | ||
1299 | -ulong __ovld atomic_fetch_or_explicit(volatile atomic_ulong *object, ulong operand, memory_order order, memory_scope scope); | ||
1300 | long __ovld atomic_fetch_xor(volatile atomic_long *object, long operand); | ||
1301 | -long __ovld atomic_fetch_xor_explicit(volatile atomic_long *object, long operand, memory_order order); | ||
1302 | -long __ovld atomic_fetch_xor_explicit(volatile atomic_long *object, long operand, memory_order order, memory_scope scope); | ||
1303 | ulong __ovld atomic_fetch_xor(volatile atomic_ulong *object, ulong operand); | ||
1304 | -ulong __ovld atomic_fetch_xor_explicit(volatile atomic_ulong *object, ulong operand, memory_order order); | ||
1305 | -ulong __ovld atomic_fetch_xor_explicit(volatile atomic_ulong *object, ulong operand, memory_order order, memory_scope scope); | ||
1306 | long __ovld atomic_fetch_and(volatile atomic_long *object, long operand); | ||
1307 | -long __ovld atomic_fetch_and_explicit(volatile atomic_long *object, long operand, memory_order order); | ||
1308 | -long __ovld atomic_fetch_and_explicit(volatile atomic_long *object, long operand, memory_order order, memory_scope scope); | ||
1309 | ulong __ovld atomic_fetch_and(volatile atomic_ulong *object, ulong operand); | ||
1310 | -ulong __ovld atomic_fetch_and_explicit(volatile atomic_ulong *object, ulong operand, memory_order order); | ||
1311 | -ulong __ovld atomic_fetch_and_explicit(volatile atomic_ulong *object, ulong operand, memory_order order, memory_scope scope); | ||
1312 | long __ovld atomic_fetch_min(volatile atomic_long *object, long operand); | ||
1313 | -long __ovld atomic_fetch_min_explicit(volatile atomic_long *object, long operand, memory_order order); | ||
1314 | -long __ovld atomic_fetch_min_explicit(volatile atomic_long *object, long operand, memory_order order, memory_scope scope); | ||
1315 | ulong __ovld atomic_fetch_min(volatile atomic_ulong *object, ulong operand); | ||
1316 | -ulong __ovld atomic_fetch_min_explicit(volatile atomic_ulong *object, ulong operand, memory_order order); | ||
1317 | -ulong __ovld atomic_fetch_min_explicit(volatile atomic_ulong *object, ulong operand, memory_order order, memory_scope scope); | ||
1318 | long __ovld atomic_fetch_max(volatile atomic_long *object, long operand); | ||
1319 | -long __ovld atomic_fetch_max_explicit(volatile atomic_long *object, long operand, memory_order order); | ||
1320 | -long __ovld atomic_fetch_max_explicit(volatile atomic_long *object, long operand, memory_order order, memory_scope scope); | ||
1321 | ulong __ovld atomic_fetch_max(volatile atomic_ulong *object, ulong operand); | ||
1322 | -ulong __ovld atomic_fetch_max_explicit(volatile atomic_ulong *object, ulong operand, memory_order order); | ||
1323 | -ulong __ovld atomic_fetch_max_explicit(volatile atomic_ulong *object, ulong operand, memory_order order, memory_scope scope); | ||
1324 | +uintptr_t __ovld atomic_fetch_add(volatile atomic_uintptr_t *object, ptrdiff_t operand); | ||
1325 | +uintptr_t __ovld atomic_fetch_sub(volatile atomic_uintptr_t *object, ptrdiff_t operand); | ||
1326 | #endif //defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics) | ||
1327 | +#endif | ||
1328 | |||
1329 | -// OpenCL v2.0 s6.13.11.7.5: | ||
1330 | -// add/sub: atomic type argument can be uintptr_t/intptr_t, value type argument can be ptrdiff_t. | ||
1331 | -// or/xor/and/min/max: atomic type argument can be intptr_t/uintptr_t, value type argument can be intptr_t/uintptr_t. | ||
1332 | - | ||
1333 | +#if defined(__opencl_c_atomic_scope_device) | ||
1334 | +int __ovld atomic_fetch_add_explicit(volatile atomic_int *object, int operand, memory_order order); | ||
1335 | +uint __ovld atomic_fetch_add_explicit(volatile atomic_uint *object, uint operand, memory_order order); | ||
1336 | +int __ovld atomic_fetch_sub_explicit(volatile atomic_int *object, int operand, memory_order order); | ||
1337 | +uint __ovld atomic_fetch_sub_explicit(volatile atomic_uint *object, uint operand, memory_order order); | ||
1338 | +int __ovld atomic_fetch_or_explicit(volatile atomic_int *object, int operand, memory_order order); | ||
1339 | +uint __ovld atomic_fetch_or_explicit(volatile atomic_uint *object, uint operand, memory_order order); | ||
1340 | +int __ovld atomic_fetch_xor_explicit(volatile atomic_int *object, int operand, memory_order order); | ||
1341 | +uint __ovld atomic_fetch_xor_explicit(volatile atomic_uint *object, uint operand, memory_order order); | ||
1342 | +int __ovld atomic_fetch_and_explicit(volatile atomic_int *object, int operand, memory_order order); | ||
1343 | +uint __ovld atomic_fetch_and_explicit(volatile atomic_uint *object, uint operand, memory_order order); | ||
1344 | +int __ovld atomic_fetch_min_explicit(volatile atomic_int *object, int operand, memory_order order); | ||
1345 | +uint __ovld atomic_fetch_min_explicit(volatile atomic_uint *object, uint operand, memory_order order); | ||
1346 | +int __ovld atomic_fetch_max_explicit(volatile atomic_int *object, int operand, memory_order order); | ||
1347 | +uint __ovld atomic_fetch_max_explicit(volatile atomic_uint *object, uint operand, memory_order order); | ||
1348 | #if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics) | ||
1349 | -uintptr_t __ovld atomic_fetch_add(volatile atomic_uintptr_t *object, ptrdiff_t operand); | ||
1350 | +long __ovld atomic_fetch_add_explicit(volatile atomic_long *object, long operand, memory_order order); | ||
1351 | +ulong __ovld atomic_fetch_add_explicit(volatile atomic_ulong *object, ulong operand, memory_order order); | ||
1352 | +long __ovld atomic_fetch_sub_explicit(volatile atomic_long *object, long operand, memory_order order); | ||
1353 | +ulong __ovld atomic_fetch_sub_explicit(volatile atomic_ulong *object, ulong operand, memory_order order); | ||
1354 | +long __ovld atomic_fetch_or_explicit(volatile atomic_long *object, long operand, memory_order order); | ||
1355 | +ulong __ovld atomic_fetch_or_explicit(volatile atomic_ulong *object, ulong operand, memory_order order); | ||
1356 | +long __ovld atomic_fetch_xor_explicit(volatile atomic_long *object, long operand, memory_order order); | ||
1357 | +ulong __ovld atomic_fetch_xor_explicit(volatile atomic_ulong *object, ulong operand, memory_order order); | ||
1358 | +long __ovld atomic_fetch_and_explicit(volatile atomic_long *object, long operand, memory_order order); | ||
1359 | +ulong __ovld atomic_fetch_and_explicit(volatile atomic_ulong *object, ulong operand, memory_order order); | ||
1360 | +long __ovld atomic_fetch_min_explicit(volatile atomic_long *object, long operand, memory_order order); | ||
1361 | +ulong __ovld atomic_fetch_min_explicit(volatile atomic_ulong *object, ulong operand, memory_order order); | ||
1362 | +long __ovld atomic_fetch_max_explicit(volatile atomic_long *object, long operand, memory_order order); | ||
1363 | +ulong __ovld atomic_fetch_max_explicit(volatile atomic_ulong *object, ulong operand, memory_order order); | ||
1364 | uintptr_t __ovld atomic_fetch_add_explicit(volatile atomic_uintptr_t *object, ptrdiff_t operand, memory_order order); | ||
1365 | -uintptr_t __ovld atomic_fetch_add_explicit(volatile atomic_uintptr_t *object, ptrdiff_t operand, memory_order order, memory_scope scope); | ||
1366 | -uintptr_t __ovld atomic_fetch_sub(volatile atomic_uintptr_t *object, ptrdiff_t operand); | ||
1367 | uintptr_t __ovld atomic_fetch_sub_explicit(volatile atomic_uintptr_t *object, ptrdiff_t operand, memory_order order); | ||
1368 | -uintptr_t __ovld atomic_fetch_sub_explicit(volatile atomic_uintptr_t *object, ptrdiff_t operand, memory_order order, memory_scope scope); | ||
1369 | +#endif //defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics) | ||
1370 | +#endif | ||
1371 | |||
1372 | -uintptr_t __ovld atomic_fetch_or(volatile atomic_uintptr_t *object, intptr_t operand); | ||
1373 | -uintptr_t __ovld atomic_fetch_or_explicit(volatile atomic_uintptr_t *object, intptr_t operand, memory_order order); | ||
1374 | -uintptr_t __ovld atomic_fetch_or_explicit(volatile atomic_uintptr_t *object, intptr_t operand, memory_order order, memory_scope scope); | ||
1375 | -uintptr_t __ovld atomic_fetch_xor(volatile atomic_uintptr_t *object, intptr_t operand); | ||
1376 | -uintptr_t __ovld atomic_fetch_xor_explicit(volatile atomic_uintptr_t *object, intptr_t operand, memory_order order); | ||
1377 | -uintptr_t __ovld atomic_fetch_xor_explicit(volatile atomic_uintptr_t *object, intptr_t operand, memory_order order, memory_scope scope); | ||
1378 | -uintptr_t __ovld atomic_fetch_and(volatile atomic_uintptr_t *object, intptr_t operand); | ||
1379 | -uintptr_t __ovld atomic_fetch_and_explicit(volatile atomic_uintptr_t *object, intptr_t operand, memory_order order); | ||
1380 | -uintptr_t __ovld atomic_fetch_and_explicit(volatile atomic_uintptr_t *object, intptr_t operand, memory_order order, memory_scope scope); | ||
1381 | -uintptr_t __ovld atomic_fetch_min(volatile atomic_uintptr_t *object, intptr_t opermax); | ||
1382 | -uintptr_t __ovld atomic_fetch_min_explicit(volatile atomic_uintptr_t *object, intptr_t opermax, memory_order minder); | ||
1383 | -uintptr_t __ovld atomic_fetch_min_explicit(volatile atomic_uintptr_t *object, intptr_t opermax, memory_order minder, memory_scope scope); | ||
1384 | -uintptr_t __ovld atomic_fetch_max(volatile atomic_uintptr_t *object, intptr_t opermax); | ||
1385 | -uintptr_t __ovld atomic_fetch_max_explicit(volatile atomic_uintptr_t *object, intptr_t opermax, memory_order minder); | ||
1386 | -uintptr_t __ovld atomic_fetch_max_explicit(volatile atomic_uintptr_t *object, intptr_t opermax, memory_order minder, memory_scope scope); | ||
1387 | - | ||
1388 | -intptr_t __ovld atomic_fetch_or(volatile atomic_intptr_t *object, uintptr_t operand); | ||
1389 | -intptr_t __ovld atomic_fetch_or_explicit(volatile atomic_intptr_t *object, uintptr_t operand, memory_order order); | ||
1390 | -intptr_t __ovld atomic_fetch_or_explicit(volatile atomic_intptr_t *object, uintptr_t operand, memory_order order, memory_scope scope); | ||
1391 | -intptr_t __ovld atomic_fetch_xor(volatile atomic_intptr_t *object, uintptr_t operand); | ||
1392 | -intptr_t __ovld atomic_fetch_xor_explicit(volatile atomic_intptr_t *object, uintptr_t operand, memory_order order); | ||
1393 | -intptr_t __ovld atomic_fetch_xor_explicit(volatile atomic_intptr_t *object, uintptr_t operand, memory_order order, memory_scope scope); | ||
1394 | -intptr_t __ovld atomic_fetch_and(volatile atomic_intptr_t *object, uintptr_t operand); | ||
1395 | -intptr_t __ovld atomic_fetch_and_explicit(volatile atomic_intptr_t *object, uintptr_t operand, memory_order order); | ||
1396 | -intptr_t __ovld atomic_fetch_and_explicit(volatile atomic_intptr_t *object, uintptr_t operand, memory_order order, memory_scope scope); | ||
1397 | -intptr_t __ovld atomic_fetch_min(volatile atomic_intptr_t *object, uintptr_t opermax); | ||
1398 | -intptr_t __ovld atomic_fetch_min_explicit(volatile atomic_intptr_t *object, uintptr_t opermax, memory_order minder); | ||
1399 | -intptr_t __ovld atomic_fetch_min_explicit(volatile atomic_intptr_t *object, uintptr_t opermax, memory_order minder, memory_scope scope); | ||
1400 | -intptr_t __ovld atomic_fetch_max(volatile atomic_intptr_t *object, uintptr_t opermax); | ||
1401 | -intptr_t __ovld atomic_fetch_max_explicit(volatile atomic_intptr_t *object, uintptr_t opermax, memory_order minder); | ||
1402 | -intptr_t __ovld atomic_fetch_max_explicit(volatile atomic_intptr_t *object, uintptr_t opermax, memory_order minder, memory_scope scope); | ||
1403 | +int __ovld atomic_fetch_add_explicit(volatile atomic_int *object, int operand, memory_order order, memory_scope scope); | ||
1404 | +uint __ovld atomic_fetch_add_explicit(volatile atomic_uint *object, uint operand, memory_order order, memory_scope scope); | ||
1405 | +int __ovld atomic_fetch_sub_explicit(volatile atomic_int *object, int operand, memory_order order, memory_scope scope); | ||
1406 | +uint __ovld atomic_fetch_sub_explicit(volatile atomic_uint *object, uint operand, memory_order order, memory_scope scope); | ||
1407 | +int __ovld atomic_fetch_or_explicit(volatile atomic_int *object, int operand, memory_order order, memory_scope scope); | ||
1408 | +uint __ovld atomic_fetch_or_explicit(volatile atomic_uint *object, uint operand, memory_order order, memory_scope scope); | ||
1409 | +int __ovld atomic_fetch_xor_explicit(volatile atomic_int *object, int operand, memory_order order, memory_scope scope); | ||
1410 | +uint __ovld atomic_fetch_xor_explicit(volatile atomic_uint *object, uint operand, memory_order order, memory_scope scope); | ||
1411 | +int __ovld atomic_fetch_and_explicit(volatile atomic_int *object, int operand, memory_order order, memory_scope scope); | ||
1412 | +uint __ovld atomic_fetch_and_explicit(volatile atomic_uint *object, uint operand, memory_order order, memory_scope scope); | ||
1413 | +int __ovld atomic_fetch_min_explicit(volatile atomic_int *object, int operand, memory_order order, memory_scope scope); | ||
1414 | +uint __ovld atomic_fetch_min_explicit(volatile atomic_uint *object, uint operand, memory_order order, memory_scope scope); | ||
1415 | +int __ovld atomic_fetch_max_explicit(volatile atomic_int *object, int operand, memory_order order, memory_scope scope); | ||
1416 | +uint __ovld atomic_fetch_max_explicit(volatile atomic_uint *object, uint operand, memory_order order, memory_scope scope); | ||
1417 | +#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics) | ||
1418 | +long __ovld atomic_fetch_add_explicit(volatile atomic_long *object, long operand, memory_order order, memory_scope scope); | ||
1419 | +ulong __ovld atomic_fetch_add_explicit(volatile atomic_ulong *object, ulong operand, memory_order order, memory_scope scope); | ||
1420 | +long __ovld atomic_fetch_sub_explicit(volatile atomic_long *object, long operand, memory_order order, memory_scope scope); | ||
1421 | +ulong __ovld atomic_fetch_sub_explicit(volatile atomic_ulong *object, ulong operand, memory_order order, memory_scope scope); | ||
1422 | +long __ovld atomic_fetch_or_explicit(volatile atomic_long *object, long operand, memory_order order, memory_scope scope); | ||
1423 | +ulong __ovld atomic_fetch_or_explicit(volatile atomic_ulong *object, ulong operand, memory_order order, memory_scope scope); | ||
1424 | +long __ovld atomic_fetch_xor_explicit(volatile atomic_long *object, long operand, memory_order order, memory_scope scope); | ||
1425 | +ulong __ovld atomic_fetch_xor_explicit(volatile atomic_ulong *object, ulong operand, memory_order order, memory_scope scope); | ||
1426 | +long __ovld atomic_fetch_and_explicit(volatile atomic_long *object, long operand, memory_order order, memory_scope scope); | ||
1427 | +ulong __ovld atomic_fetch_and_explicit(volatile atomic_ulong *object, ulong operand, memory_order order, memory_scope scope); | ||
1428 | +long __ovld atomic_fetch_min_explicit(volatile atomic_long *object, long operand, memory_order order, memory_scope scope); | ||
1429 | +ulong __ovld atomic_fetch_min_explicit(volatile atomic_ulong *object, ulong operand, memory_order order, memory_scope scope); | ||
1430 | +long __ovld atomic_fetch_max_explicit(volatile atomic_long *object, long operand, memory_order order, memory_scope scope); | ||
1431 | +ulong __ovld atomic_fetch_max_explicit(volatile atomic_ulong *object, ulong operand, memory_order order, memory_scope scope); | ||
1432 | +#endif //defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics) | ||
1433 | +#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics) | ||
1434 | +uintptr_t __ovld atomic_fetch_add_explicit(volatile atomic_uintptr_t *object, ptrdiff_t operand, memory_order order, memory_scope scope); | ||
1435 | +uintptr_t __ovld atomic_fetch_sub_explicit(volatile atomic_uintptr_t *object, ptrdiff_t operand, memory_order order, memory_scope scope); | ||
1436 | #endif | ||
1437 | |||
1438 | // The functionality added by cl_ext_float_atomics extension | ||
1439 | @@ -13911,155 +13886,213 @@ double __ovld atomic_fetch_sub_explicit(volatile atomic_double *object, | ||
1440 | |||
1441 | // atomic_store() | ||
1442 | |||
1443 | +#if defined(__opencl_c_atomic_order_seq_cst) && defined(__opencl_c_atomic_scope_device) | ||
1444 | void __ovld atomic_store(volatile atomic_int *object, int desired); | ||
1445 | -void __ovld atomic_store_explicit(volatile atomic_int *object, int desired, memory_order order); | ||
1446 | -void __ovld atomic_store_explicit(volatile atomic_int *object, int desired, memory_order order, memory_scope scope); | ||
1447 | void __ovld atomic_store(volatile atomic_uint *object, uint desired); | ||
1448 | -void __ovld atomic_store_explicit(volatile atomic_uint *object, uint desired, memory_order order); | ||
1449 | -void __ovld atomic_store_explicit(volatile atomic_uint *object, uint desired, memory_order order, memory_scope scope); | ||
1450 | void __ovld atomic_store(volatile atomic_float *object, float desired); | ||
1451 | -void __ovld atomic_store_explicit(volatile atomic_float *object, float desired, memory_order order); | ||
1452 | -void __ovld atomic_store_explicit(volatile atomic_float *object, float desired, memory_order order, memory_scope scope); | ||
1453 | + | ||
1454 | #if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics) | ||
1455 | #ifdef cl_khr_fp64 | ||
1456 | void __ovld atomic_store(volatile atomic_double *object, double desired); | ||
1457 | -void __ovld atomic_store_explicit(volatile atomic_double *object, double desired, memory_order order); | ||
1458 | -void __ovld atomic_store_explicit(volatile atomic_double *object, double desired, memory_order order, memory_scope scope); | ||
1459 | #endif //cl_khr_fp64 | ||
1460 | void __ovld atomic_store(volatile atomic_long *object, long desired); | ||
1461 | -void __ovld atomic_store_explicit(volatile atomic_long *object, long desired, memory_order order); | ||
1462 | -void __ovld atomic_store_explicit(volatile atomic_long *object, long desired, memory_order order, memory_scope scope); | ||
1463 | void __ovld atomic_store(volatile atomic_ulong *object, ulong desired); | ||
1464 | +#endif | ||
1465 | +#endif | ||
1466 | + | ||
1467 | +#if defined(__opencl_c_atomic_scope_device) | ||
1468 | +void __ovld atomic_store_explicit(volatile atomic_int *object, int desired, memory_order order); | ||
1469 | +void __ovld atomic_store_explicit(volatile atomic_uint *object, uint desired, memory_order order); | ||
1470 | +void __ovld atomic_store_explicit(volatile atomic_float *object, float desired, memory_order order); | ||
1471 | +#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics) | ||
1472 | +#ifdef cl_khr_fp64 | ||
1473 | +void __ovld atomic_store_explicit(volatile atomic_double *object, double desired, memory_order order); | ||
1474 | +#endif //cl_khr_fp64 | ||
1475 | +void __ovld atomic_store_explicit(volatile atomic_long *object, long desired, memory_order order); | ||
1476 | void __ovld atomic_store_explicit(volatile atomic_ulong *object, ulong desired, memory_order order); | ||
1477 | +#endif | ||
1478 | +#endif | ||
1479 | + | ||
1480 | +void __ovld atomic_store_explicit(volatile atomic_int *object, int desired, memory_order order, memory_scope scope); | ||
1481 | +void __ovld atomic_store_explicit(volatile atomic_uint *object, uint desired, memory_order order, memory_scope scope); | ||
1482 | +void __ovld atomic_store_explicit(volatile atomic_float *object, float desired, memory_order order, memory_scope scope); | ||
1483 | +#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics) | ||
1484 | +#ifdef cl_khr_fp64 | ||
1485 | +void __ovld atomic_store_explicit(volatile atomic_double *object, double desired, memory_order order, memory_scope scope); | ||
1486 | +#endif //cl_khr_fp64 | ||
1487 | +void __ovld atomic_store_explicit(volatile atomic_long *object, long desired, memory_order order, memory_scope scope); | ||
1488 | void __ovld atomic_store_explicit(volatile atomic_ulong *object, ulong desired, memory_order order, memory_scope scope); | ||
1489 | #endif | ||
1490 | |||
1491 | // atomic_load() | ||
1492 | - | ||
1493 | +#if defined(__opencl_c_atomic_order_seq_cst) && defined(__opencl_c_atomic_scope_device) | ||
1494 | int __ovld atomic_load(volatile atomic_int *object); | ||
1495 | -int __ovld atomic_load_explicit(volatile atomic_int *object, memory_order order); | ||
1496 | -int __ovld atomic_load_explicit(volatile atomic_int *object, memory_order order, memory_scope scope); | ||
1497 | uint __ovld atomic_load(volatile atomic_uint *object); | ||
1498 | -uint __ovld atomic_load_explicit(volatile atomic_uint *object, memory_order order); | ||
1499 | -uint __ovld atomic_load_explicit(volatile atomic_uint *object, memory_order order, memory_scope scope); | ||
1500 | float __ovld atomic_load(volatile atomic_float *object); | ||
1501 | -float __ovld atomic_load_explicit(volatile atomic_float *object, memory_order order); | ||
1502 | -float __ovld atomic_load_explicit(volatile atomic_float *object, memory_order order, memory_scope scope); | ||
1503 | #if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics) | ||
1504 | #ifdef cl_khr_fp64 | ||
1505 | double __ovld atomic_load(volatile atomic_double *object); | ||
1506 | -double __ovld atomic_load_explicit(volatile atomic_double *object, memory_order order); | ||
1507 | -double __ovld atomic_load_explicit(volatile atomic_double *object, memory_order order, memory_scope scope); | ||
1508 | #endif //cl_khr_fp64 | ||
1509 | long __ovld atomic_load(volatile atomic_long *object); | ||
1510 | -long __ovld atomic_load_explicit(volatile atomic_long *object, memory_order order); | ||
1511 | -long __ovld atomic_load_explicit(volatile atomic_long *object, memory_order order, memory_scope scope); | ||
1512 | ulong __ovld atomic_load(volatile atomic_ulong *object); | ||
1513 | +#endif | ||
1514 | +#endif | ||
1515 | + | ||
1516 | +#if defined(__opencl_c_atomic_scope_device) | ||
1517 | +int __ovld atomic_load_explicit(volatile atomic_int *object, memory_order order); | ||
1518 | +uint __ovld atomic_load_explicit(volatile atomic_uint *object, memory_order order); | ||
1519 | +float __ovld atomic_load_explicit(volatile atomic_float *object, memory_order order); | ||
1520 | +#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics) | ||
1521 | +#ifdef cl_khr_fp64 | ||
1522 | +double __ovld atomic_load_explicit(volatile atomic_double *object, memory_order order); | ||
1523 | +#endif //cl_khr_fp64 | ||
1524 | +long __ovld atomic_load_explicit(volatile atomic_long *object, memory_order order); | ||
1525 | ulong __ovld atomic_load_explicit(volatile atomic_ulong *object, memory_order order); | ||
1526 | +#endif | ||
1527 | +#endif | ||
1528 | + | ||
1529 | +int __ovld atomic_load_explicit(volatile atomic_int *object, memory_order order, memory_scope scope); | ||
1530 | +uint __ovld atomic_load_explicit(volatile atomic_uint *object, memory_order order, memory_scope scope); | ||
1531 | +float __ovld atomic_load_explicit(volatile atomic_float *object, memory_order order, memory_scope scope); | ||
1532 | +#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics) | ||
1533 | +#ifdef cl_khr_fp64 | ||
1534 | +double __ovld atomic_load_explicit(volatile atomic_double *object, memory_order order, memory_scope scope); | ||
1535 | +#endif //cl_khr_fp64 | ||
1536 | +long __ovld atomic_load_explicit(volatile atomic_long *object, memory_order order, memory_scope scope); | ||
1537 | ulong __ovld atomic_load_explicit(volatile atomic_ulong *object, memory_order order, memory_scope scope); | ||
1538 | #endif | ||
1539 | |||
1540 | // atomic_exchange() | ||
1541 | |||
1542 | +#if defined(__opencl_c_atomic_order_seq_cst) && defined(__opencl_c_atomic_scope_device) | ||
1543 | int __ovld atomic_exchange(volatile atomic_int *object, int desired); | ||
1544 | -int __ovld atomic_exchange_explicit(volatile atomic_int *object, int desired, memory_order order); | ||
1545 | -int __ovld atomic_exchange_explicit(volatile atomic_int *object, int desired, memory_order order, memory_scope scope); | ||
1546 | uint __ovld atomic_exchange(volatile atomic_uint *object, uint desired); | ||
1547 | -uint __ovld atomic_exchange_explicit(volatile atomic_uint *object, uint desired, memory_order order); | ||
1548 | -uint __ovld atomic_exchange_explicit(volatile atomic_uint *object, uint desired, memory_order order, memory_scope scope); | ||
1549 | float __ovld atomic_exchange(volatile atomic_float *object, float desired); | ||
1550 | -float __ovld atomic_exchange_explicit(volatile atomic_float *object, float desired, memory_order order); | ||
1551 | -float __ovld atomic_exchange_explicit(volatile atomic_float *object, float desired, memory_order order, memory_scope scope); | ||
1552 | #if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics) | ||
1553 | #ifdef cl_khr_fp64 | ||
1554 | double __ovld atomic_exchange(volatile atomic_double *object, double desired); | ||
1555 | -double __ovld atomic_exchange_explicit(volatile atomic_double *object, double desired, memory_order order); | ||
1556 | -double __ovld atomic_exchange_explicit(volatile atomic_double *object, double desired, memory_order order, memory_scope scope); | ||
1557 | #endif //cl_khr_fp64 | ||
1558 | long __ovld atomic_exchange(volatile atomic_long *object, long desired); | ||
1559 | -long __ovld atomic_exchange_explicit(volatile atomic_long *object, long desired, memory_order order); | ||
1560 | -long __ovld atomic_exchange_explicit(volatile atomic_long *object, long desired, memory_order order, memory_scope scope); | ||
1561 | ulong __ovld atomic_exchange(volatile atomic_ulong *object, ulong desired); | ||
1562 | +#endif | ||
1563 | +#endif | ||
1564 | + | ||
1565 | +#if defined(__opencl_c_atomic_scope_device) | ||
1566 | +int __ovld atomic_exchange_explicit(volatile atomic_int *object, int desired, memory_order order); | ||
1567 | +uint __ovld atomic_exchange_explicit(volatile atomic_uint *object, uint desired, memory_order order); | ||
1568 | +float __ovld atomic_exchange_explicit(volatile atomic_float *object, float desired, memory_order order); | ||
1569 | +#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics) | ||
1570 | +#ifdef cl_khr_fp64 | ||
1571 | +double __ovld atomic_exchange_explicit(volatile atomic_double *object, double desired, memory_order order); | ||
1572 | +#endif //cl_khr_fp64 | ||
1573 | +long __ovld atomic_exchange_explicit(volatile atomic_long *object, long desired, memory_order order); | ||
1574 | ulong __ovld atomic_exchange_explicit(volatile atomic_ulong *object, ulong desired, memory_order order); | ||
1575 | +#endif | ||
1576 | +#endif | ||
1577 | + | ||
1578 | +int __ovld atomic_exchange_explicit(volatile atomic_int *object, int desired, memory_order order, memory_scope scope); | ||
1579 | +uint __ovld atomic_exchange_explicit(volatile atomic_uint *object, uint desired, memory_order order, memory_scope scope); | ||
1580 | +float __ovld atomic_exchange_explicit(volatile atomic_float *object, float desired, memory_order order, memory_scope scope); | ||
1581 | +#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics) | ||
1582 | +#ifdef cl_khr_fp64 | ||
1583 | +double __ovld atomic_exchange_explicit(volatile atomic_double *object, double desired, memory_order order, memory_scope scope); | ||
1584 | +#endif //cl_khr_fp64 | ||
1585 | +long __ovld atomic_exchange_explicit(volatile atomic_long *object, long desired, memory_order order, memory_scope scope); | ||
1586 | ulong __ovld atomic_exchange_explicit(volatile atomic_ulong *object, ulong desired, memory_order order, memory_scope scope); | ||
1587 | #endif | ||
1588 | |||
1589 | // atomic_compare_exchange_strong() and atomic_compare_exchange_weak() | ||
1590 | - | ||
1591 | +#if defined(__opencl_c_atomic_order_seq_cst) && defined(__opencl_c_atomic_scope_device) | ||
1592 | bool __ovld atomic_compare_exchange_strong(volatile atomic_int *object, int *expected, int desired); | ||
1593 | +bool __ovld atomic_compare_exchange_strong(volatile atomic_uint *object, uint *expected, uint desired); | ||
1594 | +bool __ovld atomic_compare_exchange_weak(volatile atomic_int *object, int *expected, int desired); | ||
1595 | +bool __ovld atomic_compare_exchange_weak(volatile atomic_uint *object, uint *expected, uint desired); | ||
1596 | +bool __ovld atomic_compare_exchange_strong(volatile atomic_float *object, float *expected, float desired); | ||
1597 | +bool __ovld atomic_compare_exchange_weak(volatile atomic_float *object, float *expected, float desired); | ||
1598 | + | ||
1599 | +#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics) | ||
1600 | +#ifdef cl_khr_fp64 | ||
1601 | +bool __ovld atomic_compare_exchange_strong(volatile atomic_double *object, double *expected, double desired); | ||
1602 | +bool __ovld atomic_compare_exchange_weak(volatile atomic_double *object, double *expected, double desired); | ||
1603 | +#endif //cl_khr_fp64 | ||
1604 | +bool __ovld atomic_compare_exchange_strong(volatile atomic_long *object, long *expected, long desired); | ||
1605 | +bool __ovld atomic_compare_exchange_weak(volatile atomic_long *object, long *expected, long desired); | ||
1606 | +bool __ovld atomic_compare_exchange_strong(volatile atomic_ulong *object, ulong *expected, ulong desired); | ||
1607 | +bool __ovld atomic_compare_exchange_weak(volatile atomic_ulong *object, ulong *expected, ulong desired); | ||
1608 | +#endif | ||
1609 | +#endif | ||
1610 | + | ||
1611 | bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_int *object, int *expected, | ||
1612 | int desired, memory_order success, memory_order failure); | ||
1613 | -bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_int *object, int *expected, | ||
1614 | - int desired, memory_order success, memory_order failure, memory_scope scope); | ||
1615 | -bool __ovld atomic_compare_exchange_strong(volatile atomic_uint *object, uint *expected, uint desired); | ||
1616 | bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_uint *object, uint *expected, | ||
1617 | uint desired, memory_order success, memory_order failure); | ||
1618 | -bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_uint *object, uint *expected, | ||
1619 | - uint desired, memory_order success, memory_order failure, memory_scope scope); | ||
1620 | -bool __ovld atomic_compare_exchange_weak(volatile atomic_int *object, int *expected, int desired); | ||
1621 | bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_int *object, int *expected, | ||
1622 | int desired, memory_order success, memory_order failure); | ||
1623 | -bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_int *object, int *expected, | ||
1624 | - int desired, memory_order success, memory_order failure, memory_scope scope); | ||
1625 | -bool __ovld atomic_compare_exchange_weak(volatile atomic_uint *object, uint *expected, uint desired); | ||
1626 | bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_uint *object, uint *expected, | ||
1627 | uint desired, memory_order success, memory_order failure); | ||
1628 | -bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_uint *object, uint *expected, | ||
1629 | - uint desired, memory_order success, memory_order failure, memory_scope scope); | ||
1630 | -bool __ovld atomic_compare_exchange_strong(volatile atomic_float *object, float *expected, float desired); | ||
1631 | bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_float *object, float *expected, | ||
1632 | float desired, memory_order success, memory_order failure); | ||
1633 | -bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_float *object, float *expected, | ||
1634 | - float desired, memory_order success, memory_order failure, memory_scope scope); | ||
1635 | -bool __ovld atomic_compare_exchange_weak(volatile atomic_float *object, float *expected, float desired); | ||
1636 | bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_float *object, float *expected, | ||
1637 | float desired, memory_order success, memory_order failure); | ||
1638 | -bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_float *object, float *expected, | ||
1639 | - float desired, memory_order success, memory_order failure, memory_scope scope); | ||
1640 | #if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics) | ||
1641 | #ifdef cl_khr_fp64 | ||
1642 | -bool __ovld atomic_compare_exchange_strong(volatile atomic_double *object, double *expected, double desired); | ||
1643 | bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_double *object, double *expected, | ||
1644 | double desired, memory_order success, memory_order failure); | ||
1645 | -bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_double *object, double *expected, | ||
1646 | - double desired, memory_order success, memory_order failure, memory_scope scope); | ||
1647 | -bool __ovld atomic_compare_exchange_weak(volatile atomic_double *object, double *expected, double desired); | ||
1648 | bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_double *object, double *expected, | ||
1649 | double desired, memory_order success, memory_order failure); | ||
1650 | -bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_double *object, double *expected, | ||
1651 | - double desired, memory_order success, memory_order failure, memory_scope scope); | ||
1652 | #endif //cl_khr_fp64 | ||
1653 | -bool __ovld atomic_compare_exchange_strong(volatile atomic_long *object, long *expected, long desired); | ||
1654 | bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_long *object, long *expected, | ||
1655 | long desired, memory_order success, memory_order failure); | ||
1656 | -bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_long *object, long *expected, | ||
1657 | - long desired, memory_order success, memory_order failure, memory_scope scope); | ||
1658 | -bool __ovld atomic_compare_exchange_weak(volatile atomic_long *object, long *expected, long desired); | ||
1659 | bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_long *object, long *expected, | ||
1660 | long desired, memory_order success, memory_order failure); | ||
1661 | -bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_long *object, long *expected, | ||
1662 | - long desired, memory_order success, memory_order failure, memory_scope scope); | ||
1663 | -bool __ovld atomic_compare_exchange_strong(volatile atomic_ulong *object, ulong *expected, ulong desired); | ||
1664 | bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_ulong *object, ulong *expected, | ||
1665 | ulong desired, memory_order success, memory_order failure); | ||
1666 | -bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_ulong *object, ulong *expected, | ||
1667 | - ulong desired, memory_order success, memory_order failure, memory_scope scope); | ||
1668 | -bool __ovld atomic_compare_exchange_weak(volatile atomic_ulong *object, ulong *expected, ulong desired); | ||
1669 | bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_ulong *object, ulong *expected, | ||
1670 | ulong desired, memory_order success, memory_order failure); | ||
1671 | +#endif | ||
1672 | + | ||
1673 | +bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_int *object, int *expected, | ||
1674 | + int desired, memory_order success, memory_order failure, memory_scope scope); | ||
1675 | +bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_uint *object, uint *expected, | ||
1676 | + uint desired, memory_order success, memory_order failure, memory_scope scope); | ||
1677 | +bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_int *object, int *expected, | ||
1678 | + int desired, memory_order success, memory_order failure, memory_scope scope); | ||
1679 | +bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_uint *object, uint *expected, | ||
1680 | + uint desired, memory_order success, memory_order failure, memory_scope scope); | ||
1681 | +bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_float *object, float *expected, | ||
1682 | + float desired, memory_order success, memory_order failure, memory_scope scope); | ||
1683 | +bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_float *object, float *expected, | ||
1684 | + float desired, memory_order success, memory_order failure, memory_scope scope); | ||
1685 | +#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics) | ||
1686 | +#ifdef cl_khr_fp64 | ||
1687 | +bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_double *object, double *expected, | ||
1688 | + double desired, memory_order success, memory_order failure, memory_scope scope); | ||
1689 | +bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_double *object, double *expected, | ||
1690 | + double desired, memory_order success, memory_order failure, memory_scope scope); | ||
1691 | +#endif //cl_khr_fp64 | ||
1692 | +bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_long *object, long *expected, | ||
1693 | + long desired, memory_order success, memory_order failure, memory_scope scope); | ||
1694 | +bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_long *object, long *expected, | ||
1695 | + long desired, memory_order success, memory_order failure, memory_scope scope); | ||
1696 | +bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_ulong *object, ulong *expected, | ||
1697 | + ulong desired, memory_order success, memory_order failure, memory_scope scope); | ||
1698 | bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_ulong *object, ulong *expected, | ||
1699 | ulong desired, memory_order success, memory_order failure, memory_scope scope); | ||
1700 | #endif | ||
1701 | |||
1702 | // atomic_flag_test_and_set() and atomic_flag_clear() | ||
1703 | - | ||
1704 | +#if defined(__opencl_c_atomic_order_seq_cst) && defined(__opencl_c_atomic_scope_device) | ||
1705 | bool __ovld atomic_flag_test_and_set(volatile atomic_flag *object); | ||
1706 | -bool __ovld atomic_flag_test_and_set_explicit(volatile atomic_flag *object, memory_order order); | ||
1707 | -bool __ovld atomic_flag_test_and_set_explicit(volatile atomic_flag *object, memory_order order, memory_scope scope); | ||
1708 | void __ovld atomic_flag_clear(volatile atomic_flag *object); | ||
1709 | +#endif | ||
1710 | + | ||
1711 | +#if defined(__opencl_c_atomic_scope_device) | ||
1712 | +bool __ovld atomic_flag_test_and_set_explicit(volatile atomic_flag *object, memory_order order); | ||
1713 | void __ovld atomic_flag_clear_explicit(volatile atomic_flag *object, memory_order order); | ||
1714 | -void __ovld atomic_flag_clear_explicit(volatile atomic_flag *object, memory_order order, memory_scope scope); | ||
1715 | +#endif | ||
1716 | |||
1717 | +bool __ovld atomic_flag_test_and_set_explicit(volatile atomic_flag *object, memory_order order, memory_scope scope); | ||
1718 | +void __ovld atomic_flag_clear_explicit(volatile atomic_flag *object, memory_order order, memory_scope scope); | ||
1719 | #endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1720 | |||
1721 | // OpenCL v1.1 s6.11.12, v1.2 s6.12.12, v2.0 s6.13.12 - Miscellaneous Vector Functions | ||
1722 | @@ -14843,7 +14876,7 @@ half4 __purefn __ovld read_imageh(read_only image1d_buffer_t image, int coord); | ||
1723 | #endif //cl_khr_fp16 | ||
1724 | |||
1725 | // Image read functions for read_write images | ||
1726 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1727 | +#if defined(__opencl_c_read_write_images) | ||
1728 | float4 __purefn __ovld read_imagef(read_write image1d_t image, int coord); | ||
1729 | int4 __purefn __ovld read_imagei(read_write image1d_t image, int coord); | ||
1730 | uint4 __purefn __ovld read_imageui(read_write image1d_t image, int coord); | ||
1731 | @@ -14886,7 +14919,6 @@ float __purefn __ovld read_imagef(read_write image2d_msaa_depth_t image, int2 co | ||
1732 | float __purefn __ovld read_imagef(read_write image2d_array_msaa_depth_t image, int4 coord, int sample); | ||
1733 | #endif //cl_khr_gl_msaa_sharing | ||
1734 | |||
1735 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1736 | #ifdef cl_khr_mipmap_image | ||
1737 | float4 __purefn __ovld read_imagef(read_write image1d_t image, sampler_t sampler, float coord, float lod); | ||
1738 | int4 __purefn __ovld read_imagei(read_write image1d_t image, sampler_t sampler, float coord, float lod); | ||
1739 | @@ -14937,7 +14969,6 @@ int4 __purefn __ovld read_imagei(read_write image3d_t image, sampler_t sampler, | ||
1740 | uint4 __purefn __ovld read_imageui(read_write image3d_t image, sampler_t sampler, float4 coord, float4 gradientX, float4 gradientY); | ||
1741 | |||
1742 | #endif //cl_khr_mipmap_image | ||
1743 | -#endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1744 | |||
1745 | // Image read functions returning half4 type | ||
1746 | #ifdef cl_khr_fp16 | ||
1747 | @@ -14948,7 +14979,7 @@ half4 __purefn __ovld read_imageh(read_write image1d_array_t image, int2 coord); | ||
1748 | half4 __purefn __ovld read_imageh(read_write image2d_array_t image, int4 coord); | ||
1749 | half4 __purefn __ovld read_imageh(read_write image1d_buffer_t image, int coord); | ||
1750 | #endif //cl_khr_fp16 | ||
1751 | -#endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1752 | +#endif //defined(__opencl_c_read_write_images | ||
1753 | |||
1754 | /** | ||
1755 | * Write color value to location specified by coordinate | ||
1756 | @@ -15092,7 +15123,7 @@ void __ovld write_imageh(write_only image1d_buffer_t image, int coord, half4 col | ||
1757 | #endif //cl_khr_fp16 | ||
1758 | |||
1759 | // Image write functions for read_write images | ||
1760 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1761 | +#if defined(__opencl_c_read_write_images) | ||
1762 | void __ovld write_imagef(read_write image2d_t image, int2 coord, float4 color); | ||
1763 | void __ovld write_imagei(read_write image2d_t image, int2 coord, int4 color); | ||
1764 | void __ovld write_imageui(read_write image2d_t image, int2 coord, uint4 color); | ||
1765 | @@ -15124,7 +15155,6 @@ void __ovld write_imagef(read_write image2d_depth_t image, int2 coord, float col | ||
1766 | void __ovld write_imagef(read_write image2d_array_depth_t image, int4 coord, float color); | ||
1767 | #endif //cl_khr_depth_images | ||
1768 | |||
1769 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1770 | #if defined(cl_khr_mipmap_image_writes) | ||
1771 | void __ovld write_imagef(read_write image1d_t image, int coord, int lod, float4 color); | ||
1772 | void __ovld write_imagei(read_write image1d_t image, int coord, int lod, int4 color); | ||
1773 | @@ -15152,7 +15182,6 @@ void __ovld write_imageui(read_write image3d_t image, int4 coord, int lod, uint4 | ||
1774 | #endif //cl_khr_3d_image_writes | ||
1775 | |||
1776 | #endif //cl_khr_mipmap_image_writes | ||
1777 | -#endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1778 | |||
1779 | // Image write functions for half4 type | ||
1780 | #ifdef cl_khr_fp16 | ||
1781 | @@ -15165,7 +15194,7 @@ void __ovld write_imageh(read_write image1d_array_t image, int2 coord, half4 col | ||
1782 | void __ovld write_imageh(read_write image2d_array_t image, int4 coord, half4 color); | ||
1783 | void __ovld write_imageh(read_write image1d_buffer_t image, int coord, half4 color); | ||
1784 | #endif //cl_khr_fp16 | ||
1785 | -#endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1786 | +#endif //defined(__opencl_c_read_write_images) | ||
1787 | |||
1788 | // Note: In OpenCL v1.0/1.1/1.2, image argument of image query builtin functions does not have | ||
1789 | // access qualifier, which by default assume read_only access qualifier. Image query builtin | ||
1790 | @@ -15213,7 +15242,7 @@ int __ovld __cnfn get_image_width(write_only image2d_array_msaa_t image); | ||
1791 | int __ovld __cnfn get_image_width(write_only image2d_array_msaa_depth_t image); | ||
1792 | #endif //cl_khr_gl_msaa_sharing | ||
1793 | |||
1794 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1795 | +#if defined(__opencl_c_read_write_images) | ||
1796 | int __ovld __cnfn get_image_width(read_write image1d_t image); | ||
1797 | int __ovld __cnfn get_image_width(read_write image1d_buffer_t image); | ||
1798 | int __ovld __cnfn get_image_width(read_write image2d_t image); | ||
1799 | @@ -15230,7 +15259,7 @@ int __ovld __cnfn get_image_width(read_write image2d_msaa_depth_t image); | ||
1800 | int __ovld __cnfn get_image_width(read_write image2d_array_msaa_t image); | ||
1801 | int __ovld __cnfn get_image_width(read_write image2d_array_msaa_depth_t image); | ||
1802 | #endif //cl_khr_gl_msaa_sharing | ||
1803 | -#endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1804 | +#endif //defined(__opencl_c_read_write_images) | ||
1805 | |||
1806 | /** | ||
1807 | * Return the image height in pixels. | ||
1808 | @@ -15265,7 +15294,7 @@ int __ovld __cnfn get_image_height(write_only image2d_array_msaa_t image); | ||
1809 | int __ovld __cnfn get_image_height(write_only image2d_array_msaa_depth_t image); | ||
1810 | #endif //cl_khr_gl_msaa_sharing | ||
1811 | |||
1812 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1813 | +#if defined(__opencl_c_read_write_images) | ||
1814 | int __ovld __cnfn get_image_height(read_write image2d_t image); | ||
1815 | int __ovld __cnfn get_image_height(read_write image3d_t image); | ||
1816 | int __ovld __cnfn get_image_height(read_write image2d_array_t image); | ||
1817 | @@ -15279,7 +15308,7 @@ int __ovld __cnfn get_image_height(read_write image2d_msaa_depth_t image); | ||
1818 | int __ovld __cnfn get_image_height(read_write image2d_array_msaa_t image); | ||
1819 | int __ovld __cnfn get_image_height(read_write image2d_array_msaa_depth_t image); | ||
1820 | #endif //cl_khr_gl_msaa_sharing | ||
1821 | -#endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1822 | +#endif //defined(__opencl_c_read_write_images) | ||
1823 | |||
1824 | /** | ||
1825 | * Return the image depth in pixels. | ||
1826 | @@ -15290,9 +15319,9 @@ int __ovld __cnfn get_image_depth(read_only image3d_t image); | ||
1827 | int __ovld __cnfn get_image_depth(write_only image3d_t image); | ||
1828 | #endif | ||
1829 | |||
1830 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1831 | +#if defined(__opencl_c_read_write_images) | ||
1832 | int __ovld __cnfn get_image_depth(read_write image3d_t image); | ||
1833 | -#endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1834 | +#endif //defined(__opencl_c_read_write_images) | ||
1835 | |||
1836 | // OpenCL Extension v2.0 s9.18 - Mipmaps | ||
1837 | #if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1838 | @@ -15388,7 +15417,7 @@ int __ovld __cnfn get_image_channel_data_type(write_only image2d_array_msaa_t im | ||
1839 | int __ovld __cnfn get_image_channel_data_type(write_only image2d_array_msaa_depth_t image); | ||
1840 | #endif //cl_khr_gl_msaa_sharing | ||
1841 | |||
1842 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1843 | +#if defined(__opencl_c_read_write_images) | ||
1844 | int __ovld __cnfn get_image_channel_data_type(read_write image1d_t image); | ||
1845 | int __ovld __cnfn get_image_channel_data_type(read_write image1d_buffer_t image); | ||
1846 | int __ovld __cnfn get_image_channel_data_type(read_write image2d_t image); | ||
1847 | @@ -15405,7 +15434,7 @@ int __ovld __cnfn get_image_channel_data_type(read_write image2d_msaa_depth_t im | ||
1848 | int __ovld __cnfn get_image_channel_data_type(read_write image2d_array_msaa_t image); | ||
1849 | int __ovld __cnfn get_image_channel_data_type(read_write image2d_array_msaa_depth_t image); | ||
1850 | #endif //cl_khr_gl_msaa_sharing | ||
1851 | -#endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1852 | +#endif //defined(__opencl_c_read_write_images) | ||
1853 | |||
1854 | /** | ||
1855 | * Return the image channel order. Valid values are: | ||
1856 | @@ -15460,7 +15489,7 @@ int __ovld __cnfn get_image_channel_order(write_only image2d_array_msaa_t image) | ||
1857 | int __ovld __cnfn get_image_channel_order(write_only image2d_array_msaa_depth_t image); | ||
1858 | #endif //cl_khr_gl_msaa_sharing | ||
1859 | |||
1860 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1861 | +#if defined(__opencl_c_read_write_images) | ||
1862 | int __ovld __cnfn get_image_channel_order(read_write image1d_t image); | ||
1863 | int __ovld __cnfn get_image_channel_order(read_write image1d_buffer_t image); | ||
1864 | int __ovld __cnfn get_image_channel_order(read_write image2d_t image); | ||
1865 | @@ -15477,7 +15506,7 @@ int __ovld __cnfn get_image_channel_order(read_write image2d_msaa_depth_t image) | ||
1866 | int __ovld __cnfn get_image_channel_order(read_write image2d_array_msaa_t image); | ||
1867 | int __ovld __cnfn get_image_channel_order(read_write image2d_array_msaa_depth_t image); | ||
1868 | #endif //cl_khr_gl_msaa_sharing | ||
1869 | -#endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1870 | +#endif //defined(__opencl_c_read_write_images) | ||
1871 | |||
1872 | /** | ||
1873 | * Return the 2D image width and height as an int2 | ||
1874 | @@ -15510,7 +15539,7 @@ int2 __ovld __cnfn get_image_dim(write_only image2d_array_msaa_t image); | ||
1875 | int2 __ovld __cnfn get_image_dim(write_only image2d_array_msaa_depth_t image); | ||
1876 | #endif //cl_khr_gl_msaa_sharing | ||
1877 | |||
1878 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1879 | +#if defined(__opencl_c_read_write_images) | ||
1880 | int2 __ovld __cnfn get_image_dim(read_write image2d_t image); | ||
1881 | int2 __ovld __cnfn get_image_dim(read_write image2d_array_t image); | ||
1882 | #ifdef cl_khr_depth_images | ||
1883 | @@ -15523,7 +15552,7 @@ int2 __ovld __cnfn get_image_dim(read_write image2d_msaa_depth_t image); | ||
1884 | int2 __ovld __cnfn get_image_dim(read_write image2d_array_msaa_t image); | ||
1885 | int2 __ovld __cnfn get_image_dim(read_write image2d_array_msaa_depth_t image); | ||
1886 | #endif //cl_khr_gl_msaa_sharing | ||
1887 | -#endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1888 | +#endif //defined(__opencl_c_read_write_images) | ||
1889 | |||
1890 | /** | ||
1891 | * Return the 3D image width, height, and depth as an | ||
1892 | @@ -15535,9 +15564,9 @@ int4 __ovld __cnfn get_image_dim(read_only image3d_t image); | ||
1893 | #ifdef cl_khr_3d_image_writes | ||
1894 | int4 __ovld __cnfn get_image_dim(write_only image3d_t image); | ||
1895 | #endif | ||
1896 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1897 | +#if defined(__opencl_c_read_write_images) | ||
1898 | int4 __ovld __cnfn get_image_dim(read_write image3d_t image); | ||
1899 | -#endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1900 | +#endif //defined(__opencl_c_read_write_images) | ||
1901 | |||
1902 | /** | ||
1903 | * Return the image array size. | ||
1904 | @@ -15563,7 +15592,7 @@ size_t __ovld __cnfn get_image_array_size(write_only image2d_array_msaa_t image_ | ||
1905 | size_t __ovld __cnfn get_image_array_size(write_only image2d_array_msaa_depth_t image_array); | ||
1906 | #endif //cl_khr_gl_msaa_sharing | ||
1907 | |||
1908 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1909 | +#if defined(__opencl_c_read_write_images) | ||
1910 | size_t __ovld __cnfn get_image_array_size(read_write image1d_array_t image_array); | ||
1911 | size_t __ovld __cnfn get_image_array_size(read_write image2d_array_t image_array); | ||
1912 | #ifdef cl_khr_depth_images | ||
1913 | @@ -15573,7 +15602,7 @@ size_t __ovld __cnfn get_image_array_size(read_write image2d_array_depth_t image | ||
1914 | size_t __ovld __cnfn get_image_array_size(read_write image2d_array_msaa_t image_array); | ||
1915 | size_t __ovld __cnfn get_image_array_size(read_write image2d_array_msaa_depth_t image_array); | ||
1916 | #endif //cl_khr_gl_msaa_sharing | ||
1917 | -#endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1918 | +#endif //defined(__opencl_c_read_write_images) | ||
1919 | |||
1920 | /** | ||
1921 | * Return the number of samples associated with image | ||
1922 | @@ -15589,12 +15618,12 @@ int __ovld get_image_num_samples(write_only image2d_msaa_depth_t image); | ||
1923 | int __ovld get_image_num_samples(write_only image2d_array_msaa_t image); | ||
1924 | int __ovld get_image_num_samples(write_only image2d_array_msaa_depth_t image); | ||
1925 | |||
1926 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1927 | +#if defined(__opencl_c_read_write_images) | ||
1928 | int __ovld get_image_num_samples(read_write image2d_msaa_t image); | ||
1929 | int __ovld get_image_num_samples(read_write image2d_msaa_depth_t image); | ||
1930 | int __ovld get_image_num_samples(read_write image2d_array_msaa_t image); | ||
1931 | int __ovld get_image_num_samples(read_write image2d_array_msaa_depth_t image); | ||
1932 | -#endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1933 | +#endif //defined(__opencl_c_read_write_images) | ||
1934 | #endif | ||
1935 | |||
1936 | // OpenCL v2.0 s6.13.15 - Work-group Functions | ||
1937 | @@ -16630,34 +16659,38 @@ uint16 __ovld __conv intel_sub_group_shuffle_xor( uint16 x, uint c ); | ||
1938 | long __ovld __conv intel_sub_group_shuffle_xor( long x, uint c ); | ||
1939 | ulong __ovld __conv intel_sub_group_shuffle_xor( ulong x, uint c ); | ||
1940 | |||
1941 | +#if defined(__opencl_c_images) | ||
1942 | uint __ovld __conv intel_sub_group_block_read( read_only image2d_t image, int2 coord ); | ||
1943 | uint2 __ovld __conv intel_sub_group_block_read2( read_only image2d_t image, int2 coord ); | ||
1944 | uint4 __ovld __conv intel_sub_group_block_read4( read_only image2d_t image, int2 coord ); | ||
1945 | uint8 __ovld __conv intel_sub_group_block_read8( read_only image2d_t image, int2 coord ); | ||
1946 | +#endif | ||
1947 | |||
1948 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1949 | +#if defined(__opencl_c_read_write_images) | ||
1950 | uint __ovld __conv intel_sub_group_block_read(read_write image2d_t image, int2 coord); | ||
1951 | uint2 __ovld __conv intel_sub_group_block_read2(read_write image2d_t image, int2 coord); | ||
1952 | uint4 __ovld __conv intel_sub_group_block_read4(read_write image2d_t image, int2 coord); | ||
1953 | uint8 __ovld __conv intel_sub_group_block_read8(read_write image2d_t image, int2 coord); | ||
1954 | -#endif // defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1955 | +#endif // defined(__opencl_c_read_write_images) | ||
1956 | |||
1957 | uint __ovld __conv intel_sub_group_block_read( const __global uint* p ); | ||
1958 | uint2 __ovld __conv intel_sub_group_block_read2( const __global uint* p ); | ||
1959 | uint4 __ovld __conv intel_sub_group_block_read4( const __global uint* p ); | ||
1960 | uint8 __ovld __conv intel_sub_group_block_read8( const __global uint* p ); | ||
1961 | |||
1962 | +#if defined(__opencl_c_images) | ||
1963 | void __ovld __conv intel_sub_group_block_write(write_only image2d_t image, int2 coord, uint data); | ||
1964 | void __ovld __conv intel_sub_group_block_write2(write_only image2d_t image, int2 coord, uint2 data); | ||
1965 | void __ovld __conv intel_sub_group_block_write4(write_only image2d_t image, int2 coord, uint4 data); | ||
1966 | void __ovld __conv intel_sub_group_block_write8(write_only image2d_t image, int2 coord, uint8 data); | ||
1967 | +#endif // defined(__opencl_c_images) | ||
1968 | |||
1969 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1970 | +#if defined(__opencl_c_read_write_images) | ||
1971 | void __ovld __conv intel_sub_group_block_write(read_write image2d_t image, int2 coord, uint data); | ||
1972 | void __ovld __conv intel_sub_group_block_write2(read_write image2d_t image, int2 coord, uint2 data); | ||
1973 | void __ovld __conv intel_sub_group_block_write4(read_write image2d_t image, int2 coord, uint4 data); | ||
1974 | void __ovld __conv intel_sub_group_block_write8(read_write image2d_t image, int2 coord, uint8 data); | ||
1975 | -#endif // defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1976 | +#endif // defined(__opencl_c_read_write_images) | ||
1977 | |||
1978 | void __ovld __conv intel_sub_group_block_write( __global uint* p, uint data ); | ||
1979 | void __ovld __conv intel_sub_group_block_write2( __global uint* p, uint2 data ); | ||
1980 | @@ -16770,68 +16803,76 @@ ushort __ovld __conv intel_sub_group_scan_inclusive_min( ushort x ); | ||
1981 | short __ovld __conv intel_sub_group_scan_inclusive_max( short x ); | ||
1982 | ushort __ovld __conv intel_sub_group_scan_inclusive_max( ushort x ); | ||
1983 | |||
1984 | +#if defined(__opencl_c_images) | ||
1985 | uint __ovld __conv intel_sub_group_block_read_ui( read_only image2d_t image, int2 byte_coord ); | ||
1986 | uint2 __ovld __conv intel_sub_group_block_read_ui2( read_only image2d_t image, int2 byte_coord ); | ||
1987 | uint4 __ovld __conv intel_sub_group_block_read_ui4( read_only image2d_t image, int2 byte_coord ); | ||
1988 | uint8 __ovld __conv intel_sub_group_block_read_ui8( read_only image2d_t image, int2 byte_coord ); | ||
1989 | +#endif // defined(__opencl_c_images) | ||
1990 | |||
1991 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1992 | +#if defined(__opencl_c_read_write_images) | ||
1993 | uint __ovld __conv intel_sub_group_block_read_ui( read_write image2d_t image, int2 byte_coord ); | ||
1994 | uint2 __ovld __conv intel_sub_group_block_read_ui2( read_write image2d_t image, int2 byte_coord ); | ||
1995 | uint4 __ovld __conv intel_sub_group_block_read_ui4( read_write image2d_t image, int2 byte_coord ); | ||
1996 | uint8 __ovld __conv intel_sub_group_block_read_ui8( read_write image2d_t image, int2 byte_coord ); | ||
1997 | -#endif // defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
1998 | +#endif // defined(__opencl_c_read_write_images) | ||
1999 | |||
2000 | uint __ovld __conv intel_sub_group_block_read_ui( const __global uint* p ); | ||
2001 | uint2 __ovld __conv intel_sub_group_block_read_ui2( const __global uint* p ); | ||
2002 | uint4 __ovld __conv intel_sub_group_block_read_ui4( const __global uint* p ); | ||
2003 | uint8 __ovld __conv intel_sub_group_block_read_ui8( const __global uint* p ); | ||
2004 | |||
2005 | +#if defined(__opencl_c_images) | ||
2006 | void __ovld __conv intel_sub_group_block_write_ui( read_only image2d_t image, int2 byte_coord, uint data ); | ||
2007 | void __ovld __conv intel_sub_group_block_write_ui2( read_only image2d_t image, int2 byte_coord, uint2 data ); | ||
2008 | void __ovld __conv intel_sub_group_block_write_ui4( read_only image2d_t image, int2 byte_coord, uint4 data ); | ||
2009 | void __ovld __conv intel_sub_group_block_write_ui8( read_only image2d_t image, int2 byte_coord, uint8 data ); | ||
2010 | +#endif //defined(__opencl_c_images) | ||
2011 | |||
2012 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
2013 | +#if defined(__opencl_c_read_write_images) | ||
2014 | void __ovld __conv intel_sub_group_block_write_ui( read_write image2d_t image, int2 byte_coord, uint data ); | ||
2015 | void __ovld __conv intel_sub_group_block_write_ui2( read_write image2d_t image, int2 byte_coord, uint2 data ); | ||
2016 | void __ovld __conv intel_sub_group_block_write_ui4( read_write image2d_t image, int2 byte_coord, uint4 data ); | ||
2017 | void __ovld __conv intel_sub_group_block_write_ui8( read_write image2d_t image, int2 byte_coord, uint8 data ); | ||
2018 | -#endif // defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
2019 | +#endif // defined(__opencl_c_read_write_images) | ||
2020 | |||
2021 | void __ovld __conv intel_sub_group_block_write_ui( __global uint* p, uint data ); | ||
2022 | void __ovld __conv intel_sub_group_block_write_ui2( __global uint* p, uint2 data ); | ||
2023 | void __ovld __conv intel_sub_group_block_write_ui4( __global uint* p, uint4 data ); | ||
2024 | void __ovld __conv intel_sub_group_block_write_ui8( __global uint* p, uint8 data ); | ||
2025 | |||
2026 | +#if defined(__opencl_c_images) | ||
2027 | ushort __ovld __conv intel_sub_group_block_read_us( read_only image2d_t image, int2 coord ); | ||
2028 | ushort2 __ovld __conv intel_sub_group_block_read_us2( read_only image2d_t image, int2 coord ); | ||
2029 | ushort4 __ovld __conv intel_sub_group_block_read_us4( read_only image2d_t image, int2 coord ); | ||
2030 | ushort8 __ovld __conv intel_sub_group_block_read_us8( read_only image2d_t image, int2 coord ); | ||
2031 | +#endif // defined(__opencl_c_images) | ||
2032 | |||
2033 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
2034 | +#if defined(__opencl_c_read_write_images) | ||
2035 | ushort __ovld __conv intel_sub_group_block_read_us(read_write image2d_t image, int2 coord); | ||
2036 | ushort2 __ovld __conv intel_sub_group_block_read_us2(read_write image2d_t image, int2 coord); | ||
2037 | ushort4 __ovld __conv intel_sub_group_block_read_us4(read_write image2d_t image, int2 coord); | ||
2038 | ushort8 __ovld __conv intel_sub_group_block_read_us8(read_write image2d_t image, int2 coord); | ||
2039 | -#endif // defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
2040 | +#endif // defined(__opencl_c_read_write_images) | ||
2041 | |||
2042 | ushort __ovld __conv intel_sub_group_block_read_us( const __global ushort* p ); | ||
2043 | ushort2 __ovld __conv intel_sub_group_block_read_us2( const __global ushort* p ); | ||
2044 | ushort4 __ovld __conv intel_sub_group_block_read_us4( const __global ushort* p ); | ||
2045 | ushort8 __ovld __conv intel_sub_group_block_read_us8( const __global ushort* p ); | ||
2046 | |||
2047 | +#if defined(__opencl_c_images) | ||
2048 | void __ovld __conv intel_sub_group_block_write_us(write_only image2d_t image, int2 coord, ushort data); | ||
2049 | void __ovld __conv intel_sub_group_block_write_us2(write_only image2d_t image, int2 coord, ushort2 data); | ||
2050 | void __ovld __conv intel_sub_group_block_write_us4(write_only image2d_t image, int2 coord, ushort4 data); | ||
2051 | void __ovld __conv intel_sub_group_block_write_us8(write_only image2d_t image, int2 coord, ushort8 data); | ||
2052 | +#endif // defined(__opencl_c_images) | ||
2053 | |||
2054 | -#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
2055 | +#if defined(__opencl_c_read_write_images) | ||
2056 | void __ovld __conv intel_sub_group_block_write_us(read_write image2d_t image, int2 coord, ushort data); | ||
2057 | void __ovld __conv intel_sub_group_block_write_us2(read_write image2d_t image, int2 coord, ushort2 data); | ||
2058 | void __ovld __conv intel_sub_group_block_write_us4(read_write image2d_t image, int2 coord, ushort4 data); | ||
2059 | void __ovld __conv intel_sub_group_block_write_us8(read_write image2d_t image, int2 coord, ushort8 data); | ||
2060 | -#endif // defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) | ||
2061 | +#endif // defined(__opencl_c_read_write_images) | ||
2062 | |||
2063 | void __ovld __conv intel_sub_group_block_write_us( __global ushort* p, ushort data ); | ||
2064 | void __ovld __conv intel_sub_group_block_write_us2( __global ushort* p, ushort2 data ); | ||
2065 | @@ -16949,6 +16990,7 @@ short2 __ovld intel_sub_group_avc_ime_adjust_ref_offset( | ||
2066 | short2 ref_offset, ushort2 src_coord, ushort2 ref_window_size, | ||
2067 | ushort2 image_size); | ||
2068 | |||
2069 | +#if defined(__opencl_c_images) | ||
2070 | intel_sub_group_avc_ime_result_t __ovld | ||
2071 | intel_sub_group_avc_ime_evaluate_with_single_reference( | ||
2072 | read_only image2d_t src_image, read_only image2d_t ref_image, | ||
2073 | @@ -16989,6 +17031,7 @@ intel_sub_group_avc_ime_evaluate_with_dual_reference_streaminout( | ||
2074 | read_only image2d_t bwd_ref_image, sampler_t vme_media_sampler, | ||
2075 | intel_sub_group_avc_ime_payload_t payload, | ||
2076 | intel_sub_group_avc_ime_dual_reference_streamin_t streamin_components); | ||
2077 | +#endif | ||
2078 | |||
2079 | intel_sub_group_avc_ime_single_reference_streamin_t __ovld | ||
2080 | intel_sub_group_avc_ime_get_single_reference_streamin( | ||
2081 | @@ -17053,6 +17096,7 @@ intel_sub_group_avc_ref_payload_t __ovld | ||
2082 | intel_sub_group_avc_ref_set_bilinear_filter_enable( | ||
2083 | intel_sub_group_avc_ref_payload_t payload); | ||
2084 | |||
2085 | +#if defined(__opencl_c_images) | ||
2086 | intel_sub_group_avc_ref_result_t __ovld | ||
2087 | intel_sub_group_avc_ref_evaluate_with_single_reference( | ||
2088 | read_only image2d_t src_image, read_only image2d_t ref_image, | ||
2089 | @@ -17071,6 +17115,7 @@ intel_sub_group_avc_ref_evaluate_with_multi_reference( | ||
2090 | read_only image2d_t src_image, uint packed_reference_ids, | ||
2091 | uchar packed_reference_field_polarities, sampler_t vme_media_sampler, | ||
2092 | intel_sub_group_avc_ref_payload_t payload); | ||
2093 | +#endif //defined(__opencl_c_images) | ||
2094 | |||
2095 | // SIC built-in functions | ||
2096 | intel_sub_group_avc_sic_payload_t __ovld | ||
2097 | @@ -17121,6 +17166,7 @@ intel_sub_group_avc_sic_set_block_based_raw_skip_sad( | ||
2098 | uchar block_based_skip_type, | ||
2099 | intel_sub_group_avc_sic_payload_t payload); | ||
2100 | |||
2101 | +#if defined(__opencl_c_images) | ||
2102 | intel_sub_group_avc_sic_result_t __ovld | ||
2103 | intel_sub_group_avc_sic_evaluate_ipe( | ||
2104 | read_only image2d_t src_image, sampler_t vme_media_sampler, | ||
2105 | @@ -17143,6 +17189,7 @@ intel_sub_group_avc_sic_evaluate_with_multi_reference( | ||
2106 | read_only image2d_t src_image, uint packed_reference_ids, | ||
2107 | uchar packed_reference_field_polarities, sampler_t vme_media_sampler, | ||
2108 | intel_sub_group_avc_sic_payload_t payload); | ||
2109 | +#endif //defined(__opencl_c_images) | ||
2110 | |||
2111 | uchar __ovld intel_sub_group_avc_sic_get_ipe_luma_shape( | ||
2112 | intel_sub_group_avc_sic_result_t result); | ||
2113 | @@ -17529,31 +17576,23 @@ uint16 __ovld amd_sadw(uint16 src0, uint16 src1, uint16 src2); | ||
2114 | #endif // cl_amd_media_ops2 | ||
2115 | |||
2116 | #if defined(cl_arm_integer_dot_product_int8) | ||
2117 | -#pragma OPENCL EXTENSION cl_arm_integer_dot_product_int8 : begin | ||
2118 | uint __ovld arm_dot(uchar4 a, uchar4 b); | ||
2119 | int __ovld arm_dot(char4 a, char4 b); | ||
2120 | -#pragma OPENCL EXTENSION cl_arm_integer_dot_product_int8 : end | ||
2121 | #endif // defined(cl_arm_integer_dot_product_int8) | ||
2122 | |||
2123 | #if defined(cl_arm_integer_dot_product_accumulate_int8) | ||
2124 | -#pragma OPENCL EXTENSION cl_arm_integer_dot_product_accumulate_int8 : begin | ||
2125 | uint __ovld arm_dot_acc(uchar4 a, uchar4 b, uint c); | ||
2126 | int __ovld arm_dot_acc(char4 a, char4 b, int c); | ||
2127 | -#pragma OPENCL EXTENSION cl_arm_integer_dot_product_accumulate_int8 : end | ||
2128 | #endif // defined(cl_arm_integer_dot_product_accumulate_int8) | ||
2129 | |||
2130 | #if defined(cl_arm_integer_dot_product_accumulate_int16) | ||
2131 | -#pragma OPENCL EXTENSION cl_arm_integer_dot_product_accumulate_int16 : begin | ||
2132 | uint __ovld arm_dot_acc(ushort2 a, ushort2 b, uint c); | ||
2133 | int __ovld arm_dot_acc(short2 a, short2 b, int c); | ||
2134 | -#pragma OPENCL EXTENSION cl_arm_integer_dot_product_accumulate_int16 : end | ||
2135 | #endif // defined(cl_arm_integer_dot_product_accumulate_int16) | ||
2136 | |||
2137 | #if defined(cl_arm_integer_dot_product_accumulate_saturate_int8) | ||
2138 | -#pragma OPENCL EXTENSION cl_arm_integer_dot_product_accumulate_saturate_int8 : begin | ||
2139 | uint __ovld arm_dot_acc_sat(uchar4 a, uchar4 b, uint c); | ||
2140 | int __ovld arm_dot_acc_sat(char4 a, char4 b, int c); | ||
2141 | -#pragma OPENCL EXTENSION cl_arm_integer_dot_product_accumulate_saturate_int8 : end | ||
2142 | #endif // defined(cl_arm_integer_dot_product_accumulate_saturate_int8) | ||
2143 | |||
2144 | // Disable any extensions we may have enabled previously. | ||
2145 | diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp | ||
2146 | index 347d992b1643..c489c8c75623 100644 | ||
2147 | --- a/clang/lib/Parse/ParseDecl.cpp | ||
2148 | +++ b/clang/lib/Parse/ParseDecl.cpp | ||
2149 | @@ -3631,8 +3631,8 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, | ||
2150 | // C++ for OpenCL does not allow virtual function qualifier, to avoid | ||
2151 | // function pointers restricted in OpenCL v2.0 s6.9.a. | ||
2152 | if (getLangOpts().OpenCLCPlusPlus && | ||
2153 | - !getActions().getOpenCLOptions().isEnabled( | ||
2154 | - "__cl_clang_function_pointers")) { | ||
2155 | + !getActions().getOpenCLOptions().isAvailableOption( | ||
2156 | + "__cl_clang_function_pointers", getLangOpts())) { | ||
2157 | DiagID = diag::err_openclcxx_virtual_function; | ||
2158 | PrevSpec = Tok.getIdentifierInfo()->getNameStart(); | ||
2159 | isInvalid = true; | ||
2160 | @@ -4002,8 +4002,9 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, | ||
2161 | case tok::kw___generic: | ||
2162 | // generic address space is introduced only in OpenCL v2.0 | ||
2163 | // see OpenCL C Spec v2.0 s6.5.5 | ||
2164 | - if (Actions.getLangOpts().OpenCLVersion < 200 && | ||
2165 | - !Actions.getLangOpts().OpenCLCPlusPlus) { | ||
2166 | + // OpenCL v3.0 introduces __opencl_c_generic_address_space | ||
2167 | + // feature macro to indicate if generic address space is supported | ||
2168 | + if (!Actions.getLangOpts().OpenCLGenericAddressSpace) { | ||
2169 | DiagID = diag::err_opencl_unknown_type_specifier; | ||
2170 | PrevSpec = Tok.getIdentifierInfo()->getNameStart(); | ||
2171 | isInvalid = true; | ||
2172 | @@ -5059,8 +5060,7 @@ bool Parser::isDeclarationSpecifier(bool DisambiguatingWithExpression) { | ||
2173 | default: return false; | ||
2174 | |||
2175 | case tok::kw_pipe: | ||
2176 | - return (getLangOpts().OpenCL && getLangOpts().OpenCLVersion >= 200) || | ||
2177 | - getLangOpts().OpenCLCPlusPlus; | ||
2178 | + return getLangOpts().OpenCLPipe; | ||
2179 | |||
2180 | case tok::identifier: // foo::bar | ||
2181 | // Unfortunate hack to support "Class.factoryMethod" notation. | ||
2182 | @@ -5587,9 +5587,7 @@ static bool isPtrOperatorToken(tok::TokenKind Kind, const LangOptions &Lang, | ||
2183 | DeclaratorContext TheContext) { | ||
2184 | if (Kind == tok::star || Kind == tok::caret) | ||
2185 | return true; | ||
2186 | - | ||
2187 | - if (Kind == tok::kw_pipe && | ||
2188 | - ((Lang.OpenCL && Lang.OpenCLVersion >= 200) || Lang.OpenCLCPlusPlus)) | ||
2189 | + if (Kind == tok::kw_pipe && Lang.OpenCLPipe) | ||
2190 | return true; | ||
2191 | |||
2192 | if (!Lang.CPlusPlus) | ||
2193 | diff --git a/clang/lib/Parse/ParsePragma.cpp b/clang/lib/Parse/ParsePragma.cpp | ||
2194 | index f9b852826775..948e04eafa41 100644 | ||
2195 | --- a/clang/lib/Parse/ParsePragma.cpp | ||
2196 | +++ b/clang/lib/Parse/ParsePragma.cpp | ||
2197 | @@ -771,22 +771,21 @@ void Parser::HandlePragmaOpenCLExtension() { | ||
2198 | // overriding all previously issued extension directives, but only if the | ||
2199 | // behavior is set to disable." | ||
2200 | if (Name == "all") { | ||
2201 | - if (State == Disable) { | ||
2202 | + if (State == Disable) | ||
2203 | Opt.disableAll(); | ||
2204 | - Opt.enableSupportedCore(getLangOpts()); | ||
2205 | - } else { | ||
2206 | + else | ||
2207 | PP.Diag(NameLoc, diag::warn_pragma_expected_predicate) << 1; | ||
2208 | - } | ||
2209 | } else if (State == Begin) { | ||
2210 | if (!Opt.isKnown(Name) || !Opt.isSupported(Name, getLangOpts())) { | ||
2211 | Opt.support(Name); | ||
2212 | + // FIXME: Default behavior of the extension pragma is not defined. | ||
2213 | + // Therefore, it should never be added by default. | ||
2214 | + Opt.acceptsPragma(Name); | ||
2215 | } | ||
2216 | - Actions.setCurrentOpenCLExtension(Name); | ||
2217 | } else if (State == End) { | ||
2218 | - if (Name != Actions.getCurrentOpenCLExtension()) | ||
2219 | - PP.Diag(NameLoc, diag::warn_pragma_begin_end_mismatch); | ||
2220 | - Actions.setCurrentOpenCLExtension(""); | ||
2221 | - } else if (!Opt.isKnown(Name)) | ||
2222 | + // There is no behavior for this directive. We only accept this for | ||
2223 | + // backward compatibility. | ||
2224 | + } else if (!Opt.isKnown(Name) || !Opt.isWithPragma(Name)) | ||
2225 | PP.Diag(NameLoc, diag::warn_pragma_unknown_extension) << Ident; | ||
2226 | else if (Opt.isSupportedExtension(Name, getLangOpts())) | ||
2227 | Opt.enable(Name, State == Enable); | ||
2228 | diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp | ||
2229 | index 9b0f921b4269..b3b02f8d266a 100644 | ||
2230 | --- a/clang/lib/Parse/Parser.cpp | ||
2231 | +++ b/clang/lib/Parse/Parser.cpp | ||
2232 | @@ -1079,8 +1079,6 @@ Parser::ParseDeclOrFunctionDefInternal(ParsedAttributesWithRange &attrs, | ||
2233 | Decl *TheDecl = Actions.ParsedFreeStandingDeclSpec(getCurScope(), AS_none, | ||
2234 | DS, AnonRecord); | ||
2235 | DS.complete(TheDecl); | ||
2236 | - if (getLangOpts().OpenCL) | ||
2237 | - Actions.setCurrentOpenCLExtensionForDecl(TheDecl); | ||
2238 | if (AnonRecord) { | ||
2239 | Decl* decls[] = {AnonRecord, TheDecl}; | ||
2240 | return Actions.BuildDeclaratorGroup(decls); | ||
2241 | diff --git a/clang/lib/Sema/DeclSpec.cpp b/clang/lib/Sema/DeclSpec.cpp | ||
2242 | index da42db3e8f7b..f60708d7dc01 100644 | ||
2243 | --- a/clang/lib/Sema/DeclSpec.cpp | ||
2244 | +++ b/clang/lib/Sema/DeclSpec.cpp | ||
2245 | @@ -625,7 +625,8 @@ bool DeclSpec::SetStorageClassSpec(Sema &S, SCS SC, SourceLocation Loc, | ||
2246 | // OpenCL v1.2 s6.8 changes this to "The auto and register storage-class | ||
2247 | // specifiers are not supported." | ||
2248 | if (S.getLangOpts().OpenCL && | ||
2249 | - !S.getOpenCLOptions().isEnabled("cl_clang_storage_class_specifiers")) { | ||
2250 | + !S.getOpenCLOptions().isAvailableOption( | ||
2251 | + "cl_clang_storage_class_specifiers", S.getLangOpts())) { | ||
2252 | switch (SC) { | ||
2253 | case SCS_extern: | ||
2254 | case SCS_private_extern: | ||
2255 | diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp | ||
2256 | index a91291c7af38..95ba22ddf2a7 100644 | ||
2257 | --- a/clang/lib/Sema/Sema.cpp | ||
2258 | +++ b/clang/lib/Sema/Sema.cpp | ||
2259 | @@ -299,7 +299,6 @@ void Sema::Initialize() { | ||
2260 | if (getLangOpts().OpenCL) { | ||
2261 | getOpenCLOptions().addSupport( | ||
2262 | Context.getTargetInfo().getSupportedOpenCLOpts(), getLangOpts()); | ||
2263 | - getOpenCLOptions().enableSupportedCore(getLangOpts()); | ||
2264 | addImplicitTypedef("sampler_t", Context.OCLSamplerTy); | ||
2265 | addImplicitTypedef("event_t", Context.OCLEventTy); | ||
2266 | if (getLangOpts().OpenCLCPlusPlus || getLangOpts().OpenCLVersion >= 200) { | ||
2267 | @@ -309,28 +308,13 @@ void Sema::Initialize() { | ||
2268 | addImplicitTypedef("atomic_int", Context.getAtomicType(Context.IntTy)); | ||
2269 | addImplicitTypedef("atomic_uint", | ||
2270 | Context.getAtomicType(Context.UnsignedIntTy)); | ||
2271 | - auto AtomicLongT = Context.getAtomicType(Context.LongTy); | ||
2272 | - addImplicitTypedef("atomic_long", AtomicLongT); | ||
2273 | - auto AtomicULongT = Context.getAtomicType(Context.UnsignedLongTy); | ||
2274 | - addImplicitTypedef("atomic_ulong", AtomicULongT); | ||
2275 | auto AtomicHalfT = Context.getAtomicType(Context.HalfTy); | ||
2276 | addImplicitTypedef("atomic_half", AtomicHalfT); | ||
2277 | - setOpenCLExtensionForType(AtomicHalfT, "cl_khr_fp16"); | ||
2278 | addImplicitTypedef("atomic_float", | ||
2279 | Context.getAtomicType(Context.FloatTy)); | ||
2280 | - auto AtomicDoubleT = Context.getAtomicType(Context.DoubleTy); | ||
2281 | - addImplicitTypedef("atomic_double", AtomicDoubleT); | ||
2282 | // OpenCLC v2.0, s6.13.11.6 requires that atomic_flag is implemented as | ||
2283 | // 32-bit integer and OpenCLC v2.0, s6.1.1 int is always 32-bit wide. | ||
2284 | addImplicitTypedef("atomic_flag", Context.getAtomicType(Context.IntTy)); | ||
2285 | - auto AtomicIntPtrT = Context.getAtomicType(Context.getIntPtrType()); | ||
2286 | - addImplicitTypedef("atomic_intptr_t", AtomicIntPtrT); | ||
2287 | - auto AtomicUIntPtrT = Context.getAtomicType(Context.getUIntPtrType()); | ||
2288 | - addImplicitTypedef("atomic_uintptr_t", AtomicUIntPtrT); | ||
2289 | - auto AtomicSizeT = Context.getAtomicType(Context.getSizeType()); | ||
2290 | - addImplicitTypedef("atomic_size_t", AtomicSizeT); | ||
2291 | - auto AtomicPtrDiffT = Context.getAtomicType(Context.getPointerDiffType()); | ||
2292 | - addImplicitTypedef("atomic_ptrdiff_t", AtomicPtrDiffT); | ||
2293 | |||
2294 | // OpenCL v2.0 s6.13.11.6: | ||
2295 | // - The atomic_long and atomic_ulong types are supported if the | ||
2296 | @@ -343,31 +327,47 @@ void Sema::Initialize() { | ||
2297 | // atomic_intptr_t, atomic_uintptr_t, atomic_size_t and | ||
2298 | // atomic_ptrdiff_t are supported if the cl_khr_int64_base_atomics and | ||
2299 | // cl_khr_int64_extended_atomics extensions are supported. | ||
2300 | - std::vector<QualType> Atomic64BitTypes; | ||
2301 | - Atomic64BitTypes.push_back(AtomicLongT); | ||
2302 | - Atomic64BitTypes.push_back(AtomicULongT); | ||
2303 | - Atomic64BitTypes.push_back(AtomicDoubleT); | ||
2304 | - if (Context.getTypeSize(AtomicSizeT) == 64) { | ||
2305 | - Atomic64BitTypes.push_back(AtomicSizeT); | ||
2306 | - Atomic64BitTypes.push_back(AtomicIntPtrT); | ||
2307 | - Atomic64BitTypes.push_back(AtomicUIntPtrT); | ||
2308 | - Atomic64BitTypes.push_back(AtomicPtrDiffT); | ||
2309 | + auto AddPointerSizeDependentTypes = [&]() { | ||
2310 | + auto AtomicSizeT = Context.getAtomicType(Context.getSizeType()); | ||
2311 | + auto AtomicIntPtrT = Context.getAtomicType(Context.getIntPtrType()); | ||
2312 | + auto AtomicUIntPtrT = Context.getAtomicType(Context.getUIntPtrType()); | ||
2313 | + auto AtomicPtrDiffT = | ||
2314 | + Context.getAtomicType(Context.getPointerDiffType()); | ||
2315 | + addImplicitTypedef("atomic_size_t", AtomicSizeT); | ||
2316 | + addImplicitTypedef("atomic_intptr_t", AtomicIntPtrT); | ||
2317 | + addImplicitTypedef("atomic_uintptr_t", AtomicUIntPtrT); | ||
2318 | + addImplicitTypedef("atomic_ptrdiff_t", AtomicPtrDiffT); | ||
2319 | + }; | ||
2320 | + | ||
2321 | + if (Context.getTypeSize(Context.getSizeType()) == 32) { | ||
2322 | + AddPointerSizeDependentTypes(); | ||
2323 | } | ||
2324 | - for (auto &I : Atomic64BitTypes) | ||
2325 | - setOpenCLExtensionForType(I, | ||
2326 | - "cl_khr_int64_base_atomics cl_khr_int64_extended_atomics"); | ||
2327 | |||
2328 | - setOpenCLExtensionForType(AtomicDoubleT, "cl_khr_fp64"); | ||
2329 | + std::vector<QualType> Atomic64BitTypes; | ||
2330 | + if (getOpenCLOptions().isSupported("cl_khr_int64_base_atomics", | ||
2331 | + getLangOpts()) && | ||
2332 | + getOpenCLOptions().isSupported("cl_khr_int64_extended_atomics", | ||
2333 | + getLangOpts())) { | ||
2334 | + if (getOpenCLOptions().isSupported("cl_khr_fp64", getLangOpts())) { | ||
2335 | + auto AtomicDoubleT = Context.getAtomicType(Context.DoubleTy); | ||
2336 | + addImplicitTypedef("atomic_double", AtomicDoubleT); | ||
2337 | + Atomic64BitTypes.push_back(AtomicDoubleT); | ||
2338 | + } | ||
2339 | + auto AtomicLongT = Context.getAtomicType(Context.LongTy); | ||
2340 | + auto AtomicULongT = Context.getAtomicType(Context.UnsignedLongTy); | ||
2341 | + | ||
2342 | + addImplicitTypedef("atomic_long", AtomicLongT); | ||
2343 | + addImplicitTypedef("atomic_ulong", AtomicULongT); | ||
2344 | + if (Context.getTypeSize(Context.getSizeType()) == 64) { | ||
2345 | + AddPointerSizeDependentTypes(); | ||
2346 | + } | ||
2347 | + } | ||
2348 | } | ||
2349 | |||
2350 | - setOpenCLExtensionForType(Context.DoubleTy, "cl_khr_fp64"); | ||
2351 | - | ||
2352 | -#define GENERIC_IMAGE_TYPE_EXT(Type, Id, Ext) \ | ||
2353 | - setOpenCLExtensionForType(Context.Id, Ext); | ||
2354 | -#include "clang/Basic/OpenCLImageTypes.def" | ||
2355 | -#define EXT_OPAQUE_TYPE(ExtType, Id, Ext) \ | ||
2356 | - addImplicitTypedef(#ExtType, Context.Id##Ty); \ | ||
2357 | - setOpenCLExtensionForType(Context.Id##Ty, #Ext); | ||
2358 | +#define EXT_OPAQUE_TYPE(ExtType, Id, Ext) \ | ||
2359 | + if (getOpenCLOptions().isSupported(#Ext, getLangOpts())) { \ | ||
2360 | + addImplicitTypedef(#ExtType, Context.Id##Ty); \ | ||
2361 | + } | ||
2362 | #include "clang/Basic/OpenCLExtensionTypes.def" | ||
2363 | } | ||
2364 | |||
2365 | @@ -2451,114 +2451,3 @@ const llvm::MapVector<FieldDecl *, Sema::DeleteLocs> & | ||
2366 | Sema::getMismatchingDeleteExpressions() const { | ||
2367 | return DeleteExprs; | ||
2368 | } | ||
2369 | - | ||
2370 | -void Sema::setOpenCLExtensionForType(QualType T, llvm::StringRef ExtStr) { | ||
2371 | - if (ExtStr.empty()) | ||
2372 | - return; | ||
2373 | - llvm::SmallVector<StringRef, 1> Exts; | ||
2374 | - ExtStr.split(Exts, " ", /* limit */ -1, /* keep empty */ false); | ||
2375 | - auto CanT = T.getCanonicalType().getTypePtr(); | ||
2376 | - for (auto &I : Exts) | ||
2377 | - OpenCLTypeExtMap[CanT].insert(I.str()); | ||
2378 | -} | ||
2379 | - | ||
2380 | -void Sema::setOpenCLExtensionForDecl(Decl *FD, StringRef ExtStr) { | ||
2381 | - llvm::SmallVector<StringRef, 1> Exts; | ||
2382 | - ExtStr.split(Exts, " ", /* limit */ -1, /* keep empty */ false); | ||
2383 | - if (Exts.empty()) | ||
2384 | - return; | ||
2385 | - for (auto &I : Exts) | ||
2386 | - OpenCLDeclExtMap[FD].insert(I.str()); | ||
2387 | -} | ||
2388 | - | ||
2389 | -void Sema::setCurrentOpenCLExtensionForType(QualType T) { | ||
2390 | - if (CurrOpenCLExtension.empty()) | ||
2391 | - return; | ||
2392 | - setOpenCLExtensionForType(T, CurrOpenCLExtension); | ||
2393 | -} | ||
2394 | - | ||
2395 | -void Sema::setCurrentOpenCLExtensionForDecl(Decl *D) { | ||
2396 | - if (CurrOpenCLExtension.empty()) | ||
2397 | - return; | ||
2398 | - setOpenCLExtensionForDecl(D, CurrOpenCLExtension); | ||
2399 | -} | ||
2400 | - | ||
2401 | -std::string Sema::getOpenCLExtensionsFromDeclExtMap(FunctionDecl *FD) { | ||
2402 | - if (!OpenCLDeclExtMap.empty()) | ||
2403 | - return getOpenCLExtensionsFromExtMap(FD, OpenCLDeclExtMap); | ||
2404 | - | ||
2405 | - return ""; | ||
2406 | -} | ||
2407 | - | ||
2408 | -std::string Sema::getOpenCLExtensionsFromTypeExtMap(FunctionType *FT) { | ||
2409 | - if (!OpenCLTypeExtMap.empty()) | ||
2410 | - return getOpenCLExtensionsFromExtMap(FT, OpenCLTypeExtMap); | ||
2411 | - | ||
2412 | - return ""; | ||
2413 | -} | ||
2414 | - | ||
2415 | -template <typename T, typename MapT> | ||
2416 | -std::string Sema::getOpenCLExtensionsFromExtMap(T *FDT, MapT &Map) { | ||
2417 | - auto Loc = Map.find(FDT); | ||
2418 | - return llvm::join(Loc->second, " "); | ||
2419 | -} | ||
2420 | - | ||
2421 | -bool Sema::isOpenCLDisabledDecl(Decl *FD) { | ||
2422 | - auto Loc = OpenCLDeclExtMap.find(FD); | ||
2423 | - if (Loc == OpenCLDeclExtMap.end()) | ||
2424 | - return false; | ||
2425 | - for (auto &I : Loc->second) { | ||
2426 | - if (!getOpenCLOptions().isEnabled(I)) | ||
2427 | - return true; | ||
2428 | - } | ||
2429 | - return false; | ||
2430 | -} | ||
2431 | - | ||
2432 | -template <typename T, typename DiagLocT, typename DiagInfoT, typename MapT> | ||
2433 | -bool Sema::checkOpenCLDisabledTypeOrDecl(T D, DiagLocT DiagLoc, | ||
2434 | - DiagInfoT DiagInfo, MapT &Map, | ||
2435 | - unsigned Selector, | ||
2436 | - SourceRange SrcRange) { | ||
2437 | - auto Loc = Map.find(D); | ||
2438 | - if (Loc == Map.end()) | ||
2439 | - return false; | ||
2440 | - bool Disabled = false; | ||
2441 | - for (auto &I : Loc->second) { | ||
2442 | - if (I != CurrOpenCLExtension && !getOpenCLOptions().isEnabled(I)) { | ||
2443 | - Diag(DiagLoc, diag::err_opencl_requires_extension) << Selector << DiagInfo | ||
2444 | - << I << SrcRange; | ||
2445 | - Disabled = true; | ||
2446 | - } | ||
2447 | - } | ||
2448 | - return Disabled; | ||
2449 | -} | ||
2450 | - | ||
2451 | -bool Sema::checkOpenCLDisabledTypeDeclSpec(const DeclSpec &DS, QualType QT) { | ||
2452 | - // Check extensions for declared types. | ||
2453 | - Decl *Decl = nullptr; | ||
2454 | - if (auto TypedefT = dyn_cast<TypedefType>(QT.getTypePtr())) | ||
2455 | - Decl = TypedefT->getDecl(); | ||
2456 | - if (auto TagT = dyn_cast<TagType>(QT.getCanonicalType().getTypePtr())) | ||
2457 | - Decl = TagT->getDecl(); | ||
2458 | - auto Loc = DS.getTypeSpecTypeLoc(); | ||
2459 | - | ||
2460 | - // Check extensions for vector types. | ||
2461 | - // e.g. double4 is not allowed when cl_khr_fp64 is absent. | ||
2462 | - if (QT->isExtVectorType()) { | ||
2463 | - auto TypePtr = QT->castAs<ExtVectorType>()->getElementType().getTypePtr(); | ||
2464 | - return checkOpenCLDisabledTypeOrDecl(TypePtr, Loc, QT, OpenCLTypeExtMap); | ||
2465 | - } | ||
2466 | - | ||
2467 | - if (checkOpenCLDisabledTypeOrDecl(Decl, Loc, QT, OpenCLDeclExtMap)) | ||
2468 | - return true; | ||
2469 | - | ||
2470 | - // Check extensions for builtin types. | ||
2471 | - return checkOpenCLDisabledTypeOrDecl(QT.getCanonicalType().getTypePtr(), Loc, | ||
2472 | - QT, OpenCLTypeExtMap); | ||
2473 | -} | ||
2474 | - | ||
2475 | -bool Sema::checkOpenCLDisabledDecl(const NamedDecl &D, const Expr &E) { | ||
2476 | - IdentifierInfo *FnName = D.getIdentifier(); | ||
2477 | - return checkOpenCLDisabledTypeOrDecl(&D, E.getBeginLoc(), FnName, | ||
2478 | - OpenCLDeclExtMap, 1, D.getSourceRange()); | ||
2479 | -} | ||
2480 | diff --git a/clang/lib/Sema/SemaCast.cpp b/clang/lib/Sema/SemaCast.cpp | ||
2481 | index 671820afd485..22ec2c7ed8bb 100644 | ||
2482 | --- a/clang/lib/Sema/SemaCast.cpp | ||
2483 | +++ b/clang/lib/Sema/SemaCast.cpp | ||
2484 | @@ -2916,8 +2916,8 @@ void CastOperation::CheckCStyleCast() { | ||
2485 | } | ||
2486 | } | ||
2487 | |||
2488 | - if (Self.getLangOpts().OpenCL && | ||
2489 | - !Self.getOpenCLOptions().isEnabled("cl_khr_fp16")) { | ||
2490 | + if (Self.getLangOpts().OpenCL && !Self.getOpenCLOptions().isAvailableOption( | ||
2491 | + "cl_khr_fp16", Self.getLangOpts())) { | ||
2492 | if (DestType->isHalfType()) { | ||
2493 | Self.Diag(SrcExpr.get()->getBeginLoc(), diag::err_opencl_cast_to_half) | ||
2494 | << DestType << SrcExpr.get()->getSourceRange(); | ||
2495 | diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp | ||
2496 | index 2b55712d44c2..b35ac5af9d75 100644 | ||
2497 | --- a/clang/lib/Sema/SemaChecking.cpp | ||
2498 | +++ b/clang/lib/Sema/SemaChecking.cpp | ||
2499 | @@ -837,7 +837,8 @@ static bool checkOpenCLBlockArgs(Sema &S, Expr *BlockArg) { | ||
2500 | } | ||
2501 | |||
2502 | static bool checkOpenCLSubgroupExt(Sema &S, CallExpr *Call) { | ||
2503 | - if (!S.getOpenCLOptions().isEnabled("cl_khr_subgroups")) { | ||
2504 | + if (!S.getOpenCLOptions().isAvailableOption("cl_khr_subgroups", | ||
2505 | + S.getLangOpts())) { | ||
2506 | S.Diag(Call->getBeginLoc(), diag::err_opencl_requires_extension) | ||
2507 | << 1 << Call->getDirectCallee() << "cl_khr_subgroups"; | ||
2508 | return true; | ||
2509 | diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp | ||
2510 | index 1f7ab49ccdd7..420ba7a5498f 100644 | ||
2511 | --- a/clang/lib/Sema/SemaDecl.cpp | ||
2512 | +++ b/clang/lib/Sema/SemaDecl.cpp | ||
2513 | @@ -5559,9 +5559,6 @@ Decl *Sema::ActOnDeclarator(Scope *S, Declarator &D) { | ||
2514 | Dcl && Dcl->getDeclContext()->isFileContext()) | ||
2515 | Dcl->setTopLevelDeclInObjCContainer(); | ||
2516 | |||
2517 | - if (getLangOpts().OpenCL) | ||
2518 | - setCurrentOpenCLExtensionForDecl(Dcl); | ||
2519 | - | ||
2520 | return Dcl; | ||
2521 | } | ||
2522 | |||
2523 | @@ -6341,7 +6338,11 @@ void Sema::deduceOpenCLAddressSpace(ValueDecl *Decl) { | ||
2524 | if (Type->isSamplerT() || Type->isVoidType()) | ||
2525 | return; | ||
2526 | LangAS ImplAS = LangAS::opencl_private; | ||
2527 | - if ((getLangOpts().OpenCLCPlusPlus || getLangOpts().OpenCLVersion >= 200) && | ||
2528 | + // OpenCL C v3.0 s6.7.8 - For OpenCL C 2.0 or with the | ||
2529 | + // __opencl_c_program_scope_global_variables feature, the address space | ||
2530 | + // for a variable at program scope or a static or extern variable inside | ||
2531 | + // a function are inferred to be __global. | ||
2532 | + if (getOpenCLOptions().areProgramScopeVariablesSupported(getLangOpts()) && | ||
2533 | Var->hasGlobalStorage()) | ||
2534 | ImplAS = LangAS::opencl_global; | ||
2535 | // If the original type from a decayed type is an array type and that array | ||
2536 | @@ -6757,7 +6758,8 @@ static bool diagnoseOpenCLTypes(Scope *S, Sema &Se, Declarator &D, | ||
2537 | } | ||
2538 | |||
2539 | // OpenCL v1.0 s6.8.a.3: Pointers to functions are not allowed. | ||
2540 | - if (!Se.getOpenCLOptions().isEnabled("__cl_clang_function_pointers")) { | ||
2541 | + if (!Se.getOpenCLOptions().isAvailableOption("__cl_clang_function_pointers", | ||
2542 | + Se.getLangOpts())) { | ||
2543 | QualType NR = R; | ||
2544 | while (NR->isPointerType() || NR->isMemberFunctionPointerType()) { | ||
2545 | if (NR->isFunctionPointerType() || NR->isMemberFunctionPointerType()) { | ||
2546 | @@ -6769,7 +6771,8 @@ static bool diagnoseOpenCLTypes(Scope *S, Sema &Se, Declarator &D, | ||
2547 | } | ||
2548 | } | ||
2549 | |||
2550 | - if (!Se.getOpenCLOptions().isEnabled("cl_khr_fp16")) { | ||
2551 | + if (!Se.getOpenCLOptions().isAvailableOption("cl_khr_fp16", | ||
2552 | + Se.getLangOpts())) { | ||
2553 | // OpenCL v1.2 s6.1.1.1: reject declaring variables of the half and | ||
2554 | // half array type (unless the cl_khr_fp16 extension is enabled). | ||
2555 | if (Se.Context.getBaseElementType(R)->isHalfType()) { | ||
2556 | @@ -7878,7 +7881,8 @@ void Sema::CheckVariableDeclarationType(VarDecl *NewVD) { | ||
2557 | // OpenCL v1.2 s6.8 - The static qualifier is valid only in program | ||
2558 | // scope. | ||
2559 | if (getLangOpts().OpenCLVersion == 120 && | ||
2560 | - !getOpenCLOptions().isEnabled("cl_clang_storage_class_specifiers") && | ||
2561 | + !getOpenCLOptions().isAvailableOption("cl_clang_storage_class_specifiers", | ||
2562 | + getLangOpts()) && | ||
2563 | NewVD->isStaticLocal()) { | ||
2564 | Diag(NewVD->getLocation(), diag::err_static_function_scope); | ||
2565 | NewVD->setInvalidDecl(); | ||
2566 | @@ -7907,23 +7911,16 @@ void Sema::CheckVariableDeclarationType(VarDecl *NewVD) { | ||
2567 | return; | ||
2568 | } | ||
2569 | } | ||
2570 | - // OpenCL C v1.2 s6.5 - All program scope variables must be declared in the | ||
2571 | - // __constant address space. | ||
2572 | - // OpenCL C v2.0 s6.5.1 - Variables defined at program scope and static | ||
2573 | - // variables inside a function can also be declared in the global | ||
2574 | - // address space. | ||
2575 | - // C++ for OpenCL inherits rule from OpenCL C v2.0. | ||
2576 | // FIXME: Adding local AS in C++ for OpenCL might make sense. | ||
2577 | if (NewVD->isFileVarDecl() || NewVD->isStaticLocal() || | ||
2578 | NewVD->hasExternalStorage()) { | ||
2579 | - if (!T->isSamplerT() && | ||
2580 | - !T->isDependentType() && | ||
2581 | + if (!T->isSamplerT() && !T->isDependentType() && | ||
2582 | !(T.getAddressSpace() == LangAS::opencl_constant || | ||
2583 | (T.getAddressSpace() == LangAS::opencl_global && | ||
2584 | - (getLangOpts().OpenCLVersion == 200 || | ||
2585 | - getLangOpts().OpenCLCPlusPlus)))) { | ||
2586 | + getOpenCLOptions().areProgramScopeVariablesSupported( | ||
2587 | + getLangOpts())))) { | ||
2588 | int Scope = NewVD->isStaticLocal() | NewVD->hasExternalStorage() << 1; | ||
2589 | - if (getLangOpts().OpenCLVersion == 200 || getLangOpts().OpenCLCPlusPlus) | ||
2590 | + if (getOpenCLOptions().areProgramScopeVariablesSupported(getLangOpts())) | ||
2591 | Diag(NewVD->getLocation(), diag::err_opencl_global_invalid_addr_space) | ||
2592 | << Scope << "global or constant"; | ||
2593 | else | ||
2594 | @@ -8650,7 +8647,8 @@ static OpenCLParamType getOpenCLKernelParameterType(Sema &S, QualType PT) { | ||
2595 | // OpenCL extension spec v1.2 s9.5: | ||
2596 | // This extension adds support for half scalar and vector types as built-in | ||
2597 | // types that can be used for arithmetic operations, conversions etc. | ||
2598 | - if (!S.getOpenCLOptions().isEnabled("cl_khr_fp16") && PT->isHalfType()) | ||
2599 | + if (!S.getOpenCLOptions().isAvailableOption("cl_khr_fp16", S.getLangOpts()) && | ||
2600 | + PT->isHalfType()) | ||
2601 | return InvalidKernelParam; | ||
2602 | |||
2603 | if (PT->isRecordType()) | ||
2604 | diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp | ||
2605 | index 30d08b3d4ac0..a06fcfb8cc22 100644 | ||
2606 | --- a/clang/lib/Sema/SemaDeclAttr.cpp | ||
2607 | +++ b/clang/lib/Sema/SemaDeclAttr.cpp | ||
2608 | @@ -7308,16 +7308,21 @@ static void handleOpenCLAccessAttr(Sema &S, Decl *D, const ParsedAttr &AL) { | ||
2609 | } | ||
2610 | } | ||
2611 | |||
2612 | - // OpenCL v2.0 s6.6 - read_write can be used for image types to specify that an | ||
2613 | - // image object can be read and written. | ||
2614 | - // OpenCL v2.0 s6.13.6 - A kernel cannot read from and write to the same pipe | ||
2615 | - // object. Using the read_write (or __read_write) qualifier with the pipe | ||
2616 | - // qualifier is a compilation error. | ||
2617 | + // OpenCL v2.0 s6.6 - read_write can be used for image types to specify that | ||
2618 | + // an image object can be read and written. OpenCL v2.0 s6.13.6 - A kernel | ||
2619 | + // cannot read from and write to the same pipe object. Using the read_write | ||
2620 | + // (or __read_write) qualifier with the pipe qualifier is a compilation error. | ||
2621 | + // OpenCL v3.0 s6.8 - For OpenCL C 2.0, or with the | ||
2622 | + // __opencl_c_read_write_images feature, image objects specified as arguments | ||
2623 | + // to a kernel can additionally be declared to be read-write. | ||
2624 | if (const auto *PDecl = dyn_cast<ParmVarDecl>(D)) { | ||
2625 | const Type *DeclTy = PDecl->getType().getCanonicalType().getTypePtr(); | ||
2626 | if (AL.getAttrName()->getName().find("read_write") != StringRef::npos) { | ||
2627 | if ((!S.getLangOpts().OpenCLCPlusPlus && | ||
2628 | - S.getLangOpts().OpenCLVersion < 200) || | ||
2629 | + (S.getLangOpts().OpenCLVersion < 200) || | ||
2630 | + (S.getLangOpts().OpenCLVersion == 300 && | ||
2631 | + !S.getOpenCLOptions().isSupported("__opencl_c_read_write_images", | ||
2632 | + S.getLangOpts()))) || | ||
2633 | DeclTy->isPipeType()) { | ||
2634 | S.Diag(AL.getLoc(), diag::err_opencl_invalid_read_write) | ||
2635 | << AL << PDecl->getType() << DeclTy->isImageType(); | ||
2636 | diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp | ||
2637 | index ae8508d6c601..cc29938c5ea5 100644 | ||
2638 | --- a/clang/lib/Sema/SemaExpr.cpp | ||
2639 | +++ b/clang/lib/Sema/SemaExpr.cpp | ||
2640 | @@ -657,7 +657,8 @@ ExprResult Sema::DefaultLvalueConversion(Expr *E) { | ||
2641 | return E; | ||
2642 | |||
2643 | // OpenCL usually rejects direct accesses to values of 'half' type. | ||
2644 | - if (getLangOpts().OpenCL && !getOpenCLOptions().isEnabled("cl_khr_fp16") && | ||
2645 | + if (getLangOpts().OpenCL && | ||
2646 | + !getOpenCLOptions().isAvailableOption("cl_khr_fp16", getLangOpts()) && | ||
2647 | T->isHalfType()) { | ||
2648 | Diag(E->getExprLoc(), diag::err_opencl_half_load_store) | ||
2649 | << 0 << T; | ||
2650 | @@ -829,10 +830,10 @@ ExprResult Sema::DefaultArgumentPromotion(Expr *E) { | ||
2651 | if (BTy && (BTy->getKind() == BuiltinType::Half || | ||
2652 | BTy->getKind() == BuiltinType::Float)) { | ||
2653 | if (getLangOpts().OpenCL && | ||
2654 | - !getOpenCLOptions().isEnabled("cl_khr_fp64")) { | ||
2655 | - if (BTy->getKind() == BuiltinType::Half) { | ||
2656 | - E = ImpCastExprToType(E, Context.FloatTy, CK_FloatingCast).get(); | ||
2657 | - } | ||
2658 | + !getOpenCLOptions().isAvailableOption("cl_khr_fp64", getLangOpts())) { | ||
2659 | + if (BTy->getKind() == BuiltinType::Half) { | ||
2660 | + E = ImpCastExprToType(E, Context.FloatTy, CK_FloatingCast).get(); | ||
2661 | + } | ||
2662 | } else { | ||
2663 | E = ImpCastExprToType(E, Context.DoubleTy, CK_FloatingCast).get(); | ||
2664 | } | ||
2665 | @@ -3819,7 +3820,7 @@ ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) { | ||
2666 | } else if (Literal.isFloatingLiteral()) { | ||
2667 | QualType Ty; | ||
2668 | if (Literal.isHalf){ | ||
2669 | - if (getOpenCLOptions().isEnabled("cl_khr_fp16")) | ||
2670 | + if (getOpenCLOptions().isAvailableOption("cl_khr_fp16", getLangOpts())) | ||
2671 | Ty = Context.HalfTy; | ||
2672 | else { | ||
2673 | Diag(Tok.getLocation(), diag::err_half_const_requires_fp16); | ||
2674 | @@ -3843,10 +3844,11 @@ ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) { | ||
2675 | if (Ty->castAs<BuiltinType>()->getKind() != BuiltinType::Float) { | ||
2676 | Res = ImpCastExprToType(Res, Context.FloatTy, CK_FloatingCast).get(); | ||
2677 | } | ||
2678 | - } else if (getLangOpts().OpenCL && | ||
2679 | - !getOpenCLOptions().isEnabled("cl_khr_fp64")) { | ||
2680 | + } else if (getLangOpts().OpenCL && !getOpenCLOptions().isAvailableOption( | ||
2681 | + "cl_khr_fp64", getLangOpts())) { | ||
2682 | // Impose single-precision float type when cl_khr_fp64 is not enabled. | ||
2683 | - Diag(Tok.getLocation(), diag::warn_double_const_requires_fp64); | ||
2684 | + Diag(Tok.getLocation(), diag::warn_double_const_requires_fp64) | ||
2685 | + << (getLangOpts().OpenCLVersion >= 300); | ||
2686 | Res = ImpCastExprToType(Res, Context.FloatTy, CK_FloatingCast).get(); | ||
2687 | } | ||
2688 | } | ||
2689 | @@ -6468,9 +6470,6 @@ ExprResult Sema::BuildCallExpr(Scope *Scope, Expr *Fn, SourceLocation LParenLoc, | ||
2690 | FD, /*Complain=*/true, Fn->getBeginLoc())) | ||
2691 | return ExprError(); | ||
2692 | |||
2693 | - if (getLangOpts().OpenCL && checkOpenCLDisabledDecl(*FD, *Fn)) | ||
2694 | - return ExprError(); | ||
2695 | - | ||
2696 | checkDirectCallValidity(*this, Fn, FD, ArgExprs); | ||
2697 | } | ||
2698 | |||
2699 | @@ -12900,7 +12899,8 @@ QualType Sema::CheckAssignmentOperands(Expr *LHSExpr, ExprResult &RHS, | ||
2700 | // OpenCL v1.2 s6.1.1.1 p2: | ||
2701 | // The half data type can only be used to declare a pointer to a buffer that | ||
2702 | // contains half values | ||
2703 | - if (getLangOpts().OpenCL && !getOpenCLOptions().isEnabled("cl_khr_fp16") && | ||
2704 | + if (getLangOpts().OpenCL && | ||
2705 | + !getOpenCLOptions().isAvailableOption("cl_khr_fp16", getLangOpts()) && | ||
2706 | LHSType->isHalfType()) { | ||
2707 | Diag(Loc, diag::err_opencl_half_load_store) << 1 | ||
2708 | << LHSType.getUnqualifiedType(); | ||
2709 | diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp | ||
2710 | index f4493d84238d..0e4259bfce09 100644 | ||
2711 | --- a/clang/lib/Sema/SemaInit.cpp | ||
2712 | +++ b/clang/lib/Sema/SemaInit.cpp | ||
2713 | @@ -5572,8 +5572,8 @@ static bool TryOCLZeroOpaqueTypeInitialization(Sema &S, | ||
2714 | // We should allow zero initialization for all types defined in the | ||
2715 | // cl_intel_device_side_avc_motion_estimation extension, except | ||
2716 | // intel_sub_group_avc_mce_payload_t and intel_sub_group_avc_mce_result_t. | ||
2717 | - if (S.getOpenCLOptions().isEnabled( | ||
2718 | - "cl_intel_device_side_avc_motion_estimation") && | ||
2719 | + if (S.getOpenCLOptions().isAvailableOption( | ||
2720 | + "cl_intel_device_side_avc_motion_estimation", S.getLangOpts()) && | ||
2721 | DestType->isOCLIntelSubgroupAVCType()) { | ||
2722 | if (DestType->isOCLIntelSubgroupAVCMcePayloadType() || | ||
2723 | DestType->isOCLIntelSubgroupAVCMceResultType()) | ||
2724 | @@ -8758,8 +8758,8 @@ ExprResult InitializationSequence::Perform(Sema &S, | ||
2725 | unsigned AddressingMode = (0x0E & SamplerValue) >> 1; | ||
2726 | unsigned FilterMode = (0x30 & SamplerValue) >> 4; | ||
2727 | if (FilterMode != 1 && FilterMode != 2 && | ||
2728 | - !S.getOpenCLOptions().isEnabled( | ||
2729 | - "cl_intel_device_side_avc_motion_estimation")) | ||
2730 | + !S.getOpenCLOptions().isAvailableOption( | ||
2731 | + "cl_intel_device_side_avc_motion_estimation", S.getLangOpts())) | ||
2732 | S.Diag(Kind.getLocation(), | ||
2733 | diag::warn_sampler_initializer_invalid_bits) | ||
2734 | << "Filter Mode"; | ||
2735 | diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp | ||
2736 | index 29038ab9fe1c..12f58556c9dd 100644 | ||
2737 | --- a/clang/lib/Sema/SemaLookup.cpp | ||
2738 | +++ b/clang/lib/Sema/SemaLookup.cpp | ||
2739 | @@ -743,18 +743,6 @@ static void GetOpenCLBuiltinFctOverloads( | ||
2740 | } | ||
2741 | } | ||
2742 | |||
2743 | -/// Add extensions to the function declaration. | ||
2744 | -/// \param S (in/out) The Sema instance. | ||
2745 | -/// \param BIDecl (in) Description of the builtin. | ||
2746 | -/// \param FDecl (in/out) FunctionDecl instance. | ||
2747 | -static void AddOpenCLExtensions(Sema &S, const OpenCLBuiltinStruct &BIDecl, | ||
2748 | - FunctionDecl *FDecl) { | ||
2749 | - // Fetch extension associated with a function prototype. | ||
2750 | - StringRef E = FunctionExtensionTable[BIDecl.Extension]; | ||
2751 | - if (E != "") | ||
2752 | - S.setOpenCLExtensionForDecl(FDecl, E); | ||
2753 | -} | ||
2754 | - | ||
2755 | /// When trying to resolve a function name, if isOpenCLBuiltin() returns a | ||
2756 | /// non-null <Index, Len> pair, then the name is referencing an OpenCL | ||
2757 | /// builtin function. Add all candidate signatures to the LookUpResult. | ||
2758 | @@ -789,7 +777,13 @@ static void InsertOCLBuiltinDeclarationsFromTable(Sema &S, LookupResult &LR, | ||
2759 | if ((OpenCLBuiltin.MaxVersion != 0) && | ||
2760 | (OpenCLVersion >= OpenCLBuiltin.MaxVersion)) | ||
2761 | continue; | ||
2762 | - | ||
2763 | + | ||
2764 | + // Ignore this builtin function if it carries an extension macro that is | ||
2765 | + // not defined. This indicates that the extension is not supported by the | ||
2766 | + // target, so the builtin function should not be available. | ||
2767 | + StringRef Ext = FunctionExtensionTable[OpenCLBuiltin.Extension]; | ||
2768 | + if (!Ext.empty() && !S.getPreprocessor().isMacroDefined(Ext)) | ||
2769 | + continue; | ||
2770 | SmallVector<QualType, 1> RetTypes; | ||
2771 | SmallVector<SmallVector<QualType, 1>, 5> ArgTypes; | ||
2772 | |||
2773 | @@ -843,8 +837,6 @@ static void InsertOCLBuiltinDeclarationsFromTable(Sema &S, LookupResult &LR, | ||
2774 | if (!S.getLangOpts().OpenCLCPlusPlus) | ||
2775 | NewOpenCLBuiltin->addAttr(OverloadableAttr::CreateImplicit(Context)); | ||
2776 | |||
2777 | - AddOpenCLExtensions(S, OpenCLBuiltin, NewOpenCLBuiltin); | ||
2778 | - | ||
2779 | LR.addDecl(NewOpenCLBuiltin); | ||
2780 | } | ||
2781 | } | ||
2782 | diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp | ||
2783 | index 7fe7466725fa..05815bb6e38d 100644 | ||
2784 | --- a/clang/lib/Sema/SemaOverload.cpp | ||
2785 | +++ b/clang/lib/Sema/SemaOverload.cpp | ||
2786 | @@ -6479,12 +6479,6 @@ void Sema::AddOverloadCandidate( | ||
2787 | Candidate.DeductionFailure.Data = FailedAttr; | ||
2788 | return; | ||
2789 | } | ||
2790 | - | ||
2791 | - if (LangOpts.OpenCL && isOpenCLDisabledDecl(Function)) { | ||
2792 | - Candidate.Viable = false; | ||
2793 | - Candidate.FailureKind = ovl_fail_ext_disabled; | ||
2794 | - return; | ||
2795 | - } | ||
2796 | } | ||
2797 | |||
2798 | ObjCMethodDecl * | ||
2799 | @@ -11092,14 +11086,6 @@ static void DiagnoseFailedExplicitSpec(Sema &S, OverloadCandidate *Cand) { | ||
2800 | << (ES.getExpr() ? ES.getExpr()->getSourceRange() : SourceRange()); | ||
2801 | } | ||
2802 | |||
2803 | -static void DiagnoseOpenCLExtensionDisabled(Sema &S, OverloadCandidate *Cand) { | ||
2804 | - FunctionDecl *Callee = Cand->Function; | ||
2805 | - | ||
2806 | - S.Diag(Callee->getLocation(), | ||
2807 | - diag::note_ovl_candidate_disabled_by_extension) | ||
2808 | - << S.getOpenCLExtensionsFromDeclExtMap(Callee); | ||
2809 | -} | ||
2810 | - | ||
2811 | /// Generates a 'note' diagnostic for an overload candidate. We've | ||
2812 | /// already generated a primary error at the call site. | ||
2813 | /// | ||
2814 | @@ -11195,9 +11181,6 @@ static void NoteFunctionCandidate(Sema &S, OverloadCandidate *Cand, | ||
2815 | case ovl_fail_explicit: | ||
2816 | return DiagnoseFailedExplicitSpec(S, Cand); | ||
2817 | |||
2818 | - case ovl_fail_ext_disabled: | ||
2819 | - return DiagnoseOpenCLExtensionDisabled(S, Cand); | ||
2820 | - | ||
2821 | case ovl_fail_inhctor_slice: | ||
2822 | // It's generally not interesting to note copy/move constructors here. | ||
2823 | if (cast<CXXConstructorDecl>(Fn)->isCopyOrMoveConstructor()) | ||
2824 | diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp | ||
2825 | index 4178024d1264..e44a25c6aead 100644 | ||
2826 | --- a/clang/lib/Sema/SemaType.cpp | ||
2827 | +++ b/clang/lib/Sema/SemaType.cpp | ||
2828 | @@ -1548,6 +1548,16 @@ static QualType ConvertDeclSpecToType(TypeProcessingState &state) { | ||
2829 | Result = Context.LongDoubleTy; | ||
2830 | else | ||
2831 | Result = Context.DoubleTy; | ||
2832 | + if (S.getLangOpts().OpenCL) { | ||
2833 | + if (!S.getOpenCLOptions().isSupported("cl_khr_fp64", S.getLangOpts())) | ||
2834 | + S.Diag(DS.getTypeSpecTypeLoc(), diag::err_opencl_requires_extension) | ||
2835 | + << 0 << Result | ||
2836 | + << (S.getLangOpts().OpenCLVersion == 300 | ||
2837 | + ? "cl_khr_fp64 and __opencl_c_fp64" | ||
2838 | + : "cl_khr_fp64"); | ||
2839 | + else if (!S.getOpenCLOptions().isAvailableOption("cl_khr_fp64", S.getLangOpts())) | ||
2840 | + S.Diag(DS.getTypeSpecTypeLoc(), diag::ext_opencl_double_without_pragma); | ||
2841 | + } | ||
2842 | break; | ||
2843 | case DeclSpec::TST_float128: | ||
2844 | if (!S.Context.getTargetInfo().hasFloat128Type() && | ||
2845 | @@ -1723,10 +1733,33 @@ static QualType ConvertDeclSpecToType(TypeProcessingState &state) { | ||
2846 | if (Result->containsErrors()) | ||
2847 | declarator.setInvalidType(); | ||
2848 | |||
2849 | - if (S.getLangOpts().OpenCL && | ||
2850 | - S.checkOpenCLDisabledTypeDeclSpec(DS, Result)) | ||
2851 | - declarator.setInvalidType(true); | ||
2852 | - | ||
2853 | + if (S.getLangOpts().OpenCL) { | ||
2854 | + const auto &OpenCLOptions = S.getOpenCLOptions(); | ||
2855 | + bool IsOpenCLC30 = (S.getLangOpts().OpenCLVersion == 300); | ||
2856 | + // OpenCL C v3.0 s6.3.3 - OpenCL image types require __opencl_c_images | ||
2857 | + // support. | ||
2858 | + // OpenCL C v3.0 s6.2.1 - OpenCL 3d image write types requires support | ||
2859 | + // for OpenCL C 2.0, or OpenCL C 3.0 or newer and the | ||
2860 | + // __opencl_c_3d_image_writes feature. OpenCL C v3.0 API s4.2 - For devices | ||
2861 | + // that support OpenCL 3.0, cl_khr_3d_image_writes must be returned when and | ||
2862 | + // only when the optional feature is supported | ||
2863 | + if ((Result->isImageType() || Result->isSamplerT()) && | ||
2864 | + (IsOpenCLC30 && | ||
2865 | + !OpenCLOptions.isSupported("__opencl_c_images", S.getLangOpts()))) { | ||
2866 | + S.Diag(DS.getTypeSpecTypeLoc(), diag::err_opencl_requires_extension) | ||
2867 | + << 0 << Result << "__opencl_c_images"; | ||
2868 | + declarator.setInvalidType(); | ||
2869 | + } else if (Result->isOCLImage3dWOType() && | ||
2870 | + !OpenCLOptions.isSupported("cl_khr_3d_image_writes", | ||
2871 | + S.getLangOpts())) { | ||
2872 | + S.Diag(DS.getTypeSpecTypeLoc(), diag::err_opencl_requires_extension) | ||
2873 | + << 0 << Result | ||
2874 | + << (IsOpenCLC30 | ||
2875 | + ? "cl_khr_3d_image_writes and __opencl_c_3d_image_writes" | ||
2876 | + : "cl_khr_3d_image_writes"); | ||
2877 | + declarator.setInvalidType(); | ||
2878 | + } | ||
2879 | + } | ||
2880 | bool IsFixedPointType = DS.getTypeSpecType() == DeclSpec::TST_accum || | ||
2881 | DS.getTypeSpecType() == DeclSpec::TST_fract; | ||
2882 | |||
2883 | @@ -2060,8 +2093,7 @@ static QualType deduceOpenCLPointeeAddrSpace(Sema &S, QualType PointeeType) { | ||
2884 | !PointeeType->isSamplerT() && | ||
2885 | !PointeeType.hasAddressSpace()) | ||
2886 | PointeeType = S.getASTContext().getAddrSpaceQualType( | ||
2887 | - PointeeType, | ||
2888 | - S.getLangOpts().OpenCLCPlusPlus || S.getLangOpts().OpenCLVersion == 200 | ||
2889 | + PointeeType, S.getLangOpts().OpenCLGenericAddressSpace | ||
2890 | ? LangAS::opencl_generic | ||
2891 | : LangAS::opencl_private); | ||
2892 | return PointeeType; | ||
2893 | @@ -2090,7 +2122,8 @@ QualType Sema::BuildPointerType(QualType T, | ||
2894 | } | ||
2895 | |||
2896 | if (T->isFunctionType() && getLangOpts().OpenCL && | ||
2897 | - !getOpenCLOptions().isEnabled("__cl_clang_function_pointers")) { | ||
2898 | + !getOpenCLOptions().isAvailableOption("__cl_clang_function_pointers", | ||
2899 | + getLangOpts())) { | ||
2900 | Diag(Loc, diag::err_opencl_function_pointer); | ||
2901 | return QualType(); | ||
2902 | } | ||
2903 | @@ -4994,7 +5027,8 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, | ||
2904 | // FIXME: This really should be in BuildFunctionType. | ||
2905 | if (T->isHalfType()) { | ||
2906 | if (S.getLangOpts().OpenCL) { | ||
2907 | - if (!S.getOpenCLOptions().isEnabled("cl_khr_fp16")) { | ||
2908 | + if (!S.getOpenCLOptions().isAvailableOption("cl_khr_fp16", | ||
2909 | + S.getLangOpts())) { | ||
2910 | S.Diag(D.getIdentifierLoc(), diag::err_opencl_invalid_return) | ||
2911 | << T << 0 /*pointer hint*/; | ||
2912 | D.setInvalidType(true); | ||
2913 | @@ -5019,7 +5053,8 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, | ||
2914 | // (s6.9.e and s6.12.5 OpenCL v2.0) except for printf. | ||
2915 | // We also allow here any toolchain reserved identifiers. | ||
2916 | if (FTI.isVariadic && | ||
2917 | - !S.getOpenCLOptions().isEnabled("__cl_clang_variadic_functions") && | ||
2918 | + !S.getOpenCLOptions().isAvailableOption( | ||
2919 | + "__cl_clang_variadic_functions", S.getLangOpts()) && | ||
2920 | !(D.getIdentifier() && | ||
2921 | ((D.getIdentifier()->getName() == "printf" && | ||
2922 | (LangOpts.OpenCLCPlusPlus || LangOpts.OpenCLVersion >= 120)) || | ||
2923 | @@ -5214,7 +5249,8 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, | ||
2924 | // Disallow half FP parameters. | ||
2925 | // FIXME: This really should be in BuildFunctionType. | ||
2926 | if (S.getLangOpts().OpenCL) { | ||
2927 | - if (!S.getOpenCLOptions().isEnabled("cl_khr_fp16")) { | ||
2928 | + if (!S.getOpenCLOptions().isAvailableOption("cl_khr_fp16", | ||
2929 | + S.getLangOpts())) { | ||
2930 | S.Diag(Param->getLocation(), diag::err_opencl_invalid_param) | ||
2931 | << ParamTy << 0; | ||
2932 | D.setInvalidType(); | ||
2933 | diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp | ||
2934 | index 1f68f6bc3e38..aa5eaf7fe2dc 100644 | ||
2935 | --- a/clang/lib/Serialization/ASTReader.cpp | ||
2936 | +++ b/clang/lib/Serialization/ASTReader.cpp | ||
2937 | @@ -3611,36 +3611,13 @@ ASTReader::ReadASTBlock(ModuleFile &F, unsigned ClientLoadCapabilities) { | ||
2938 | auto &OptInfo = OpenCLExtensions.OptMap[Name]; | ||
2939 | OptInfo.Supported = Record[I++] != 0; | ||
2940 | OptInfo.Enabled = Record[I++] != 0; | ||
2941 | + OptInfo.WithPragma = Record[I++] != 0; | ||
2942 | OptInfo.Avail = Record[I++]; | ||
2943 | OptInfo.Core = Record[I++]; | ||
2944 | OptInfo.Opt = Record[I++]; | ||
2945 | } | ||
2946 | break; | ||
2947 | |||
2948 | - case OPENCL_EXTENSION_TYPES: | ||
2949 | - for (unsigned I = 0, E = Record.size(); I != E;) { | ||
2950 | - auto TypeID = static_cast<::TypeID>(Record[I++]); | ||
2951 | - auto *Type = GetType(TypeID).getTypePtr(); | ||
2952 | - auto NumExt = static_cast<unsigned>(Record[I++]); | ||
2953 | - for (unsigned II = 0; II != NumExt; ++II) { | ||
2954 | - auto Ext = ReadString(Record, I); | ||
2955 | - OpenCLTypeExtMap[Type].insert(Ext); | ||
2956 | - } | ||
2957 | - } | ||
2958 | - break; | ||
2959 | - | ||
2960 | - case OPENCL_EXTENSION_DECLS: | ||
2961 | - for (unsigned I = 0, E = Record.size(); I != E;) { | ||
2962 | - auto DeclID = static_cast<::DeclID>(Record[I++]); | ||
2963 | - auto *Decl = GetDecl(DeclID); | ||
2964 | - auto NumExt = static_cast<unsigned>(Record[I++]); | ||
2965 | - for (unsigned II = 0; II != NumExt; ++II) { | ||
2966 | - auto Ext = ReadString(Record, I); | ||
2967 | - OpenCLDeclExtMap[Decl].insert(Ext); | ||
2968 | - } | ||
2969 | - } | ||
2970 | - break; | ||
2971 | - | ||
2972 | case TENTATIVE_DEFINITIONS: | ||
2973 | for (unsigned I = 0, N = Record.size(); I != N; ++I) | ||
2974 | TentativeDefinitions.push_back(getGlobalDeclID(F, Record[I])); | ||
2975 | @@ -7869,8 +7846,6 @@ void ASTReader::InitializeSema(Sema &S) { | ||
2976 | } | ||
2977 | |||
2978 | SemaObj->OpenCLFeatures = OpenCLExtensions; | ||
2979 | - SemaObj->OpenCLTypeExtMap = OpenCLTypeExtMap; | ||
2980 | - SemaObj->OpenCLDeclExtMap = OpenCLDeclExtMap; | ||
2981 | |||
2982 | UpdateSema(); | ||
2983 | } | ||
2984 | diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp | ||
2985 | index 40900af6f9e0..d6e5269d24fd 100644 | ||
2986 | --- a/clang/lib/Serialization/ASTWriter.cpp | ||
2987 | +++ b/clang/lib/Serialization/ASTWriter.cpp | ||
2988 | @@ -3976,6 +3976,7 @@ void ASTWriter::WriteOpenCLExtensions(Sema &SemaRef) { | ||
2989 | auto V = I.getValue(); | ||
2990 | Record.push_back(V.Supported ? 1 : 0); | ||
2991 | Record.push_back(V.Enabled ? 1 : 0); | ||
2992 | + Record.push_back(V.WithPragma ? 1 : 0); | ||
2993 | Record.push_back(V.Avail); | ||
2994 | Record.push_back(V.Core); | ||
2995 | Record.push_back(V.Opt); | ||
2996 | @@ -3983,71 +3984,6 @@ void ASTWriter::WriteOpenCLExtensions(Sema &SemaRef) { | ||
2997 | Stream.EmitRecord(OPENCL_EXTENSIONS, Record); | ||
2998 | } | ||
2999 | |||
3000 | -void ASTWriter::WriteOpenCLExtensionTypes(Sema &SemaRef) { | ||
3001 | - if (!SemaRef.Context.getLangOpts().OpenCL) | ||
3002 | - return; | ||
3003 | - | ||
3004 | - // Sort the elements of the map OpenCLTypeExtMap by TypeIDs, | ||
3005 | - // without copying them. | ||
3006 | - const llvm::DenseMap<const Type *, std::set<std::string>> &OpenCLTypeExtMap = | ||
3007 | - SemaRef.OpenCLTypeExtMap; | ||
3008 | - using ElementTy = std::pair<TypeID, const std::set<std::string> *>; | ||
3009 | - llvm::SmallVector<ElementTy, 8> StableOpenCLTypeExtMap; | ||
3010 | - StableOpenCLTypeExtMap.reserve(OpenCLTypeExtMap.size()); | ||
3011 | - | ||
3012 | - for (const auto &I : OpenCLTypeExtMap) | ||
3013 | - StableOpenCLTypeExtMap.emplace_back( | ||
3014 | - getTypeID(I.first->getCanonicalTypeInternal()), &I.second); | ||
3015 | - | ||
3016 | - auto CompareByTypeID = [](const ElementTy &E1, const ElementTy &E2) -> bool { | ||
3017 | - return E1.first < E2.first; | ||
3018 | - }; | ||
3019 | - llvm::sort(StableOpenCLTypeExtMap, CompareByTypeID); | ||
3020 | - | ||
3021 | - RecordData Record; | ||
3022 | - for (const ElementTy &E : StableOpenCLTypeExtMap) { | ||
3023 | - Record.push_back(E.first); // TypeID | ||
3024 | - const std::set<std::string> *ExtSet = E.second; | ||
3025 | - Record.push_back(static_cast<unsigned>(ExtSet->size())); | ||
3026 | - for (const std::string &Ext : *ExtSet) | ||
3027 | - AddString(Ext, Record); | ||
3028 | - } | ||
3029 | - | ||
3030 | - Stream.EmitRecord(OPENCL_EXTENSION_TYPES, Record); | ||
3031 | -} | ||
3032 | - | ||
3033 | -void ASTWriter::WriteOpenCLExtensionDecls(Sema &SemaRef) { | ||
3034 | - if (!SemaRef.Context.getLangOpts().OpenCL) | ||
3035 | - return; | ||
3036 | - | ||
3037 | - // Sort the elements of the map OpenCLDeclExtMap by DeclIDs, | ||
3038 | - // without copying them. | ||
3039 | - const llvm::DenseMap<const Decl *, std::set<std::string>> &OpenCLDeclExtMap = | ||
3040 | - SemaRef.OpenCLDeclExtMap; | ||
3041 | - using ElementTy = std::pair<DeclID, const std::set<std::string> *>; | ||
3042 | - llvm::SmallVector<ElementTy, 8> StableOpenCLDeclExtMap; | ||
3043 | - StableOpenCLDeclExtMap.reserve(OpenCLDeclExtMap.size()); | ||
3044 | - | ||
3045 | - for (const auto &I : OpenCLDeclExtMap) | ||
3046 | - StableOpenCLDeclExtMap.emplace_back(getDeclID(I.first), &I.second); | ||
3047 | - | ||
3048 | - auto CompareByDeclID = [](const ElementTy &E1, const ElementTy &E2) -> bool { | ||
3049 | - return E1.first < E2.first; | ||
3050 | - }; | ||
3051 | - llvm::sort(StableOpenCLDeclExtMap, CompareByDeclID); | ||
3052 | - | ||
3053 | - RecordData Record; | ||
3054 | - for (const ElementTy &E : StableOpenCLDeclExtMap) { | ||
3055 | - Record.push_back(E.first); // DeclID | ||
3056 | - const std::set<std::string> *ExtSet = E.second; | ||
3057 | - Record.push_back(static_cast<unsigned>(ExtSet->size())); | ||
3058 | - for (const std::string &Ext : *ExtSet) | ||
3059 | - AddString(Ext, Record); | ||
3060 | - } | ||
3061 | - | ||
3062 | - Stream.EmitRecord(OPENCL_EXTENSION_DECLS, Record); | ||
3063 | -} | ||
3064 | - | ||
3065 | void ASTWriter::WriteCUDAPragmas(Sema &SemaRef) { | ||
3066 | if (SemaRef.ForceCUDAHostDeviceDepth > 0) { | ||
3067 | RecordData::value_type Record[] = {SemaRef.ForceCUDAHostDeviceDepth}; | ||
3068 | @@ -4792,17 +4728,12 @@ ASTFileSignature ASTWriter::WriteASTCore(Sema &SemaRef, StringRef isysroot, | ||
3069 | WriteIdentifierTable(PP, SemaRef.IdResolver, isModule); | ||
3070 | WriteFPPragmaOptions(SemaRef.CurFPFeatureOverrides()); | ||
3071 | WriteOpenCLExtensions(SemaRef); | ||
3072 | - WriteOpenCLExtensionTypes(SemaRef); | ||
3073 | WriteCUDAPragmas(SemaRef); | ||
3074 | |||
3075 | // If we're emitting a module, write out the submodule information. | ||
3076 | if (WritingModule) | ||
3077 | WriteSubmodules(WritingModule); | ||
3078 | |||
3079 | - // We need to have information about submodules to correctly deserialize | ||
3080 | - // decls from OpenCLExtensionDecls block | ||
3081 | - WriteOpenCLExtensionDecls(SemaRef); | ||
3082 | - | ||
3083 | Stream.EmitRecord(SPECIAL_TYPES, SpecialTypes); | ||
3084 | |||
3085 | // Write the record containing external, unnamed definitions. | ||
3086 | diff --git a/clang/test/CodeGenOpenCL/addr-space-struct-arg.cl b/clang/test/CodeGenOpenCL/addr-space-struct-arg.cl | ||
3087 | index 21e0f2b05747..d24c9c5f85a4 100644 | ||
3088 | --- a/clang/test/CodeGenOpenCL/addr-space-struct-arg.cl | ||
3089 | +++ b/clang/test/CodeGenOpenCL/addr-space-struct-arg.cl | ||
3090 | @@ -2,6 +2,8 @@ | ||
3091 | // RUN: %clang_cc1 %s -emit-llvm -o - -O0 -triple amdgcn | FileCheck -enable-var-scope -check-prefixes=ALL,AMDGCN %s | ||
3092 | // RUN: %clang_cc1 %s -emit-llvm -o - -cl-std=CL2.0 -O0 -triple amdgcn | FileCheck -enable-var-scope -check-prefixes=ALL,AMDGCN,AMDGCN20 %s | ||
3093 | // RUN: %clang_cc1 %s -emit-llvm -o - -cl-std=CL1.2 -O0 -triple spir-unknown-unknown-unknown | FileCheck -enable-var-scope -check-prefixes=SPIR %s | ||
3094 | +// RUN: %clang_cc1 %s -emit-llvm -o - -cl-std=CL3.0 -O0 -triple amdgcn -cl-ext=+__opencl_c_program_scope_global_variables | FileCheck -enable-var-scope -check-prefixes=ALL,AMDGCN,AMDGCN20 %s | ||
3095 | +// RUN: %clang_cc1 %s -emit-llvm -o - -cl-std=CL3.0 -O0 -triple amdgcn | FileCheck -enable-var-scope -check-prefixes=ALL,AMDGCN %s | ||
3096 | |||
3097 | typedef int int2 __attribute__((ext_vector_type(2))); | ||
3098 | |||
3099 | @@ -39,7 +41,7 @@ struct LargeStructTwoMember { | ||
3100 | int2 y[20]; | ||
3101 | }; | ||
3102 | |||
3103 | -#if __OPENCL_C_VERSION__ >= 200 | ||
3104 | +#if (__OPENCL_C_VERSION__ == 200) || (__OPENCL_C_VERSION__ >= 300 && defined(__opencl_c_program_scope_global_variables)) | ||
3105 | struct LargeStructOneMember g_s; | ||
3106 | #endif | ||
3107 | |||
3108 | @@ -98,7 +100,7 @@ void FuncOneLargeMember(struct LargeStructOneMember u) { | ||
3109 | // AMDGCN20: %[[r0:.*]] = bitcast %struct.LargeStructOneMember addrspace(5)* %[[byval_temp]] to i8 addrspace(5)* | ||
3110 | // AMDGCN20: call void @llvm.memcpy.p5i8.p1i8.i64(i8 addrspace(5)* align 8 %[[r0]], i8 addrspace(1)* align 8 bitcast (%struct.LargeStructOneMember addrspace(1)* @g_s to i8 addrspace(1)*), i64 800, i1 false) | ||
3111 | // AMDGCN20: call void @FuncOneLargeMember(%struct.LargeStructOneMember addrspace(5)* byval(%struct.LargeStructOneMember) align 8 %[[byval_temp]]) | ||
3112 | -#if __OPENCL_C_VERSION__ >= 200 | ||
3113 | +#if (__OPENCL_C_VERSION__ == 200) || (__OPENCL_C_VERSION__ >= 300 && defined(__opencl_c_program_scope_global_variables)) | ||
3114 | void test_indirect_arg_globl(void) { | ||
3115 | FuncOneLargeMember(g_s); | ||
3116 | } | ||
3117 | diff --git a/clang/test/CodeGenOpenCL/address-spaces-conversions.cl b/clang/test/CodeGenOpenCL/address-spaces-conversions.cl | ||
3118 | index cd3099e0a1a4..8fdb46184bed 100644 | ||
3119 | --- a/clang/test/CodeGenOpenCL/address-spaces-conversions.cl | ||
3120 | +++ b/clang/test/CodeGenOpenCL/address-spaces-conversions.cl | ||
3121 | @@ -1,5 +1,7 @@ | ||
3122 | // RUN: %clang_cc1 %s -triple x86_64-unknown-linux-gnu -O0 -ffake-address-space-map -cl-std=CL2.0 -emit-llvm -o - | FileCheck %s | ||
3123 | +// RUN: %clang_cc1 %s -triple x86_64-unknown-linux-gnu -O0 -ffake-address-space-map -cl-std=CL3.0 -cl-ext=+__opencl_c_generic_address_space -emit-llvm -o - | FileCheck %s | ||
3124 | // RUN: %clang_cc1 %s -triple x86_64-unknown-linux-gnu -O0 -cl-std=CL2.0 -emit-llvm -o - | FileCheck --check-prefix=CHECK-NOFAKE %s | ||
3125 | +// RUN: %clang_cc1 %s -triple x86_64-unknown-linux-gnu -O0 -cl-std=CL3.0 -cl-ext=+__opencl_c_generic_address_space -emit-llvm -o - | FileCheck --check-prefix=CHECK-NOFAKE %s | ||
3126 | // When -ffake-address-space-map is not used, all addr space mapped to 0 for x86_64. | ||
3127 | |||
3128 | // test that we generate address space casts everywhere we need conversions of | ||
3129 | diff --git a/clang/test/CodeGenOpenCL/address-spaces-mangling.cl b/clang/test/CodeGenOpenCL/address-spaces-mangling.cl | ||
3130 | index 50622f099143..b46834c2a678 100644 | ||
3131 | --- a/clang/test/CodeGenOpenCL/address-spaces-mangling.cl | ||
3132 | +++ b/clang/test/CodeGenOpenCL/address-spaces-mangling.cl | ||
3133 | @@ -2,10 +2,14 @@ | ||
3134 | // RUN: %clang_cc1 %s -cl-std=CL2.0 -ffake-address-space-map -faddress-space-map-mangling=yes -triple %itanium_abi_triple -emit-llvm -o - | FileCheck -check-prefixes="ASMANG,ASMANG20" %s | ||
3135 | // RUN: %clang_cc1 %s -ffake-address-space-map -faddress-space-map-mangling=no -triple %itanium_abi_triple -emit-llvm -o - | FileCheck -check-prefixes="NOASMANG,NOASMANG10" %s | ||
3136 | // RUN: %clang_cc1 %s -cl-std=CL2.0 -ffake-address-space-map -faddress-space-map-mangling=no -triple %itanium_abi_triple -emit-llvm -o - | FileCheck -check-prefixes="NOASMANG,NOASMANG20" %s | ||
3137 | +// RUN: %clang_cc1 %s -cl-std=CL3.0 -cl-std=CL3.0 -cl-ext=+__opencl_c_generic_address_space -ffake-address-space-map -faddress-space-map-mangling=no -triple %itanium_abi_triple -emit-llvm -o - | FileCheck -check-prefixes="NOASMANG,NOASMANG20" %s | ||
3138 | +// RUN: %clang_cc1 %s -cl-std=CL3.0 -cl-ext=+__opencl_c_generic_address_space -ffake-address-space-map -faddress-space-map-mangling=yes -triple %itanium_abi_triple -emit-llvm -o - | FileCheck -check-prefixes="ASMANG,ASMANG20" %s | ||
3139 | |||
3140 | // We check that the address spaces are mangled the same in both version of OpenCL | ||
3141 | // RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=CL2.0 -emit-llvm -o - | FileCheck -check-prefix=OCL-20 %s | ||
3142 | // RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=CL1.2 -emit-llvm -o - | FileCheck -check-prefix=OCL-12 %s | ||
3143 | +// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=CL3.0 -cl-ext=+__opencl_c_generic_address_space -emit-llvm -o - | FileCheck -check-prefix=OCL-20 %s | ||
3144 | +// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=CL3.0 -cl-ext=-__opencl_c_generic_address_space -emit-llvm -o - | FileCheck -check-prefix=OCL-12 %s | ||
3145 | |||
3146 | // We can't name this f as private is equivalent to default | ||
3147 | // no specifier given address space so we get multiple definition | ||
3148 | @@ -47,7 +51,7 @@ void f(constant int *arg) { } | ||
3149 | // OCL-20-DAG: @_Z1fPU3AS2i | ||
3150 | // OCL-12-DAG: @_Z1fPU3AS2i | ||
3151 | |||
3152 | -#if __OPENCL_C_VERSION__ >= 200 | ||
3153 | +#if (__OPENCL_C_VERSION__ == 200) || defined(__opencl_c_generic_address_space) | ||
3154 | __attribute__((overloadable)) | ||
3155 | void f(generic int *arg) { } | ||
3156 | // ASMANG20: @_Z1fPU3AS4i | ||
3157 | diff --git a/clang/test/CodeGenOpenCL/address-spaces.cl b/clang/test/CodeGenOpenCL/address-spaces.cl | ||
3158 | index ebd227a6a9c7..be131c7820f9 100644 | ||
3159 | --- a/clang/test/CodeGenOpenCL/address-spaces.cl | ||
3160 | +++ b/clang/test/CodeGenOpenCL/address-spaces.cl | ||
3161 | @@ -1,9 +1,13 @@ | ||
3162 | // RUN: %clang_cc1 %s -O0 -ffake-address-space-map -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,SPIR | ||
3163 | +// RUN: %clang_cc1 %s -O0 -cl-std=CL3.0 -cl-ext=-__opencl_c_generic_address_space -ffake-address-space-map -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,SPIR | ||
3164 | // RUN: %clang_cc1 %s -O0 -DCL20 -cl-std=CL2.0 -ffake-address-space-map -emit-llvm -o - | FileCheck %s --check-prefixes=CL20,CL20SPIR | ||
3165 | // RUN: %clang_cc1 %s -O0 -triple amdgcn-amd-amdhsa -emit-llvm -o - | FileCheck --check-prefixes=CHECK,AMDGCN %s | ||
3166 | +// RUN: %clang_cc1 %s -O0 -triple amdgcn-amd-amdhsa -cl-std=CL3.0 -emit-llvm -o - | FileCheck --check-prefixes=CHECK,AMDGCN %s | ||
3167 | // RUN: %clang_cc1 %s -O0 -triple amdgcn-amd-amdhsa -DCL20 -cl-std=CL2.0 -emit-llvm -o - | FileCheck %s --check-prefixes=CL20,CL20AMDGCN | ||
3168 | // RUN: %clang_cc1 %s -O0 -triple amdgcn-mesa-mesa3d -emit-llvm -o - | FileCheck --check-prefixes=CHECK,AMDGCN %s | ||
3169 | +// RUN: %clang_cc1 %s -O0 -triple amdgcn-mesa-mesa3d -cl-std=CL3.0 -emit-llvm -o - | FileCheck --check-prefixes=CHECK,AMDGCN %s | ||
3170 | // RUN: %clang_cc1 %s -O0 -triple r600-- -emit-llvm -o - | FileCheck --check-prefixes=CHECK,AMDGCN %s | ||
3171 | +// RUN: %clang_cc1 %s -O0 -triple r600-- -emit-llvm -cl-std=CL3.0 -o - | FileCheck --check-prefixes=CHECK,AMDGCN %s | ||
3172 | |||
3173 | // SPIR: %struct.S = type { i32, i32, i32* } | ||
3174 | // CL20SPIR: %struct.S = type { i32, i32, i32 addrspace(4)* } | ||
3175 | diff --git a/clang/test/CodeGenOpenCL/amdgpu-sizeof-alignof.cl b/clang/test/CodeGenOpenCL/amdgpu-sizeof-alignof.cl | ||
3176 | index a5d438933fa4..3bd395da6d45 100644 | ||
3177 | --- a/clang/test/CodeGenOpenCL/amdgpu-sizeof-alignof.cl | ||
3178 | +++ b/clang/test/CodeGenOpenCL/amdgpu-sizeof-alignof.cl | ||
3179 | @@ -5,6 +5,18 @@ | ||
3180 | // RUN: %clang_cc1 -triple amdgcn---amdgizcl -cl-std=CL1.2 %s -emit-llvm -o - | FileCheck %s | ||
3181 | // RUN: %clang_cc1 -triple amdgcn---amdgizcl -cl-std=CL2.0 %s -emit-llvm -o - | FileCheck %s | ||
3182 | |||
3183 | +// RUN: %clang_cc1 -triple r600 -cl-std=CL3.0 %s -emit-llvm -o - | FileCheck %s | ||
3184 | +// RUN: %clang_cc1 -triple amdgcn-mesa-mesa3d -cl-std=CL3.0 %s -emit-llvm -o - | FileCheck %s | ||
3185 | +// RUN: %clang_cc1 -triple amdgcn---opencl -cl-std=CL3.0 %s -emit-llvm -o - | FileCheck %s | ||
3186 | +// RUN: %clang_cc1 -triple amdgcn---amdgizcl -cl-std=CL3.0 %s -emit-llvm -o - | FileCheck %s | ||
3187 | +// RUN: %clang_cc1 -triple amdgcn-mesa-mesa3d -cl-ext=+__opencl_c_generic_address_space -cl-std=CL3.0 %s -emit-llvm -o - | FileCheck %s | ||
3188 | +// RUN: %clang_cc1 -triple amdgcn---opencl -cl-ext=+__opencl_c_generic_address_space -cl-std=CL3.0 %s -emit-llvm -o - | FileCheck %s | ||
3189 | +// RUN: %clang_cc1 -triple amdgcn---amdgizcl -cl-ext=+__opencl_c_generic_address_space -cl-std=CL3.0 %s -emit-llvm -o - | FileCheck %s | ||
3190 | +// RUN: %clang_cc1 -triple r600 -cl-ext=+cl_khr_fp64,+__opencl_c_fp64 -cl-std=CL3.0 %s -emit-llvm -o - | FileCheck %s | ||
3191 | +// RUN: %clang_cc1 -triple amdgcn-mesa-mesa3d -cl-ext=+cl_khr_fp64,+__opencl_c_fp64 -cl-std=CL3.0 %s -emit-llvm -o - | FileCheck %s | ||
3192 | +// RUN: %clang_cc1 -triple amdgcn---opencl -cl-ext=+cl_khr_fp64,+__opencl_c_fp64 -cl-std=CL3.0 %s -emit-llvm -o - | FileCheck %s | ||
3193 | +// RUN: %clang_cc1 -triple amdgcn---amdgizcl -cl-ext=+cl_khr_fp64,+__opencl_c_fp64 -cl-std=CL3.0 %s -emit-llvm -o - | FileCheck %s | ||
3194 | + | ||
3195 | #ifdef __AMDGCN__ | ||
3196 | #define PTSIZE 8 | ||
3197 | #else | ||
3198 | @@ -58,9 +70,12 @@ void test() { | ||
3199 | check(sizeof(double) == 8); | ||
3200 | check(__alignof__(double) == 8); | ||
3201 | #endif | ||
3202 | - | ||
3203 | - check(sizeof(void*) == (__OPENCL_C_VERSION__ >= 200 ? 8 : 4)); | ||
3204 | - check(__alignof__(void*) == (__OPENCL_C_VERSION__ >= 200 ? 8 : 4)); | ||
3205 | + check(sizeof(private void*) == 4); | ||
3206 | + check(__alignof__(private void*) == 4); | ||
3207 | +#if (__OPENCL_C_VERSION__ == 200) || defined(__opencl_c_generic_address_space) | ||
3208 | + check(sizeof(generic void*) == 8); | ||
3209 | + check(__alignof__(generic void*) == 8); | ||
3210 | +#endif | ||
3211 | check(sizeof(global_ptr_t) == PTSIZE); | ||
3212 | check(__alignof__(global_ptr_t) == PTSIZE); | ||
3213 | check(sizeof(constant_ptr_t) == PTSIZE); | ||
3214 | diff --git a/clang/test/CodeGenOpenCL/arm-integer-dot-product.cl b/clang/test/CodeGenOpenCL/arm-integer-dot-product.cl | ||
3215 | index d1ab6aceac5c..cc62d1df4275 100644 | ||
3216 | --- a/clang/test/CodeGenOpenCL/arm-integer-dot-product.cl | ||
3217 | +++ b/clang/test/CodeGenOpenCL/arm-integer-dot-product.cl | ||
3218 | @@ -1,38 +1,39 @@ | ||
3219 | // RUN: %clang_cc1 %s -triple spir-unknown-unknown -finclude-default-header -cl-std=CL1.2 -emit-llvm -o - -O0 | FileCheck %s | ||
3220 | |||
3221 | +// Pragmas are only accepted for backward compatibility. | ||
3222 | + | ||
3223 | #pragma OPENCL EXTENSION cl_arm_integer_dot_product_int8 : enable | ||
3224 | +#pragma OPENCL EXTENSION cl_arm_integer_dot_product_int8 : disable | ||
3225 | void test_int8(uchar4 ua, uchar4 ub, char4 sa, char4 sb) { | ||
3226 | uint ur = arm_dot(ua, ub); | ||
3227 | // CHECK: call spir_func i32 @_Z7arm_dotDv4_hS_ | ||
3228 | int sr = arm_dot(sa, sb); | ||
3229 | // CHECK: call spir_func i32 @_Z7arm_dotDv4_cS_ | ||
3230 | } | ||
3231 | -#pragma OPENCL EXTENSION cl_arm_integer_dot_product_int8 : disable | ||
3232 | |||
3233 | #pragma OPENCL EXTENSION cl_arm_integer_dot_product_accumulate_int8 : enable | ||
3234 | +#pragma OPENCL EXTENSION cl_arm_integer_dot_product_accumulate_int8 : disable | ||
3235 | void test_accumulate_int8(uchar4 ua, uchar4 ub, uint uc, char4 sa, char4 sb, int c) { | ||
3236 | uint ur = arm_dot_acc(ua, ub, uc); | ||
3237 | // CHECK: call spir_func i32 @_Z11arm_dot_accDv4_hS_j | ||
3238 | int sr = arm_dot_acc(sa, sb, c); | ||
3239 | // CHECK: call spir_func i32 @_Z11arm_dot_accDv4_cS_i | ||
3240 | } | ||
3241 | -#pragma OPENCL EXTENSION cl_arm_integer_dot_product_accumulate_int8 : disable | ||
3242 | |||
3243 | #pragma OPENCL EXTENSION cl_arm_integer_dot_product_accumulate_int16 : enable | ||
3244 | +#pragma OPENCL EXTENSION cl_arm_integer_dot_product_accumulate_int16 : disable | ||
3245 | void test_accumulate_int16(ushort2 ua, ushort2 ub, uint uc, short2 sa, short2 sb, int c) { | ||
3246 | uint ur = arm_dot_acc(ua, ub, uc); | ||
3247 | // CHECK: call spir_func i32 @_Z11arm_dot_accDv2_tS_j | ||
3248 | int sr = arm_dot_acc(sa, sb, c); | ||
3249 | // CHECK: call spir_func i32 @_Z11arm_dot_accDv2_sS_i | ||
3250 | } | ||
3251 | -#pragma OPENCL EXTENSION cl_arm_integer_dot_product_accumulate_int16 : disable | ||
3252 | |||
3253 | #pragma OPENCL EXTENSION cl_arm_integer_dot_product_accumulate_saturate_int8 : enable | ||
3254 | +#pragma OPENCL EXTENSION cl_arm_integer_dot_product_accumulate_saturate_int8 : disable | ||
3255 | void test_accumulate_saturate_int8(uchar4 ua, uchar4 ub, uint uc, char4 sa, char4 sb, int c) { | ||
3256 | uint ur = arm_dot_acc_sat(ua, ub, uc); | ||
3257 | // CHECK: call spir_func i32 @_Z15arm_dot_acc_satDv4_hS_j | ||
3258 | int sr = arm_dot_acc_sat(sa, sb, c); | ||
3259 | // CHECK: call spir_func i32 @_Z15arm_dot_acc_satDv4_cS_i | ||
3260 | } | ||
3261 | -#pragma OPENCL EXTENSION cl_arm_integer_dot_product_accumulate_saturate_int8 : disable | ||
3262 | - | ||
3263 | diff --git a/clang/test/CodeGenOpenCL/extension-begin.cl b/clang/test/CodeGenOpenCL/extension-begin.cl | ||
3264 | deleted file mode 100644 | ||
3265 | index 89b4256b2b11..000000000000 | ||
3266 | --- a/clang/test/CodeGenOpenCL/extension-begin.cl | ||
3267 | +++ /dev/null | ||
3268 | @@ -1,25 +0,0 @@ | ||
3269 | -// RUN: %clang_cc1 %s -triple spir-unknown-unknown -emit-llvm -o - | FileCheck %s | ||
3270 | - | ||
3271 | -__attribute__((overloadable)) void f(int x); | ||
3272 | - | ||
3273 | -#pragma OPENCL EXTENSION my_ext : begin | ||
3274 | - | ||
3275 | -__attribute__((overloadable)) void f(long x); | ||
3276 | - | ||
3277 | -#pragma OPENCL EXTENSION my_ext : end | ||
3278 | - | ||
3279 | -#pragma OPENCL EXTENSION my_ext : enable | ||
3280 | - | ||
3281 | -//CHECK: define{{.*}} spir_func void @test_f1(i64 %x) | ||
3282 | -//CHECK: call spir_func void @_Z1fl(i64 %{{.*}}) | ||
3283 | -void test_f1(long x) { | ||
3284 | - f(x); | ||
3285 | -} | ||
3286 | - | ||
3287 | -#pragma OPENCL EXTENSION my_ext : disable | ||
3288 | - | ||
3289 | -//CHECK: define{{.*}} spir_func void @test_f2(i64 %x) | ||
3290 | -//CHECK: call spir_func void @_Z1fi(i32 %{{.*}}) | ||
3291 | -void test_f2(long x) { | ||
3292 | - f(x); | ||
3293 | -} | ||
3294 | diff --git a/clang/test/CodeGenOpenCL/overload.cl b/clang/test/CodeGenOpenCL/overload.cl | ||
3295 | index f182cb5fd2af..bc844595a59a 100644 | ||
3296 | --- a/clang/test/CodeGenOpenCL/overload.cl | ||
3297 | +++ b/clang/test/CodeGenOpenCL/overload.cl | ||
3298 | @@ -1,4 +1,5 @@ | ||
3299 | // RUN: %clang_cc1 -cl-std=CL2.0 -emit-llvm -o - -triple spir-unknown-unknown %s | FileCheck %s | ||
3300 | +// RUN: %clang_cc1 -cl-std=CL3.0 -cl-ext=+__opencl_c_generic_address_space -emit-llvm -o - -triple spir-unknown-unknown %s | FileCheck %s | ||
3301 | |||
3302 | typedef short short4 __attribute__((ext_vector_type(4))); | ||
3303 | |||
3304 | diff --git a/clang/test/CodeGenOpenCL/printf.cl b/clang/test/CodeGenOpenCL/printf.cl | ||
3305 | index fc139d776db6..c68c43bcc286 100644 | ||
3306 | --- a/clang/test/CodeGenOpenCL/printf.cl | ||
3307 | +++ b/clang/test/CodeGenOpenCL/printf.cl | ||
3308 | @@ -1,10 +1,12 @@ | ||
3309 | // RUN: %clang_cc1 -cl-std=CL1.2 -cl-ext=-+cl_khr_fp64 -triple spir-unknown-unknown -disable-llvm-passes -emit-llvm -o - %s | FileCheck -check-prefixes=FP64,ALL %s | ||
3310 | // RUN: %clang_cc1 -cl-std=CL1.2 -cl-ext=-cl_khr_fp64 -triple spir-unknown-unknown -disable-llvm-passes -emit-llvm -o - %s | FileCheck -check-prefixes=NOFP64,ALL %s | ||
3311 | +// RUN: %clang_cc1 -cl-std=CL3.0 -cl-ext=+__opencl_c_fp64,+cl_khr_fp64 -triple spir-unknown-unknown -disable-llvm-passes -emit-llvm -o - %s | FileCheck -check-prefixes=FP64,ALL %s | ||
3312 | +// RUN: %clang_cc1 -cl-std=CL3.0 -cl-ext=-__opencl_c_fp64,-cl_khr_fp64 -triple spir-unknown-unknown -disable-llvm-passes -emit-llvm -o - %s | FileCheck -check-prefixes=NOFP64,ALL %s | ||
3313 | |||
3314 | typedef __attribute__((ext_vector_type(2))) float float2; | ||
3315 | typedef __attribute__((ext_vector_type(2))) half half2; | ||
3316 | |||
3317 | -#ifdef cl_khr_fp64 | ||
3318 | +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) | ||
3319 | typedef __attribute__((ext_vector_type(2))) double double2; | ||
3320 | #endif | ||
3321 | |||
3322 | @@ -28,7 +30,7 @@ kernel void test_printf_half2(half2 arg) { | ||
3323 | printf("%v2hf", arg); | ||
3324 | } | ||
3325 | |||
3326 | -#ifdef cl_khr_fp64 | ||
3327 | +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) | ||
3328 | // FP64-LABEL: @test_printf_double2( | ||
3329 | // FP64: call spir_func i32 (i8 addrspace(2)*, ...) @printf(i8 addrspace(2)* getelementptr inbounds ([6 x i8], [6 x i8] addrspace(2)* @.str.2, i32 0, i32 0), <2 x double> %0) | ||
3330 | kernel void test_printf_double2(double2 arg) { | ||
3331 | diff --git a/clang/test/Headers/opencl-c-header.cl b/clang/test/Headers/opencl-c-header.cl | ||
3332 | index 184eefd9f9c3..1c671acb174e 100644 | ||
3333 | --- a/clang/test/Headers/opencl-c-header.cl | ||
3334 | +++ b/clang/test/Headers/opencl-c-header.cl | ||
3335 | @@ -253,4 +253,88 @@ global atomic_int z = ATOMIC_VAR_INIT(99); | ||
3336 | |||
3337 | #endif //(defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) | ||
3338 | |||
3339 | +// OpenCL C features. | ||
3340 | +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ == 200) | ||
3341 | + | ||
3342 | +#ifndef __opencl_c_pipes | ||
3343 | +#error "Feature macro __opencl_c_pipes should be defined" | ||
3344 | +#endif | ||
3345 | +#ifndef __opencl_c_generic_address_space | ||
3346 | +#error "Feature macro __opencl_c_generic_address_space should be defined" | ||
3347 | +#endif | ||
3348 | +#ifndef __opencl_c_work_group_collective_functions | ||
3349 | +#error "Feature macro __opencl_c_work_group_collective_functions should be defined" | ||
3350 | +#endif | ||
3351 | +#ifndef __opencl_c_atomic_order_acq_rel | ||
3352 | +#error "Feature macro __opencl_c_atomic_order_acq_rel should be defined" | ||
3353 | +#endif | ||
3354 | +#ifndef __opencl_c_atomic_order_seq_cst | ||
3355 | +#error "Feature macro __opencl_c_atomic_order_seq_cst should be defined" | ||
3356 | +#endif | ||
3357 | +#ifndef __opencl_c_atomic_scope_device | ||
3358 | +#error "Feature macro __opencl_c_atomic_scope_device should be defined" | ||
3359 | +#endif | ||
3360 | +#ifndef __opencl_c_atomic_scope_all_devices | ||
3361 | +#error "Feature macro __opencl_c_atomic_scope_all_devices should be defined" | ||
3362 | +#endif | ||
3363 | +#ifndef __opencl_c_device_enqueue | ||
3364 | +#error "Feature macro __opencl_c_device_enqueue should be defined" | ||
3365 | +#endif | ||
3366 | +#ifndef __opencl_c_read_write_images | ||
3367 | +#error "Feature macro __opencl_c_read_write_images should be defined" | ||
3368 | +#endif | ||
3369 | +#ifndef __opencl_c_program_scope_global_variables | ||
3370 | +#error "Feature macro __opencl_c_program_scope_global_variables should be defined" | ||
3371 | +#endif | ||
3372 | +#ifndef __opencl_c_images | ||
3373 | +#error "Feature macro __opencl_c_images should be defined" | ||
3374 | +#endif | ||
3375 | + | ||
3376 | +#elif (__OPENCL_C_VERSION__ < 200) | ||
3377 | + | ||
3378 | +#ifdef __opencl_c_pipes | ||
3379 | +#error "Incorret feature macro __opencl_c_pipes define" | ||
3380 | +#endif | ||
3381 | +#ifdef __opencl_c_generic_address_space | ||
3382 | +#error "Incorret feature macro __opencl_c_generic_address_space define" | ||
3383 | +#endif | ||
3384 | +#ifdef __opencl_c_work_group_collective_functions | ||
3385 | +#error "Incorret feature macro __opencl_c_work_group_collective_functions define" | ||
3386 | +#endif | ||
3387 | +#ifdef __opencl_c_atomic_order_acq_rel | ||
3388 | +#error "Incorret feature macro __opencl_c_atomic_order_acq_rel define" | ||
3389 | +#endif | ||
3390 | +#ifdef __opencl_c_atomic_order_seq_cst | ||
3391 | +#error "Incorret feature macro __opencl_c_atomic_order_seq_cst define" | ||
3392 | +#endif | ||
3393 | +#ifdef __opencl_c_atomic_scope_device | ||
3394 | +#error "Incorret feature macro __opencl_c_atomic_scope_device define" | ||
3395 | +#endif | ||
3396 | +#ifdef __opencl_c_atomic_scope_all_devices | ||
3397 | +#error "Incorret feature macro __opencl_c_atomic_scope_all_devices define" | ||
3398 | +#endif | ||
3399 | +#ifdef __opencl_c_device_enqueue | ||
3400 | +#error "Incorret feature macro __opencl_c_device_enqueue define" | ||
3401 | +#endif | ||
3402 | +#ifdef __opencl_c_read_write_images | ||
3403 | +#error "Incorret feature macro __opencl_c_read_write_images define" | ||
3404 | +#endif | ||
3405 | +#ifdef __opencl_c_program_scope_global_variables | ||
3406 | +#error "Incorret feature macro __opencl_c_program_scope_global_variables define" | ||
3407 | +#endif | ||
3408 | +#ifdef __opencl_c_images | ||
3409 | +#error "Incorret feature macro __opencl_c_images define" | ||
3410 | +#endif | ||
3411 | +#ifdef __opencl_c_3d_image_writes | ||
3412 | +#error "Incorret feature macro __opencl_c_3d_image_writes define" | ||
3413 | +#endif | ||
3414 | +#ifdef __opencl_c_fp64 | ||
3415 | +#error "Incorret feature macro __opencl_c_fp64 define" | ||
3416 | +#endif | ||
3417 | +#ifdef __opencl_c_subgroups | ||
3418 | +#error "Incorret feature macro __opencl_c_subgroups define" | ||
3419 | +#endif | ||
3420 | + | ||
3421 | +#endif //(defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ == 200) | ||
3422 | + | ||
3423 | #endif // defined(__SPIR__) | ||
3424 | diff --git a/clang/test/Misc/nvptx.unsupported_core.cl b/clang/test/Misc/nvptx.unsupported_core.cl | ||
3425 | new file mode 100644 | ||
3426 | index 000000000000..b56a4828914e | ||
3427 | --- /dev/null | ||
3428 | +++ b/clang/test/Misc/nvptx.unsupported_core.cl | ||
3429 | @@ -0,0 +1,7 @@ | ||
3430 | +// RUN: %clang_cc1 -cl-std=CL2.0 -triple nvptx-unknown-unknown -Wpedantic-core-features %s 2> %t | ||
3431 | +// RUN: FileCheck --check-prefixes=CHECK-C < %t %s | ||
3432 | +// RUN: %clang_cc1 -cl-std=CLC++ -triple nvptx-unknown-unknown -Wpedantic-core-features %s 2> %t | ||
3433 | +// RUN: FileCheck --check-prefixes=CHECK-CPP < %t %s | ||
3434 | + | ||
3435 | +// CHECK-C: cl_khr_3d_image_writes is a core feature in OpenCL C version 2.0 but not supported on this target | ||
3436 | +// CHECK-CPP: cl_khr_3d_image_writes is a core feature in C++ for OpenCL version 1.0 but not supported on this target | ||
3437 | diff --git a/clang/test/Misc/warning-flags.c b/clang/test/Misc/warning-flags.c | ||
3438 | index 54e36e1e0884..e4f9069b88c8 100644 | ||
3439 | --- a/clang/test/Misc/warning-flags.c | ||
3440 | +++ b/clang/test/Misc/warning-flags.c | ||
3441 | @@ -91,4 +91,4 @@ CHECK-NEXT: warn_weak_import | ||
3442 | |||
3443 | The list of warnings in -Wpedantic should NEVER grow. | ||
3444 | |||
3445 | -CHECK: Number in -Wpedantic (not covered by other -W flags): 26 | ||
3446 | +CHECK: Number in -Wpedantic (not covered by other -W flags): 27 | ||
3447 | diff --git a/clang/test/Parser/opencl-atomics-cl20.cl b/clang/test/Parser/opencl-atomics-cl20.cl | ||
3448 | index 844902e847f7..c3f86b6a44c4 100644 | ||
3449 | --- a/clang/test/Parser/opencl-atomics-cl20.cl | ||
3450 | +++ b/clang/test/Parser/opencl-atomics-cl20.cl | ||
3451 | @@ -1,66 +1,78 @@ | ||
3452 | // RUN: %clang_cc1 %s -triple spir-unknown-unknown -verify -pedantic -fsyntax-only | ||
3453 | -// RUN: %clang_cc1 %s -triple spir-unknown-unknown -verify -fsyntax-only -cl-std=CL2.0 -DCL20 | ||
3454 | -// RUN: %clang_cc1 %s -triple spir64-unknown-unknown -verify -fsyntax-only -cl-std=CL2.0 -DCL20 | ||
3455 | -// RUN: %clang_cc1 %s -triple spir-unknown-unknown -verify -fsyntax-only -cl-std=CL2.0 -DCL20 -DEXT -Wpedantic-core-features | ||
3456 | +// RUN: %clang_cc1 %s -triple spir-unknown-unknown -verify -fsyntax-only -cl-std=CL2.0 -cl-ext=-cl_khr_int64_base_atomics | ||
3457 | +// RUN: %clang_cc1 %s -triple spir64-unknown-unknown -verify -fsyntax-only -cl-std=CL2.0 | ||
3458 | +// RUN: %clang_cc1 %s -triple spir64-unknown-unknown -verify -fsyntax-only -cl-std=CLC++ | ||
3459 | +// RUN: %clang_cc1 %s -triple spir64-unknown-unknown -verify -fsyntax-only -cl-std=CL2.0 -cl-ext=-cl_khr_int64_base_atomics | ||
3460 | |||
3461 | -#ifdef EXT | ||
3462 | -#pragma OPENCL EXTENSION cl_khr_int64_base_atomics:enable | ||
3463 | -#pragma OPENCL EXTENSION cl_khr_int64_extended_atomics:enable | ||
3464 | -#pragma OPENCL EXTENSION cl_khr_fp64:enable | ||
3465 | -#if __OPENCL_C_VERSION__ >= CL_VERSION_1_2 | ||
3466 | -// expected-warning@-2{{OpenCL extension 'cl_khr_fp64' is core feature or supported optional core feature - ignoring}} | ||
3467 | -#endif | ||
3468 | +#if defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= CL_VERSION_1_2 | ||
3469 | +#define LANG_VER_OK | ||
3470 | #endif | ||
3471 | |||
3472 | void atomic_types_test() { | ||
3473 | // OpenCL v2.0 s6.13.11.6 defines supported atomic types. | ||
3474 | + | ||
3475 | +// Non-optional types | ||
3476 | atomic_int i; | ||
3477 | atomic_uint ui; | ||
3478 | + atomic_float f; | ||
3479 | + atomic_flag fl; | ||
3480 | +#if !defined(LANG_VER_OK) | ||
3481 | +// expected-error@-5 {{use of undeclared identifier 'atomic_int'}} | ||
3482 | +// expected-error@-5 {{use of undeclared identifier 'atomic_uint'}} | ||
3483 | +// expected-error@-5 {{use of undeclared identifier 'atomic_float'}} | ||
3484 | +// expected-error@-5 {{use of undeclared identifier 'atomic_flag'}} | ||
3485 | +#endif | ||
3486 | + | ||
3487 | +// Optional types | ||
3488 | atomic_long l; | ||
3489 | atomic_ulong ul; | ||
3490 | - atomic_float f; | ||
3491 | atomic_double d; | ||
3492 | - atomic_flag fl; | ||
3493 | + atomic_size_t s; | ||
3494 | atomic_intptr_t ip; | ||
3495 | atomic_uintptr_t uip; | ||
3496 | - atomic_size_t s; | ||
3497 | atomic_ptrdiff_t pd; | ||
3498 | -// OpenCL v2.0 s6.13.11.8, _Atomic type specifier and _Atomic type qualifier | ||
3499 | -// are not supported by OpenCL. | ||
3500 | - _Atomic int i; // expected-error {{use of undeclared identifier '_Atomic'}} | ||
3501 | -} | ||
3502 | -#ifndef CL20 | ||
3503 | -// expected-error@-16 {{use of undeclared identifier 'atomic_int'}} | ||
3504 | -// expected-error@-16 {{use of undeclared identifier 'atomic_uint'}} | ||
3505 | -// expected-error@-16 {{use of undeclared identifier 'atomic_long'}} | ||
3506 | -// expected-error@-16 {{use of undeclared identifier 'atomic_ulong'}} | ||
3507 | -// expected-error@-16 {{use of undeclared identifier 'atomic_float'}} | ||
3508 | -// expected-error@-16 {{use of undeclared identifier 'atomic_double'}} | ||
3509 | -// expected-error@-16 {{use of undeclared identifier 'atomic_flag'}} | ||
3510 | -// expected-error@-16 {{use of undeclared identifier 'atomic_intptr_t'}} | ||
3511 | -// expected-error@-16 {{use of undeclared identifier 'atomic_uintptr_t'}} | ||
3512 | -// expected-error@-16 {{use of undeclared identifier 'atomic_size_t'}} | ||
3513 | +// Optional type identifiers are not added in earlier version or if at least | ||
3514 | +// one of the extensions is not supported. Here we check with | ||
3515 | +// `cl_khr_int64_base_atomics` only. | ||
3516 | +#if !defined(LANG_VER_OK) || !defined(cl_khr_int64_base_atomics) | ||
3517 | +// expected-error@-11 {{use of undeclared identifier 'atomic_long'}} | ||
3518 | +// expected-error@-11 {{use of undeclared identifier 'atomic_ulong'}} | ||
3519 | +// expected-error@-11 {{use of undeclared identifier 'atomic_double'}} | ||
3520 | +#if defined(LANG_VER_OK) | ||
3521 | +// expected-error@-15 {{expected ';' after expression}} | ||
3522 | +// expected-error@-16 {{use of undeclared identifier 'l'}} | ||
3523 | +// expected-error@-16 {{expected ';' after expression}} | ||
3524 | +// expected-error@-17 {{use of undeclared identifier 'ul'}} | ||
3525 | +#endif | ||
3526 | +#if !defined(LANG_VER_OK) || defined(__SPIR64__) | ||
3527 | +// expected-error@-18 {{use of undeclared identifier 'atomic_size_t'}} | ||
3528 | // expected-error@-16 {{use of undeclared identifier 'atomic_ptrdiff_t'}} | ||
3529 | -#elif !EXT | ||
3530 | -// expected-error@-26 {{use of type 'atomic_long' (aka '_Atomic(long)') requires cl_khr_int64_base_atomics extension to be enabled}} | ||
3531 | -// expected-error@-27 {{use of type 'atomic_long' (aka '_Atomic(long)') requires cl_khr_int64_extended_atomics extension to be enabled}} | ||
3532 | -// expected-error@-27 {{use of type 'atomic_ulong' (aka '_Atomic(unsigned long)') requires cl_khr_int64_base_atomics extension to be enabled}} | ||
3533 | -// expected-error@-28 {{use of type 'atomic_ulong' (aka '_Atomic(unsigned long)') requires cl_khr_int64_extended_atomics extension to be enabled}} | ||
3534 | -// expected-error@-27 {{use of type 'atomic_double' (aka '_Atomic(double)') requires cl_khr_int64_base_atomics extension to be enabled}} | ||
3535 | -// expected-error@-28 {{use of type 'atomic_double' (aka '_Atomic(double)') requires cl_khr_int64_extended_atomics extension to be enabled}} | ||
3536 | -#if __LP64__ | ||
3537 | -// expected-error-re@-28 {{use of type 'atomic_intptr_t' (aka '_Atomic({{.+}})') requires cl_khr_int64_base_atomics extension to be enabled}} | ||
3538 | -// expected-error-re@-29 {{use of type 'atomic_intptr_t' (aka '_Atomic({{.+}})') requires cl_khr_int64_extended_atomics extension to be enabled}} | ||
3539 | -// expected-error-re@-29 {{use of type 'atomic_uintptr_t' (aka '_Atomic({{.+}})') requires cl_khr_int64_base_atomics extension to be enabled}} | ||
3540 | -// expected-error-re@-30 {{use of type 'atomic_uintptr_t' (aka '_Atomic({{.+}})') requires cl_khr_int64_extended_atomics extension to be enabled}} | ||
3541 | -// expected-error-re@-30 {{use of type 'atomic_size_t' (aka '_Atomic({{.+}})') requires cl_khr_int64_base_atomics extension to be enabled}} | ||
3542 | -// expected-error-re@-31 {{use of type 'atomic_size_t' (aka '_Atomic({{.+}})') requires cl_khr_int64_extended_atomics extension to be enabled}} | ||
3543 | -// expected-error-re@-31 {{use of type 'atomic_ptrdiff_t' (aka '_Atomic({{.+}})') requires cl_khr_int64_base_atomics extension to be enabled}} | ||
3544 | -// expected-error-re@-32 {{use of type 'atomic_ptrdiff_t' (aka '_Atomic({{.+}})') requires cl_khr_int64_extended_atomics extension to be enabled}} | ||
3545 | +#if !defined(LANG_VER_OK) | ||
3546 | +// expected-error@-20 {{use of undeclared identifier 'atomic_intptr_t'}} | ||
3547 | +// expected-error@-20 {{use of undeclared identifier 'atomic_uintptr_t'}} | ||
3548 | +#else | ||
3549 | +// expected-error@-24 {{expected ';' after expression}} | ||
3550 | +// expected-error@-25 {{use of undeclared identifier 's'}} | ||
3551 | +// expected-error@-25 {{unknown type name 'atomic_intptr_t'; did you mean 'atomic_int'?}} | ||
3552 | +// expected-note@* {{'atomic_int' declared here}} | ||
3553 | +// expected-error@-26 {{unknown type name 'atomic_uintptr_t'; did you mean 'atomic_uint'?}} | ||
3554 | +// expected-note@* {{'atomic_uint' declared here}} | ||
3555 | +#endif | ||
3556 | #endif | ||
3557 | #endif | ||
3558 | |||
3559 | -#ifdef CL20 | ||
3560 | +// OpenCL v2.0 s6.13.11.8, _Atomic type specifier and _Atomic type qualifier | ||
3561 | +// are not supported by OpenCL. | ||
3562 | + _Atomic int i; | ||
3563 | +#ifdef __OPENCL_C_VERSION__ | ||
3564 | +// expected-error@-2 {{use of undeclared identifier '_Atomic'}} | ||
3565 | +#else | ||
3566 | + // expected-error@-4 {{unknown type name '_Atomic'}} | ||
3567 | +#endif | ||
3568 | +} | ||
3569 | + | ||
3570 | +#if defined(LANG_VER_OK) | ||
3571 | +int atomic_uint; //expected-error{{redefinition of 'atomic_uint' as different kind of symbol}} | ||
3572 | void foo(atomic_int * ptr) {} | ||
3573 | void atomic_ops_test() { | ||
3574 | atomic_int i; | ||
3575 | @@ -71,4 +83,6 @@ void atomic_ops_test() { | ||
3576 | i += 1; // expected-error {{invalid operands to binary expression ('__private atomic_int' (aka '__private _Atomic(int)') and 'int')}} | ||
3577 | i = i + i; // expected-error {{invalid operands to binary expression ('__private atomic_int' (aka '__private _Atomic(int)') and '__private atomic_int')}} | ||
3578 | } | ||
3579 | +#else | ||
3580 | +__constant int atomic_uint = 1; | ||
3581 | #endif | ||
3582 | diff --git a/clang/test/SemaOpenCL/access-qualifier.cl b/clang/test/SemaOpenCL/access-qualifier.cl | ||
3583 | index a5e1b65daf70..c538e73253ce 100644 | ||
3584 | --- a/clang/test/SemaOpenCL/access-qualifier.cl | ||
3585 | +++ b/clang/test/SemaOpenCL/access-qualifier.cl | ||
3586 | @@ -1,12 +1,14 @@ | ||
3587 | -// RUN: %clang_cc1 -verify -pedantic -fsyntax-only -cl-std=CL1.2 %s | ||
3588 | -// RUN: %clang_cc1 -verify -pedantic -fsyntax-only -cl-std=CL2.0 %s | ||
3589 | +// RUN: %clang_cc1 -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-std=CL1.2 %s -cl-ext=-cl_khr_3d_image_writes | ||
3590 | +// RUN: %clang_cc1 -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-std=CL2.0 %s | ||
3591 | +// RUN: %clang_cc1 -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-std=CL3.0 %s | ||
3592 | +// RUN: %clang_cc1 -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-std=CL3.0 %s -cl-ext=-__opencl_c_read_write_images | ||
3593 | |||
3594 | typedef image1d_t img1d_ro_default; // expected-note {{previously declared 'read_only' here}} | ||
3595 | |||
3596 | typedef write_only image1d_t img1d_wo; // expected-note {{previously declared 'write_only' here}} | ||
3597 | typedef read_only image1d_t img1d_ro; | ||
3598 | |||
3599 | -#if __OPENCL_C_VERSION__ >= 200 | ||
3600 | +#if (__OPENCL_C_VERSION__ == 200) || (__OPENCL_C_VERSION__ == 300 && defined(__opencl_c_read_write_images)) | ||
3601 | typedef read_write image1d_t img1d_rw; | ||
3602 | #endif | ||
3603 | |||
3604 | @@ -17,10 +19,10 @@ typedef read_only int IntRO; // expected-error {{access qualifier can only be us | ||
3605 | void myWrite(write_only image1d_t); // expected-note {{passing argument to parameter here}} expected-note {{passing argument to parameter here}} | ||
3606 | void myRead(read_only image1d_t); // expected-note {{passing argument to parameter here}} | ||
3607 | |||
3608 | -#if __OPENCL_C_VERSION__ >= 200 | ||
3609 | +#if (__OPENCL_C_VERSION__ == 200) || (__OPENCL_C_VERSION__ == 300 && defined(__opencl_c_read_write_images)) | ||
3610 | void myReadWrite(read_write image1d_t); | ||
3611 | #else | ||
3612 | -void myReadWrite(read_write image1d_t); // expected-error {{access qualifier 'read_write' can not be used for '__read_write image1d_t' prior to OpenCL version 2.0}} | ||
3613 | +void myReadWrite(read_write image1d_t); // expected-error {{access qualifier 'read_write' can not be used for '__read_write image1d_t' prior to OpenCL C version 2.0 or in version 3.0 and without __opencl_c_read_write_images feature}} | ||
3614 | #endif | ||
3615 | |||
3616 | |||
3617 | @@ -36,7 +38,7 @@ kernel void k3(img1d_wo img) { | ||
3618 | myWrite(img); | ||
3619 | } | ||
3620 | |||
3621 | -#if __OPENCL_C_VERSION__ >= 200 | ||
3622 | +#if (__OPENCL_C_VERSION__ == 200) || (__OPENCL_C_VERSION__ == 300 && defined(__opencl_c_read_write_images)) | ||
3623 | kernel void k4(img1d_rw img) { | ||
3624 | myReadWrite(img); | ||
3625 | } | ||
3626 | @@ -62,26 +64,26 @@ kernel void k11(read_only write_only image1d_t i){} // expected-error{{multiple | ||
3627 | |||
3628 | kernel void k12(read_only read_only image1d_t i){} // expected-warning {{duplicate 'read_only' declaration specifier}} | ||
3629 | |||
3630 | -#if __OPENCL_C_VERSION__ >= 200 | ||
3631 | +#if (__OPENCL_C_VERSION__ == 200) || (__OPENCL_C_VERSION__ == 300 && defined(__opencl_c_read_write_images)) | ||
3632 | kernel void k13(read_write pipe int i){} // expected-error{{access qualifier 'read_write' can not be used for 'read_only pipe int'}} | ||
3633 | #else | ||
3634 | -kernel void k13(__read_write image1d_t i){} // expected-error{{access qualifier '__read_write' can not be used for '__read_write image1d_t' prior to OpenCL version 2.0}} | ||
3635 | -#endif | ||
3636 | - | ||
3637 | -#if __OPENCL_C_VERSION__ >= 200 | ||
3638 | -void myPipeWrite(write_only pipe int); // expected-note {{passing argument to parameter here}} | ||
3639 | -kernel void k14(read_only pipe int p) { | ||
3640 | - myPipeWrite(p); // expected-error {{passing '__private read_only pipe int' to parameter of incompatible type 'write_only pipe int'}} | ||
3641 | -} | ||
3642 | +kernel void k13(__read_write image1d_t i){} // expected-error{{access qualifier '__read_write' can not be used for '__read_write image1d_t' prior to OpenCL C version 2.0 or in version 3.0 and without __opencl_c_read_write_images feature}} | ||
3643 | #endif | ||
3644 | |||
3645 | #if __OPENCL_C_VERSION__ < 200 | ||
3646 | -kernel void test_image3d_wo(write_only image3d_t img) {} // expected-error {{use of type '__write_only image3d_t' requires cl_khr_3d_image_writes extension to be enabled}} | ||
3647 | +kernel void test_image3d_wo(write_only image3d_t img) {} // expected-error {{use of type '__write_only image3d_t' requires cl_khr_3d_image_writes support}} | ||
3648 | #endif | ||
3649 | |||
3650 | -#if __OPENCL_C_VERSION__ >= 200 | ||
3651 | +#if (__OPENCL_C_VERSION__ == 200) || (__OPENCL_C_VERSION__ == 300 && defined(__opencl_c_read_write_images)) | ||
3652 | kernel void read_write_twice_typedef(read_write img1d_rw i){} // expected-warning {{duplicate 'read_write' declaration specifier}} | ||
3653 | -// expected-note@-74 {{previously declared 'read_write' here}} | ||
3654 | +// expected-note@-67 {{previously declared 'read_write' here}} | ||
3655 | +#endif | ||
3656 | + | ||
3657 | +#if OPENCL_C_VERSION__ >= 200 | ||
3658 | +void myPipeWrite(write_only pipe int); // expected-note {{passing argument to parameter here}} | ||
3659 | +kernel void k14(read_only pipe int p) { | ||
3660 | + myPipeWrite(p); // expected-error {{passing '__private read_only pipe int' to parameter of incompatible type 'write_only pipe int'}} | ||
3661 | +} | ||
3662 | |||
3663 | kernel void pipe_ro_twice(read_only read_only pipe int i){} // expected-warning{{duplicate 'read_only' declaration specifier}} | ||
3664 | // Conflicting access qualifiers | ||
3665 | @@ -94,7 +96,7 @@ kernel void pipe_ro_twice_typedef(read_only ROPipeInt i){} // expected-warning{{ | ||
3666 | |||
3667 | kernel void pass_ro_typedef_to_wo(ROPipeInt p) { | ||
3668 | myPipeWrite(p); // expected-error {{passing '__private ROPipeInt' (aka '__private read_only pipe int') to parameter of incompatible type 'write_only pipe int'}} | ||
3669 | - // expected-note@-25 {{passing argument to parameter here}} | ||
3670 | + // expected-note@-16 {{passing argument to parameter here}} | ||
3671 | } | ||
3672 | #endif | ||
3673 | |||
3674 | diff --git a/clang/test/SemaOpenCL/address-spaces-conversions-cl2.0.cl b/clang/test/SemaOpenCL/address-spaces-conversions-cl2.0.cl | ||
3675 | index a5a838241347..daedce8459aa 100644 | ||
3676 | --- a/clang/test/SemaOpenCL/address-spaces-conversions-cl2.0.cl | ||
3677 | +++ b/clang/test/SemaOpenCL/address-spaces-conversions-cl2.0.cl | ||
3678 | @@ -4,6 +4,9 @@ | ||
3679 | // RUN: %clang_cc1 %s -ffake-address-space-map -verify -pedantic -fsyntax-only -DCONSTANT -cl-std=clc++ | ||
3680 | // RUN: %clang_cc1 %s -ffake-address-space-map -verify -pedantic -fsyntax-only -DGLOBAL -cl-std=clc++ | ||
3681 | // RUN: %clang_cc1 %s -ffake-address-space-map -verify -pedantic -fsyntax-only -DGENERIC -cl-std=clc++ | ||
3682 | +// RUN: %clang_cc1 %s -ffake-address-space-map -verify -pedantic -fsyntax-only -DCONSTANT -cl-std=CL3.0 -cl-ext=+__opencl_c_generic_address_space | ||
3683 | +// RUN: %clang_cc1 %s -ffake-address-space-map -verify -pedantic -fsyntax-only -DGLOBAL -cl-std=CL3.0 -cl-ext=+__opencl_c_generic_address_space | ||
3684 | +// RUN: %clang_cc1 %s -ffake-address-space-map -verify -pedantic -fsyntax-only -DGENERIC -cl-std=CL3.0 -cl-ext=+__opencl_c_generic_address_space | ||
3685 | |||
3686 | /* OpenCLC v2.0 adds a set of restrictions for conversions between pointers to | ||
3687 | * different address spaces, mainly described in Sections 6.5.5 and 6.5.6. | ||
3688 | diff --git a/clang/test/SemaOpenCL/address-spaces.cl b/clang/test/SemaOpenCL/address-spaces.cl | ||
3689 | index 2c4f0fdec524..98b9a39e78ea 100644 | ||
3690 | --- a/clang/test/SemaOpenCL/address-spaces.cl | ||
3691 | +++ b/clang/test/SemaOpenCL/address-spaces.cl | ||
3692 | @@ -1,5 +1,6 @@ | ||
3693 | // RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only | ||
3694 | // RUN: %clang_cc1 %s -cl-std=CL2.0 -verify -pedantic -fsyntax-only | ||
3695 | +// RUN: %clang_cc1 %s -cl-std=CL3.0 -cl-ext=+__opencl_c_generic_address_space -verify -pedantic -fsyntax-only | ||
3696 | // RUN: %clang_cc1 %s -cl-std=clc++ -verify -pedantic -fsyntax-only | ||
3697 | |||
3698 | __constant int ci = 1; | ||
3699 | diff --git a/clang/test/SemaOpenCL/arm-integer-dot-product.cl b/clang/test/SemaOpenCL/arm-integer-dot-product.cl | ||
3700 | index d7219d7402a9..5552f7777954 100644 | ||
3701 | --- a/clang/test/SemaOpenCL/arm-integer-dot-product.cl | ||
3702 | +++ b/clang/test/SemaOpenCL/arm-integer-dot-product.cl | ||
3703 | @@ -1,4 +1,4 @@ | ||
3704 | -// RUN: %clang_cc1 %s -triple spir-unknown-unknown -finclude-default-header -verify -cl-std=CL1.2 -emit-llvm -o - -O0 | ||
3705 | +// RUN: %clang_cc1 %s -triple spir-unknown-unknown -finclude-default-header -fdeclare-opencl-builtins -verify -cl-std=CL1.2 -emit-llvm -o - -cl-ext=-all | ||
3706 | |||
3707 | void test_negative() { | ||
3708 | uchar4 ua8, ub8; | ||
3709 | @@ -7,37 +7,13 @@ void test_negative() { | ||
3710 | short2 sa16, sb16; | ||
3711 | uint ur; | ||
3712 | int sr; | ||
3713 | - ur = arm_dot(ua8, ub8); // expected-error{{no matching function for call to 'arm_dot'}} | ||
3714 | - // expected-note@opencl-c.h:* {{candidate function not viable}} | ||
3715 | - // expected-note@opencl-c.h:* {{candidate unavailable as it requires OpenCL extension 'cl_arm_integer_dot_product_int8' to be enabled}} | ||
3716 | - sr = arm_dot(sa8, sb8); // expected-error{{no matching function for call to 'arm_dot'}} | ||
3717 | - // expected-note@opencl-c.h:* {{candidate function not viable}} | ||
3718 | - // expected-note@opencl-c.h:* {{candidate unavailable as it requires OpenCL extension 'cl_arm_integer_dot_product_int8' to be enabled}} | ||
3719 | - ur = arm_dot_acc(ua8, ub8, ur); // expected-error{{no matching function for call to 'arm_dot_acc'}} | ||
3720 | - // expected-note@opencl-c.h:* {{candidate function not viable}} | ||
3721 | - // expected-note@opencl-c.h:* {{candidate function not viable}} | ||
3722 | - // expected-note@opencl-c.h:* {{candidate function not viable}} | ||
3723 | - // expected-note@opencl-c.h:* {{candidate unavailable as it requires OpenCL extension 'cl_arm_integer_dot_product_accumulate_int8' to be enabled}} | ||
3724 | - sr = arm_dot_acc(sa8, sb8, sr); // expected-error{{no matching function for call to 'arm_dot_acc'}} | ||
3725 | - // expected-note@opencl-c.h:* {{candidate function not viable}} | ||
3726 | - // expected-note@opencl-c.h:* {{candidate function not viable}} | ||
3727 | - // expected-note@opencl-c.h:* {{candidate function not viable}} | ||
3728 | - // expected-note@opencl-c.h:* {{candidate unavailable as it requires OpenCL extension 'cl_arm_integer_dot_product_accumulate_int8' to be enabled}} | ||
3729 | - ur = arm_dot_acc(ua16, ub16, ur); // expected-error{{no matching function for call to 'arm_dot_acc'}} | ||
3730 | - // expected-note@opencl-c.h:* {{candidate function not viable}} | ||
3731 | - // expected-note@opencl-c.h:* {{candidate function not viable}} | ||
3732 | - // expected-note@opencl-c.h:* {{candidate function not viable}} | ||
3733 | - // expected-note@opencl-c.h:* {{candidate unavailable as it requires OpenCL extension 'cl_arm_integer_dot_product_accumulate_int16' to be enabled}} | ||
3734 | - sr = arm_dot_acc(sa16, sb16, sr); // expected-error{{no matching function for call to 'arm_dot_acc'}} | ||
3735 | - // expected-note@opencl-c.h:* {{candidate function not viable}} | ||
3736 | - // expected-note@opencl-c.h:* {{candidate function not viable}} | ||
3737 | - // expected-note@opencl-c.h:* {{candidate function not viable}} | ||
3738 | - // expected-note@opencl-c.h:* {{candidate unavailable as it requires OpenCL extension 'cl_arm_integer_dot_product_accumulate_int16' to be enabled}} | ||
3739 | - ur = arm_dot_acc_sat(ua8, ub8, ur); // expected-error{{no matching function for call to 'arm_dot_acc_sat'}} | ||
3740 | - // expected-note@opencl-c.h:* {{candidate function not viable}} | ||
3741 | - // expected-note@opencl-c.h:* {{candidate unavailable as it requires OpenCL extension 'cl_arm_integer_dot_product_accumulate_saturate_int8' to be enabled}} | ||
3742 | - sr = arm_dot_acc_sat(sa8, sb8, sr); // expected-error{{no matching function for call to 'arm_dot_acc_sat'}} | ||
3743 | - // expected-note@opencl-c.h:* {{candidate function not viable}} | ||
3744 | - // expected-note@opencl-c.h:* {{candidate unavailable as it requires OpenCL extension 'cl_arm_integer_dot_product_accumulate_saturate_int8' to be enabled}} | ||
3745 | + ur = arm_dot(ua8, ub8); // expected-error{{implicit declaration of function 'arm_dot' is invalid in OpenCL}} | ||
3746 | + sr = arm_dot(sa8, sb8); | ||
3747 | + ur = arm_dot_acc(ua8, ub8, ur); // expected-error{{implicit declaration of function 'arm_dot_acc' is invalid in OpenCL}} //expected-note{{'arm_dot_acc' declared here}} | ||
3748 | + sr = arm_dot_acc(sa8, sb8, sr); | ||
3749 | + ur = arm_dot_acc(ua16, ub16, ur); | ||
3750 | + sr = arm_dot_acc(sa16, sb16, sr); | ||
3751 | + ur = arm_dot_acc_sat(ua8, ub8, ur); // expected-error{{implicit declaration of function 'arm_dot_acc_sat' is invalid in OpenCL}} //expected-note{{did you mean 'arm_dot_acc'?}} | ||
3752 | + sr = arm_dot_acc_sat(sa8, sb8, sr); | ||
3753 | } | ||
3754 | |||
3755 | diff --git a/clang/test/SemaOpenCL/cl20-device-side-enqueue.cl b/clang/test/SemaOpenCL/cl20-device-side-enqueue.cl | ||
3756 | index f63e2913c749..d25a03504c03 100644 | ||
3757 | --- a/clang/test/SemaOpenCL/cl20-device-side-enqueue.cl | ||
3758 | +++ b/clang/test/SemaOpenCL/cl20-device-side-enqueue.cl | ||
3759 | @@ -235,11 +235,11 @@ kernel void bar(global unsigned int *buf) | ||
3760 | kernel void foo1(global unsigned int *buf) | ||
3761 | { | ||
3762 | ndrange_t n; | ||
3763 | - buf[0] = get_kernel_max_sub_group_size_for_ndrange(n, ^(){}); // expected-error {{use of declaration 'get_kernel_max_sub_group_size_for_ndrange' requires cl_khr_subgroups extension to be enabled}} | ||
3764 | + buf[0] = get_kernel_max_sub_group_size_for_ndrange(n, ^(){}); // expected-error {{use of declaration 'get_kernel_max_sub_group_size_for_ndrange' requires cl_khr_subgroups support}} | ||
3765 | } | ||
3766 | |||
3767 | kernel void bar1(global unsigned int *buf) | ||
3768 | { | ||
3769 | ndrange_t n; | ||
3770 | - buf[0] = get_kernel_sub_group_count_for_ndrange(n, ^(){}); // expected-error {{use of declaration 'get_kernel_sub_group_count_for_ndrange' requires cl_khr_subgroups extension to be enabled}} | ||
3771 | + buf[0] = get_kernel_sub_group_count_for_ndrange(n, ^(){}); // expected-error {{use of declaration 'get_kernel_sub_group_count_for_ndrange' requires cl_khr_subgroups support}} | ||
3772 | } | ||
3773 | diff --git a/clang/test/SemaOpenCL/extension-begin.cl b/clang/test/SemaOpenCL/extension-begin.cl | ||
3774 | index fdb481f8e092..9124ceba4e2a 100644 | ||
3775 | --- a/clang/test/SemaOpenCL/extension-begin.cl | ||
3776 | +++ b/clang/test/SemaOpenCL/extension-begin.cl | ||
3777 | @@ -29,25 +29,23 @@ | ||
3778 | #ifndef USE_PCH | ||
3779 | // expected-warning@extension-begin.h:4 {{expected 'disable' - ignoring}} | ||
3780 | // expected-warning@extension-begin.h:5 {{expected 'disable' - ignoring}} | ||
3781 | -// expected-warning@extension-begin.h:21 {{OpenCL extension end directive mismatches begin directive - ignoring}} | ||
3782 | #endif // USE_PCH | ||
3783 | |||
3784 | +#if defined(IMPLICIT_INCLUDE) && defined(USE_PCH) | ||
3785 | +//expected-no-diagnostics | ||
3786 | +#endif | ||
3787 | + | ||
3788 | +// Tests that the pragmas are accepted for backward compatibility. | ||
3789 | #pragma OPENCL EXTENSION my_ext : enable | ||
3790 | -void test_f1(void) { | ||
3791 | +#pragma OPENCL EXTENSION my_ext : disable | ||
3792 | + | ||
3793 | +#ifndef my_ext | ||
3794 | +#error "Missing my_ext macro" | ||
3795 | +#endif | ||
3796 | + | ||
3797 | +// When extension is supported its functionality can be used freely. | ||
3798 | +void test(void) { | ||
3799 | struct A test_A1; | ||
3800 | f(); | ||
3801 | g(0); | ||
3802 | } | ||
3803 | - | ||
3804 | -#pragma OPENCL EXTENSION my_ext : disable | ||
3805 | -void test_f2(void) { | ||
3806 | - struct A test_A2; // expected-error {{use of type 'struct A' requires my_ext extension to be enabled}} | ||
3807 | - const struct A test_A_local; // expected-error {{use of type 'struct A' requires my_ext extension to be enabled}} | ||
3808 | - TypedefOfA test_typedef_A; // expected-error {{use of type 'TypedefOfA' (aka 'struct A') requires my_ext extension to be enabled}} | ||
3809 | - PointerOfA test_A_pointer; // expected-error {{use of type 'PointerOfA' (aka 'const __private struct A *') requires my_ext extension to be enabled}} | ||
3810 | - f(); // expected-error {{use of declaration 'f' requires my_ext extension to be enabled}} | ||
3811 | - g(0); // expected-error {{no matching function for call to 'g'}} | ||
3812 | - // expected-note@extension-begin.h:18 {{candidate unavailable as it requires OpenCL extension 'my_ext' to be enabled}} | ||
3813 | - // expected-note@extension-begin.h:23 {{candidate function not viable: requires 0 arguments, but 1 was provided}} | ||
3814 | -} | ||
3815 | - | ||
3816 | diff --git a/clang/test/SemaOpenCL/extension-begin.h b/clang/test/SemaOpenCL/extension-begin.h | ||
3817 | index d9865ba0b33a..0e262e4adb93 100644 | ||
3818 | --- a/clang/test/SemaOpenCL/extension-begin.h | ||
3819 | +++ b/clang/test/SemaOpenCL/extension-begin.h | ||
3820 | @@ -5,10 +5,13 @@ | ||
3821 | #pragma OPENCL EXTENSION all : end | ||
3822 | |||
3823 | #pragma OPENCL EXTENSION my_ext : begin | ||
3824 | - | ||
3825 | struct A { | ||
3826 | int a; | ||
3827 | }; | ||
3828 | +#pragma OPENCL EXTENSION my_ext : end | ||
3829 | +#pragma OPENCL EXTENSION my_ext : end | ||
3830 | + | ||
3831 | +#define my_ext | ||
3832 | |||
3833 | typedef struct A TypedefOfA; | ||
3834 | typedef const __private TypedefOfA* PointerOfA; | ||
3835 | @@ -17,10 +20,8 @@ void f(void); | ||
3836 | |||
3837 | __attribute__((overloadable)) void g(long x); | ||
3838 | |||
3839 | -#pragma OPENCL EXTENSION my_ext : end | ||
3840 | -#pragma OPENCL EXTENSION my_ext : end | ||
3841 | + | ||
3842 | |||
3843 | __attribute__((overloadable)) void g(void); | ||
3844 | |||
3845 | #endif // INCLUDED | ||
3846 | - | ||
3847 | diff --git a/clang/test/SemaOpenCL/extension-version.cl b/clang/test/SemaOpenCL/extension-version.cl | ||
3848 | index b997a00145ef..6f26a23c4192 100644 | ||
3849 | --- a/clang/test/SemaOpenCL/extension-version.cl | ||
3850 | +++ b/clang/test/SemaOpenCL/extension-version.cl | ||
3851 | @@ -3,15 +3,13 @@ | ||
3852 | // RUN: %clang_cc1 -x cl -cl-std=CL1.2 %s -verify -triple spir-unknown-unknown | ||
3853 | // RUN: %clang_cc1 -x cl -cl-std=CL2.0 %s -verify -triple spir-unknown-unknown | ||
3854 | // RUN: %clang_cc1 -x cl -cl-std=clc++ %s -verify -triple spir-unknown-unknown | ||
3855 | +// RUN: %clang_cc1 -x cl -cl-std=CL3.0 %s -verify -triple spir-unknown-unknown | ||
3856 | // RUN: %clang_cc1 -x cl -cl-std=CL %s -verify -triple spir-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES | ||
3857 | // RUN: %clang_cc1 -x cl -cl-std=CL1.1 %s -verify -triple spir-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES | ||
3858 | // RUN: %clang_cc1 -x cl -cl-std=CL1.2 %s -verify -triple spir-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES | ||
3859 | // RUN: %clang_cc1 -x cl -cl-std=CL2.0 %s -verify -triple spir-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES | ||
3860 | // RUN: %clang_cc1 -x cl -cl-std=clc++ %s -verify -triple spir-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES | ||
3861 | - | ||
3862 | -#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) && !defined(TEST_CORE_FEATURES) | ||
3863 | -// expected-no-diagnostics | ||
3864 | -#endif | ||
3865 | +// RUN: %clang_cc1 -x cl -cl-std=CL3.0 %s -verify -triple spir-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES | ||
3866 | |||
3867 | // Extensions in all versions | ||
3868 | #ifndef cl_clang_storage_class_specifiers | ||
3869 | @@ -95,12 +93,12 @@ | ||
3870 | // expected-warning@-2{{OpenCL extension 'cl_khr_fp64' is core feature or supported optional core feature - ignoring}} | ||
3871 | #endif | ||
3872 | |||
3873 | -//Core feature in CL 2.0 | ||
3874 | +//Core feature in CL 2.0, optional core feature in CL 3.0 | ||
3875 | #ifndef cl_khr_3d_image_writes | ||
3876 | #error "Missing cl_khr_3d_image_writes define" | ||
3877 | #endif | ||
3878 | #pragma OPENCL EXTENSION cl_khr_3d_image_writes : enable | ||
3879 | -#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) && defined TEST_CORE_FEATURES | ||
3880 | +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ == 200) && defined TEST_CORE_FEATURES | ||
3881 | // expected-warning@-2{{OpenCL extension 'cl_khr_3d_image_writes' is core feature or supported optional core feature - ignoring}} | ||
3882 | #endif | ||
3883 | |||
3884 | @@ -215,3 +213,55 @@ | ||
3885 | // expected-warning@+2{{unsupported OpenCL extension 'cl_intel_device_side_avc_motion_estimation' - ignoring}} | ||
3886 | #endif | ||
3887 | #pragma OPENCL EXTENSION cl_intel_device_side_avc_motion_estimation : enable | ||
3888 | + | ||
3889 | +// Check that pragmas for the OpenCL 3.0 features are rejected. | ||
3890 | + | ||
3891 | +#pragma OPENCL EXTENSION __opencl_c_int64 : disable | ||
3892 | +//expected-warning@-1{{unknown OpenCL extension '__opencl_c_int64' - ignoring}} | ||
3893 | +#pragma OPENCL EXTENSION __opencl_c_3d_image_writes : disable | ||
3894 | +//expected-warning@-1{{unknown OpenCL extension '__opencl_c_3d_image_writes' - ignoring}} | ||
3895 | +#pragma OPENCL EXTENSION __opencl_c_atomic_order_acq_rel : disable | ||
3896 | +//expected-warning@-1{{unknown OpenCL extension '__opencl_c_atomic_order_acq_rel' - ignoring}} | ||
3897 | +#pragma OPENCL EXTENSION __opencl_c_atomic_order_seq_cst : disable | ||
3898 | +//expected-warning@-1{{unknown OpenCL extension '__opencl_c_atomic_order_seq_cst' - ignoring}} | ||
3899 | +#pragma OPENCL EXTENSION __opencl_c_device_enqueue : disable | ||
3900 | +//expected-warning@-1{{unknown OpenCL extension '__opencl_c_device_enqueue' - ignoring}} | ||
3901 | +#pragma OPENCL EXTENSION __opencl_c_fp64 : disable | ||
3902 | +//expected-warning@-1{{unknown OpenCL extension '__opencl_c_fp64' - ignoring}} | ||
3903 | +#pragma OPENCL EXTENSION __opencl_c_generic_address_space : disable | ||
3904 | +//expected-warning@-1{{unknown OpenCL extension '__opencl_c_generic_address_space' - ignoring}} | ||
3905 | +#pragma OPENCL EXTENSION __opencl_c_images : disable | ||
3906 | +//expected-warning@-1{{unknown OpenCL extension '__opencl_c_images' - ignoring}} | ||
3907 | +#pragma OPENCL EXTENSION __opencl_c_pipes : disable | ||
3908 | +//expected-warning@-1{{unknown OpenCL extension '__opencl_c_pipes' - ignoring}} | ||
3909 | +#pragma OPENCL EXTENSION __opencl_c_program_scope_global_variables : disable | ||
3910 | +//expected-warning@-1{{unknown OpenCL extension '__opencl_c_program_scope_global_variables' - ignoring}} | ||
3911 | +#pragma OPENCL EXTENSION __opencl_c_read_write_images : disable | ||
3912 | +//expected-warning@-1{{unknown OpenCL extension '__opencl_c_read_write_images' - ignoring}} | ||
3913 | +#pragma OPENCL EXTENSION __opencl_c_subgroups : disable | ||
3914 | +//expected-warning@-1{{unknown OpenCL extension '__opencl_c_subgroups' - ignoring}} | ||
3915 | + | ||
3916 | +#pragma OPENCL EXTENSION __opencl_c_int64 : enable | ||
3917 | +//expected-warning@-1{{unknown OpenCL extension '__opencl_c_int64' - ignoring}} | ||
3918 | +#pragma OPENCL EXTENSION __opencl_c_3d_image_writes : enable | ||
3919 | +//expected-warning@-1{{unknown OpenCL extension '__opencl_c_3d_image_writes' - ignoring}} | ||
3920 | +#pragma OPENCL EXTENSION __opencl_c_atomic_order_acq_rel : enable | ||
3921 | +//expected-warning@-1{{unknown OpenCL extension '__opencl_c_atomic_order_acq_rel' - ignoring}} | ||
3922 | +#pragma OPENCL EXTENSION __opencl_c_atomic_order_seq_cst : enable | ||
3923 | +//expected-warning@-1{{unknown OpenCL extension '__opencl_c_atomic_order_seq_cst' - ignoring}} | ||
3924 | +#pragma OPENCL EXTENSION __opencl_c_device_enqueue : enable | ||
3925 | +//expected-warning@-1{{unknown OpenCL extension '__opencl_c_device_enqueue' - ignoring}} | ||
3926 | +#pragma OPENCL EXTENSION __opencl_c_fp64 : enable | ||
3927 | +//expected-warning@-1{{unknown OpenCL extension '__opencl_c_fp64' - ignoring}} | ||
3928 | +#pragma OPENCL EXTENSION __opencl_c_generic_address_space : enable | ||
3929 | +//expected-warning@-1{{unknown OpenCL extension '__opencl_c_generic_address_space' - ignoring}} | ||
3930 | +#pragma OPENCL EXTENSION __opencl_c_images : enable | ||
3931 | +//expected-warning@-1{{unknown OpenCL extension '__opencl_c_images' - ignoring}} | ||
3932 | +#pragma OPENCL EXTENSION __opencl_c_pipes : enable | ||
3933 | +//expected-warning@-1{{unknown OpenCL extension '__opencl_c_pipes' - ignoring}} | ||
3934 | +#pragma OPENCL EXTENSION __opencl_c_program_scope_global_variables : enable | ||
3935 | +//expected-warning@-1{{unknown OpenCL extension '__opencl_c_program_scope_global_variables' - ignoring}} | ||
3936 | +#pragma OPENCL EXTENSION __opencl_c_read_write_images : enable | ||
3937 | +//expected-warning@-1{{unknown OpenCL extension '__opencl_c_read_write_images' - ignoring}} | ||
3938 | +#pragma OPENCL EXTENSION __opencl_c_subgroups : enable | ||
3939 | +//expected-warning@-1{{unknown OpenCL extension '__opencl_c_subgroups' - ignoring}} | ||
3940 | diff --git a/clang/test/SemaOpenCL/extensions.cl b/clang/test/SemaOpenCL/extensions.cl | ||
3941 | index 55dbd1d5eede..d43cdcece2e4 100644 | ||
3942 | --- a/clang/test/SemaOpenCL/extensions.cl | ||
3943 | +++ b/clang/test/SemaOpenCL/extensions.cl | ||
3944 | @@ -1,26 +1,34 @@ | ||
3945 | -// RUN: %clang_cc1 %s -triple spir-unknown-unknown -verify -pedantic -fsyntax-only | ||
3946 | +// RUN: %clang_cc1 %s -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-std=CL1.0 | ||
3947 | // RUN: %clang_cc1 %s -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-std=CL1.1 | ||
3948 | +// RUN: %clang_cc1 %s -triple spir-unknown-unknown -verify -fsyntax-only -cl-std=CL1.1 -DNOPEDANTIC | ||
3949 | // RUN: %clang_cc1 %s -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-std=CL1.2 -DFP64 | ||
3950 | |||
3951 | // Test with a target not supporting fp64. | ||
3952 | -// RUN: %clang_cc1 %s -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -DNOFP64 -DNOFP16 | ||
3953 | +// RUN: %clang_cc1 %s -cl-std=CL1.0 -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -DNOFP64 -DNOFP16 | ||
3954 | +// RUN: %clang_cc1 -cl-std=CL3.0 %s -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -DNOFP64 -DNOFP16 | ||
3955 | |||
3956 | // Test with some extensions enabled or disabled by cmd-line args | ||
3957 | // | ||
3958 | // Target does not support fp64 and fp16 - override it | ||
3959 | -// RUN: %clang_cc1 %s -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -cl-ext=+cl_khr_fp64,+cl_khr_fp16 | ||
3960 | +// RUN: %clang_cc1 %s -cl-std=CL1.0 -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -cl-ext=+cl_khr_fp64,+cl_khr_fp16 | ||
3961 | // | ||
3962 | // Disable or enable all extensions | ||
3963 | -// RUN: %clang_cc1 %s -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-ext=-all -DNOFP64 -DNOFP16 | ||
3964 | -// RUN: %clang_cc1 %s -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -cl-ext=+all | ||
3965 | -// RUN: %clang_cc1 %s -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -cl-ext=+all,-cl_khr_fp64 -DNOFP64 | ||
3966 | -// RUN: %clang_cc1 %s -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -cl-ext=-all,+cl_khr_fp64 -DNOFP16 | ||
3967 | +// RUN: %clang_cc1 %s -cl-std=CL1.0 -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-ext=-all -DNOFP64 -DNOFP16 | ||
3968 | +// RUN: %clang_cc1 %s -cl-std=CL1.0 -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -cl-ext=+all | ||
3969 | +// RUN: %clang_cc1 %s -cl-std=CL1.0 -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -cl-ext=+all,-cl_khr_fp64 -DNOFP64 | ||
3970 | +// RUN: %clang_cc1 %s -cl-std=CL1.0 -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -cl-ext=-all,+cl_khr_fp64 -DNOFP16 | ||
3971 | +// RUN: %clang_cc1 -cl-std=CL3.0 %s -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-ext=-all -DNOFP64 -DNOFP16 | ||
3972 | +// RUN: %clang_cc1 -cl-std=CL3.0 %s -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -cl-ext=+all -DFP64 | ||
3973 | +// RUN: %clang_cc1 -cl-std=CL3.0 %s -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -cl-ext=+all,-__opencl_c_fp64,-cl_khr_fp64 -DNOFP64 | ||
3974 | // | ||
3975 | // Concatenating | ||
3976 | -// RUN: %clang_cc1 %s -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-ext=-cl_khr_fp64 -cl-ext=+cl_khr_fp64 | ||
3977 | -// RUN: %clang_cc1 %s -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-ext=-cl_khr_fp64,+cl_khr_fp64 | ||
3978 | -// RUN: %clang_cc1 %s -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-ext=-all -cl-ext=+cl_khr_fp64 -cl-ext=+cl_khr_fp16 -cl-ext=-cl_khr_fp64 -DNOFP64 | ||
3979 | +// RUN: %clang_cc1 %s -cl-std=CL1.0 -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-ext=-cl_khr_fp64 -cl-ext=+cl_khr_fp64 | ||
3980 | +// RUN: %clang_cc1 %s -cl-std=CL1.0 -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-ext=-cl_khr_fp64,+cl_khr_fp64 | ||
3981 | +// RUN: %clang_cc1 %s -cl-std=CL1.0 -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-ext=-all -cl-ext=+cl_khr_fp64 -cl-ext=+cl_khr_fp16 -cl-ext=-cl_khr_fp64 -DNOFP64 | ||
3982 | // RUN: %clang_cc1 %s -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-ext=-all -cl-ext=+cl_khr_fp64,-cl_khr_fp64,+cl_khr_fp16 -DNOFP64 | ||
3983 | +// RUN: %clang_cc1 -cl-std=CL3.0 %s -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-ext=-__opencl_c_fp64,-cl_khr_fp64 -cl-ext=+__opencl_c_fp64,+cl_khr_fp64 -DFP64 | ||
3984 | +// RUN: %clang_cc1 -cl-std=CL3.0 %s -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-ext=-__opencl_c_fp64,+__opencl_c_fp64,+cl_khr_fp64 -DFP64 | ||
3985 | +// RUN: %clang_cc1 -cl-std=CL3.0 %s -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-ext=-__opencl_c_fp64,-cl_khr_fp64 -DNOFP64 | ||
3986 | |||
3987 | // Test with -finclude-default-header, which includes opencl-c.h. opencl-c.h | ||
3988 | // disables all extensions by default, but supported core extensions for a | ||
3989 | @@ -43,8 +51,20 @@ | ||
3990 | #endif | ||
3991 | |||
3992 | #if (defined(__OPENCL_C_VERSION__) && __OPENCL_C_VERSION__ < 120) | ||
3993 | -void f1(double da) { // expected-error {{type 'double' requires cl_khr_fp64 extension}} | ||
3994 | - double d; // expected-error {{type 'double' requires cl_khr_fp64 extension}} | ||
3995 | +void f1(double da) { | ||
3996 | +#ifdef NOFP64 | ||
3997 | +// expected-error@-2 {{type 'double' requires cl_khr_fp64 support}} | ||
3998 | +#elif !defined(NOPEDANTIC) | ||
3999 | +// expected-warning@-4{{Clang permits use of type 'double' regardless pragma if 'cl_khr_fp64' is supported}} | ||
4000 | +#endif | ||
4001 | + double d; | ||
4002 | +#ifdef NOFP64 | ||
4003 | +// expected-error@-2 {{type 'double' requires cl_khr_fp64 support}} | ||
4004 | +#elif !defined(NOPEDANTIC) | ||
4005 | +// expected-warning@-4{{Clang permits use of type 'double' regardless pragma if 'cl_khr_fp64' is supported}} | ||
4006 | +#endif | ||
4007 | + // FIXME: this diagnostic depends on the extension pragma in the earlier versions. | ||
4008 | + // There is no indication that this behavior is expected. | ||
4009 | (void) 1.0; // expected-warning {{double precision constant requires cl_khr_fp64}} | ||
4010 | } | ||
4011 | #endif | ||
4012 | @@ -72,20 +92,30 @@ int isfinite(float x) { | ||
4013 | void f2(void) { | ||
4014 | double d; | ||
4015 | #ifdef NOFP64 | ||
4016 | -// expected-error@-2{{use of type 'double' requires cl_khr_fp64 extension to be enabled}} | ||
4017 | +#if (defined(__OPENCL_C_VERSION__) && __OPENCL_C_VERSION__ >= 300) | ||
4018 | +// expected-error@-3{{use of type 'double' requires cl_khr_fp64 and __opencl_c_fp64 support}} | ||
4019 | +#else | ||
4020 | +// expected-error@-5{{use of type 'double' requires cl_khr_fp64 support}} | ||
4021 | +#endif | ||
4022 | #endif | ||
4023 | |||
4024 | typedef double double4 __attribute__((ext_vector_type(4))); | ||
4025 | double4 d4 = {0.0f, 2.0f, 3.0f, 1.0f}; | ||
4026 | #ifdef NOFP64 | ||
4027 | -// expected-error@-3 {{use of type 'double' requires cl_khr_fp64 extension to be enabled}} | ||
4028 | -// expected-error@-3 {{use of type 'double4' (vector of 4 'double' values) requires cl_khr_fp64 extension to be enabled}} | ||
4029 | +#if (defined(__OPENCL_C_VERSION__) && __OPENCL_C_VERSION__ >= 300) | ||
4030 | +// expected-error@-4 {{use of type 'double' requires cl_khr_fp64 and __opencl_c_fp64 support}} | ||
4031 | +#else | ||
4032 | +// expected-error@-6 {{use of type 'double' requires cl_khr_fp64 support}} | ||
4033 | +#endif | ||
4034 | #endif | ||
4035 | |||
4036 | (void) 1.0; | ||
4037 | - | ||
4038 | #ifdef NOFP64 | ||
4039 | -// expected-warning@-3{{double precision constant requires cl_khr_fp64, casting to single precision}} | ||
4040 | +#if (defined(__OPENCL_C_VERSION__) && __OPENCL_C_VERSION__ >= 300) | ||
4041 | +// expected-warning@-3{{double precision constant requires cl_khr_fp64 and __opencl_c_fp64, casting to single precision}} | ||
4042 | +#else | ||
4043 | +// expected-warning@-5{{double precision constant requires cl_khr_fp64, casting to single precision}} | ||
4044 | +#endif | ||
4045 | #endif | ||
4046 | } | ||
4047 | |||
4048 | @@ -96,6 +126,11 @@ void f2(void) { | ||
4049 | |||
4050 | #if (defined(__OPENCL_C_VERSION__) && __OPENCL_C_VERSION__ < 120) | ||
4051 | void f3(void) { | ||
4052 | - double d; // expected-error {{type 'double' requires cl_khr_fp64 extension}} | ||
4053 | + double d; | ||
4054 | +#ifdef NOFP64 | ||
4055 | +// expected-error@-2 {{type 'double' requires cl_khr_fp64 support}} | ||
4056 | +#elif !defined(NOPEDANTIC) | ||
4057 | +// expected-warning@-4 {{Clang permits use of type 'double' regardless pragma if 'cl_khr_fp64' is supported}} | ||
4058 | +#endif | ||
4059 | } | ||
4060 | #endif | ||
4061 | diff --git a/clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl b/clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl | ||
4062 | index d1dcdfe8cb35..2db651836cb1 100644 | ||
4063 | --- a/clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl | ||
4064 | +++ b/clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl | ||
4065 | @@ -39,26 +39,7 @@ kernel void test_pointers(volatile global void *global_p, global const int4 *a) | ||
4066 | prefetch(a, 2); | ||
4067 | |||
4068 | atom_add((volatile __global int *)global_p, i); | ||
4069 | -#if !defined(__OPENCL_CPP_VERSION__) && __OPENCL_C_VERSION__ < CL_VERSION_1_1 | ||
4070 | -// expected-error@-2{{no matching function for call to 'atom_add'}} | ||
4071 | - | ||
4072 | -// There are two potential definitions of the function "atom_add", both are | ||
4073 | -// currently disabled because the associated extension is disabled. | ||
4074 | -// expected-note@-6{{candidate function not viable: cannot pass pointer to address space '__global' as a pointer to address space '__local' in 1st argument}} | ||
4075 | -// expected-note@-7{{candidate function not viable: no known conversion}} | ||
4076 | -// expected-note@-8{{candidate function not viable: no known conversion}} | ||
4077 | -// expected-note@-9{{candidate function not viable: no known conversion}} | ||
4078 | -// expected-note@-10{{candidate unavailable as it requires OpenCL extension 'cl_khr_global_int32_base_atomics' to be enabled}} | ||
4079 | -// expected-note@-11{{candidate unavailable as it requires OpenCL extension 'cl_khr_global_int32_base_atomics' to be enabled}} | ||
4080 | -// expected-note@-12{{candidate unavailable as it requires OpenCL extension 'cl_khr_int64_base_atomics' to be enabled}} | ||
4081 | -// expected-note@-13{{candidate unavailable as it requires OpenCL extension 'cl_khr_int64_base_atomics' to be enabled}} | ||
4082 | -#endif | ||
4083 | - | ||
4084 | -#if __OPENCL_C_VERSION__ < CL_VERSION_1_1 | ||
4085 | -#pragma OPENCL EXTENSION cl_khr_global_int32_base_atomics : enable | ||
4086 | -#endif | ||
4087 | |||
4088 | - atom_add((volatile __global int *)global_p, i); | ||
4089 | atom_cmpxchg((volatile __global unsigned int *)global_p, ui, ui); | ||
4090 | } | ||
4091 | |||
4092 | @@ -140,11 +121,9 @@ kernel void basic_image_writeonly(write_only image1d_buffer_t image_write_only_i | ||
4093 | |||
4094 | kernel void basic_subgroup(global uint *out) { | ||
4095 | out[0] = get_sub_group_size(); | ||
4096 | -#if defined(__OPENCL_CPP_VERSION__) | ||
4097 | - // expected-error@-2{{no matching function for call to 'get_sub_group_size'}} | ||
4098 | - // expected-note@-3{{candidate unavailable as it requires OpenCL extension 'cl_khr_subgroups' to be enabled}} | ||
4099 | -#else | ||
4100 | - // expected-error@-5{{use of declaration 'get_sub_group_size' requires cl_khr_subgroups extension to be enabled}} | ||
4101 | +#if __OPENCL_C_VERSION__ <= CL_VERSION_1_2 && !defined(__OPENCL_CPP_VERSION__) | ||
4102 | + // expected-error@-2{{implicit declaration of function 'get_sub_group_size' is invalid in OpenCL}} | ||
4103 | + // expected-error@-3{{implicit conversion changes signedness}} | ||
4104 | #endif | ||
4105 | } | ||
4106 | |||
4107 | diff --git a/clang/test/SemaOpenCL/features.cl b/clang/test/SemaOpenCL/features.cl | ||
4108 | new file mode 100644 | ||
4109 | index 000000000000..57c52694b685 | ||
4110 | --- /dev/null | ||
4111 | +++ b/clang/test/SemaOpenCL/features.cl | ||
4112 | @@ -0,0 +1,48 @@ | ||
4113 | +// RUN: %clang_cc1 -triple spir-unknown-unknown %s -E -dM -o - -x cl -cl-std=CL3.0 -cl-ext=-all \ | ||
4114 | +// RUN: | FileCheck -match-full-lines %s --check-prefix=NO-FEATURES | ||
4115 | +// RUN: %clang_cc1 -triple spir-unknown-unknown %s -E -dM -o - -x cl -cl-std=CL3.0 -cl-ext=+all \ | ||
4116 | +// RUN: | FileCheck -match-full-lines %s --check-prefix=FEATURES | ||
4117 | +// RUN: %clang_cc1 -triple r600-unknown-unknown %s -E -dM -o - -x cl -cl-std=CL3.0 \ | ||
4118 | +// RUN: | FileCheck -match-full-lines %s --check-prefix=NO-FEATURES | ||
4119 | +// RUN: %clang_cc1 -triple r600-unknown-unknown %s -E -dM -o - -x cl -cl-std=CL3.0 -cl-ext=+all \ | ||
4120 | +// RUN: | FileCheck -match-full-lines %s --check-prefix=FEATURES | ||
4121 | + | ||
4122 | +// For OpenCL C 2.0 feature macros are defined only in header, so test that earlier OpenCL | ||
4123 | +// versions don't define feature macros accidentally and CL2.0 don't define them without header | ||
4124 | +// RUN: %clang_cc1 -triple spir-unknown-unknown %s -E -dM -o - -x cl -cl-std=CL1.1 \ | ||
4125 | +// RUN: | FileCheck -match-full-lines %s --check-prefix=NO-FEATURES | ||
4126 | +// RUN: %clang_cc1 -triple spir-unknown-unknown %s -E -dM -o - -x cl -cl-std=CL1.2 \ | ||
4127 | +// RUN: | FileCheck -match-full-lines %s --check-prefix=NO-FEATURES | ||
4128 | +// RUN: %clang_cc1 -triple spir-unknown-unknown %s -E -dM -o - -x cl -cl-std=CL2.0 \ | ||
4129 | +// RUN: | FileCheck -match-full-lines %s --check-prefix=NO-FEATURES | ||
4130 | +// RUN: %clang_cc1 -triple spir-unknown-unknown %s -E -dM -o - -x cl -cl-std=CLC++ \ | ||
4131 | +// RUN: | FileCheck -match-full-lines %s --check-prefix=NO-FEATURES | ||
4132 | + | ||
4133 | +// Note that __opencl_c_int64 is always defined assuming | ||
4134 | +// always compiling for FULL OpenCL profile | ||
4135 | + | ||
4136 | +// FEATURES: #define __opencl_c_3d_image_writes 1 | ||
4137 | +// FEATURES: #define __opencl_c_atomic_order_acq_rel 1 | ||
4138 | +// FEATURES: #define __opencl_c_atomic_order_seq_cst 1 | ||
4139 | +// FEATURES: #define __opencl_c_device_enqueue 1 | ||
4140 | +// FEATURES: #define __opencl_c_fp64 1 | ||
4141 | +// FEATURES: #define __opencl_c_generic_address_space 1 | ||
4142 | +// FEATURES: #define __opencl_c_images 1 | ||
4143 | +// FEATURES: #define __opencl_c_int64 1 | ||
4144 | +// FEATURES: #define __opencl_c_pipes 1 | ||
4145 | +// FEATURES: #define __opencl_c_program_scope_global_variables 1 | ||
4146 | +// FEATURES: #define __opencl_c_read_write_images 1 | ||
4147 | +// FEATURES: #define __opencl_c_subgroups 1 | ||
4148 | + | ||
4149 | +// NO-FEATURES: #define __opencl_c_int64 1 | ||
4150 | +// NO-FEATURES-NOT: __opencl_c_3d_image_writes | ||
4151 | +// NO-FEATURES-NOT: __opencl_c_atomic_order_acq_rel | ||
4152 | +// NO-FEATURES-NOT: __opencl_c_atomic_order_seq_cst | ||
4153 | +// NO-FEATURES-NOT: __opencl_c_device_enqueue | ||
4154 | +// NO-FEATURES-NOT: __opencl_c_fp64 | ||
4155 | +// NO-FEATURES-NOT: __opencl_c_generic_address_space | ||
4156 | +// NO-FEATURES-NOT: __opencl_c_images | ||
4157 | +// NO-FEATURES-NOT: __opencl_c_pipes | ||
4158 | +// NO-FEATURES-NOT: __opencl_c_program_scope_global_variables | ||
4159 | +// NO-FEATURES-NOT: __opencl_c_read_write_images | ||
4160 | +// NO-FEATURES-NOT: __opencl_c_subgroups | ||
4161 | diff --git a/clang/test/SemaOpenCL/intel-subgroup-avc-ext-types.cl b/clang/test/SemaOpenCL/intel-subgroup-avc-ext-types.cl | ||
4162 | index e76d54763016..48ed4c0594d6 100644 | ||
4163 | --- a/clang/test/SemaOpenCL/intel-subgroup-avc-ext-types.cl | ||
4164 | +++ b/clang/test/SemaOpenCL/intel-subgroup-avc-ext-types.cl | ||
4165 | @@ -1,6 +1,9 @@ | ||
4166 | -// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=CL1.2 -cl-ext=+cl_intel_device_side_avc_motion_estimation -fsyntax-only -verify %s | ||
4167 | +// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=CL1.2 -cl-ext=+cl_intel_device_side_avc_motion_estimation -fsyntax-only -verify -DEXT %s | ||
4168 | +// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=CL1.2 -cl-ext=-cl_intel_device_side_avc_motion_estimation -fsyntax-only -verify %s | ||
4169 | |||
4170 | +#ifdef cl_intel_device_side_avc_motion_estimation | ||
4171 | #pragma OPENCL EXTENSION cl_intel_device_side_avc_motion_estimation : enable | ||
4172 | +#endif | ||
4173 | |||
4174 | // All intel_sub_group_avc_* types can only be used as argument or return value | ||
4175 | // of built-in functions defined in the extension. | ||
4176 | @@ -16,55 +19,77 @@ struct st{}; | ||
4177 | // negative test cases for initializers | ||
4178 | void foo(char c, float f, void* v, struct st ss) { | ||
4179 | intel_sub_group_avc_mce_payload_t payload_mce = 0; // No zero initializer for mce types | ||
4180 | - // expected-error@-1 {{initializing '__private intel_sub_group_avc_mce_payload_t' with an expression of incompatible type 'int'}} | ||
4181 | intel_sub_group_avc_ime_payload_t payload_ime = 1; // No literal initializer for *payload_t types | ||
4182 | - // expected-error@-1 {{initializing '__private intel_sub_group_avc_ime_payload_t' with an expression of incompatible type 'int'}} | ||
4183 | intel_sub_group_avc_ref_payload_t payload_ref = f; | ||
4184 | - // expected-error@-1 {{initializing '__private intel_sub_group_avc_ref_payload_t' with an expression of incompatible type '__private float'}} | ||
4185 | intel_sub_group_avc_sic_payload_t payload_sic = ss; | ||
4186 | - // expected-error@-1 {{initializing '__private intel_sub_group_avc_sic_payload_t' with an expression of incompatible type '__private struct st'}} | ||
4187 | - | ||
4188 | intel_sub_group_avc_mce_result_t result_mce = 0; // No zero initializer for mce types | ||
4189 | - // expected-error@-1 {{initializing '__private intel_sub_group_avc_mce_result_t' with an expression of incompatible type 'int'}} | ||
4190 | intel_sub_group_avc_ime_result_t result_ime = 1; // No literal initializer for *result_t types | ||
4191 | - // expected-error@-1 {{initializing '__private intel_sub_group_avc_ime_result_t' with an expression of incompatible type 'int'}} | ||
4192 | intel_sub_group_avc_ref_result_t result_ref = f; | ||
4193 | - // expected-error@-1 {{initializing '__private intel_sub_group_avc_ref_result_t' with an expression of incompatible type '__private float'}} | ||
4194 | intel_sub_group_avc_sic_result_t result_sic = ss; | ||
4195 | - // expected-error@-1 {{initializing '__private intel_sub_group_avc_sic_result_t' with an expression of incompatible type '__private struct st'}} | ||
4196 | - | ||
4197 | intel_sub_group_avc_ime_result_single_reference_streamout_t sstreamout = v; | ||
4198 | - // expected-error@-1 {{initializing '__private intel_sub_group_avc_ime_result_single_reference_streamout_t' with an expression of incompatible type '__private void *__private'}} | ||
4199 | - | ||
4200 | intel_sub_group_avc_ime_result_dual_reference_streamout_t dstreamin_list = {0x0, 0x1}; | ||
4201 | - // expected-warning@-1 {{excess elements in struct initializer}} | ||
4202 | intel_sub_group_avc_ime_dual_reference_streamin_t dstreamin_list2 = {}; | ||
4203 | - // expected-error@-1 {{scalar initializer cannot be empty}} | ||
4204 | intel_sub_group_avc_ime_single_reference_streamin_t dstreamin_list3 = {c}; | ||
4205 | - // expected-error@-1 {{initializing '__private intel_sub_group_avc_ime_single_reference_streamin_t' with an expression of incompatible type '__private char'}} | ||
4206 | intel_sub_group_avc_ime_dual_reference_streamin_t dstreamin_list4 = {1}; | ||
4207 | - // expected-error@-1 {{initializing '__private intel_sub_group_avc_ime_dual_reference_streamin_t' with an expression of incompatible type 'int'}} | ||
4208 | +#ifdef EXT | ||
4209 | +// expected-error@-14 {{initializing '__private intel_sub_group_avc_mce_payload_t' with an expression of incompatible type 'int'}} | ||
4210 | +// expected-error@-14 {{initializing '__private intel_sub_group_avc_ime_payload_t' with an expression of incompatible type 'int'}} | ||
4211 | +// expected-error@-14 {{initializing '__private intel_sub_group_avc_ref_payload_t' with an expression of incompatible type '__private float'}} | ||
4212 | +// expected-error@-14 {{initializing '__private intel_sub_group_avc_sic_payload_t' with an expression of incompatible type '__private struct st'}} | ||
4213 | +// expected-error@-14 {{initializing '__private intel_sub_group_avc_mce_result_t' with an expression of incompatible type 'int'}} | ||
4214 | +// expected-error@-14 {{initializing '__private intel_sub_group_avc_ime_result_t' with an expression of incompatible type 'int'}} | ||
4215 | +// expected-error@-14 {{initializing '__private intel_sub_group_avc_ref_result_t' with an expression of incompatible type '__private float'}} | ||
4216 | +// expected-error@-14 {{initializing '__private intel_sub_group_avc_sic_result_t' with an expression of incompatible type '__private struct st'}} | ||
4217 | +// expected-error@-14 {{initializing '__private intel_sub_group_avc_ime_result_single_reference_streamout_t' with an expression of incompatible type '__private void *__private'}} | ||
4218 | +// expected-warning@-14 {{excess elements in struct initializer}} | ||
4219 | +// expected-error@-14 {{scalar initializer cannot be empty}} | ||
4220 | +// expected-error@-14 {{initializing '__private intel_sub_group_avc_ime_single_reference_streamin_t' with an expression of incompatible type '__private char'}} | ||
4221 | +// expected-error@-14 {{initializing '__private intel_sub_group_avc_ime_dual_reference_streamin_t' with an expression of incompatible type 'int'}} | ||
4222 | +#else | ||
4223 | +// expected-error@-28 {{use of undeclared identifier 'intel_sub_group_avc_mce_payload_t'}} | ||
4224 | +// expected-error@-28 {{use of undeclared identifier 'intel_sub_group_avc_ime_payload_t'}} | ||
4225 | +// expected-error@-28 {{use of undeclared identifier 'intel_sub_group_avc_ref_payload_t'}} | ||
4226 | +// expected-error@-28 {{use of undeclared identifier 'intel_sub_group_avc_sic_payload_t'}} | ||
4227 | +// expected-error@-28 {{use of undeclared identifier 'intel_sub_group_avc_mce_result_t'}} | ||
4228 | +// expected-error@-28 {{use of undeclared identifier 'intel_sub_group_avc_ime_result_t'}} | ||
4229 | +// expected-error@-28 {{use of undeclared identifier 'intel_sub_group_avc_ref_result_t'}} | ||
4230 | +// expected-error@-28 {{use of undeclared identifier 'intel_sub_group_avc_sic_result_t'}} | ||
4231 | +// expected-error@-28 {{use of undeclared identifier 'intel_sub_group_avc_ime_result_single_reference_streamout_t'}} | ||
4232 | +// expected-error@-28 {{use of undeclared identifier 'intel_sub_group_avc_ime_result_dual_reference_streamout_t'}} | ||
4233 | +// expected-error@-28 {{use of undeclared identifier 'intel_sub_group_avc_ime_dual_reference_streamin_t'}} | ||
4234 | +// expected-error@-28 {{use of undeclared identifier 'intel_sub_group_avc_ime_single_reference_streamin_t'}} | ||
4235 | +// expected-error@-28 {{use of undeclared identifier 'intel_sub_group_avc_ime_dual_reference_streamin_t'}} | ||
4236 | +#endif | ||
4237 | } | ||
4238 | |||
4239 | // negative tests for initializers and assignment | ||
4240 | void far() { | ||
4241 | intel_sub_group_avc_mce_payload_t payload_mce; | ||
4242 | intel_sub_group_avc_mce_payload_t payload_mce2 = payload_mce; | ||
4243 | - | ||
4244 | intel_sub_group_avc_ime_payload_t payload_ime; | ||
4245 | intel_sub_group_avc_ref_payload_t payload_ref = payload_ime; | ||
4246 | - // expected-error@-1 {{initializing '__private intel_sub_group_avc_ref_payload_t' with an expression of incompatible type '__private intel_sub_group_avc_ime_payload_t'}} | ||
4247 | - | ||
4248 | intel_sub_group_avc_sic_result_t result_sic; | ||
4249 | intel_sub_group_avc_ime_result_t result_ime; | ||
4250 | result_sic = result_ime; | ||
4251 | - // expected-error@-1 {{assigning to '__private intel_sub_group_avc_sic_result_t' from incompatible type '__private intel_sub_group_avc_ime_result_t'}} | ||
4252 | +#ifdef EXT | ||
4253 | +// expected-error@-5 {{initializing '__private intel_sub_group_avc_ref_payload_t' with an expression of incompatible type '__private intel_sub_group_avc_ime_payload_t'}} | ||
4254 | +// expected-error@-3 {{assigning to '__private intel_sub_group_avc_sic_result_t' from incompatible type '__private intel_sub_group_avc_ime_result_t'}} | ||
4255 | +#else | ||
4256 | +// expected-error@-11 {{use of undeclared identifier 'intel_sub_group_avc_mce_payload_t'}} | ||
4257 | +// expected-error@-11 {{use of undeclared identifier 'intel_sub_group_avc_mce_payload_t'}} | ||
4258 | +// expected-error@-11 {{use of undeclared identifier 'intel_sub_group_avc_ime_payload_t'}} | ||
4259 | +// expected-error@-11 {{use of undeclared identifier 'intel_sub_group_avc_ref_payload_t'}} | ||
4260 | +// expected-error@-11 {{use of undeclared identifier 'intel_sub_group_avc_sic_result_t'}} | ||
4261 | +// expected-error@-11 {{use of undeclared identifier 'intel_sub_group_avc_ime_result_t'}} | ||
4262 | +// expected-error@-11 {{use of undeclared identifier 'result_sic'}} expected-error@-11 {{use of undeclared identifier 'result_ime'}} | ||
4263 | +#endif | ||
4264 | } | ||
4265 | |||
4266 | // Using 0x0 directly allows us not to include opencl-c.h header and not to | ||
4267 | // redefine all of these CLK_AVC_*_INTITIALIZE_INTEL macro. '0x0' value must | ||
4268 | // be in sync with ones defined in opencl-c.h | ||
4269 | |||
4270 | +#ifdef EXT | ||
4271 | // positive test cases | ||
4272 | void bar() { | ||
4273 | const sampler_t vme_sampler = 0x0; | ||
4274 | @@ -102,4 +127,4 @@ void bar() { | ||
4275 | intel_sub_group_avc_ime_single_reference_streamin_t sstreamin_list = {0}; | ||
4276 | intel_sub_group_avc_ime_dual_reference_streamin_t dstreamin_list = {0}; | ||
4277 | } | ||
4278 | - | ||
4279 | +#endif //EXT | ||
4280 | diff --git a/clang/test/SemaOpenCL/storageclass.cl b/clang/test/SemaOpenCL/storageclass.cl | ||
4281 | index f35ab9c2e08c..060aff2354d1 100644 | ||
4282 | --- a/clang/test/SemaOpenCL/storageclass.cl | ||
4283 | +++ b/clang/test/SemaOpenCL/storageclass.cl | ||
4284 | @@ -1,28 +1,118 @@ | ||
4285 | // RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=CL1.2 | ||
4286 | - | ||
4287 | +// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=CL3.0 -cl-ext=-__opencl_c_program_scope_global_variables,-__opencl_c_generic_address_space | ||
4288 | +// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=CL3.0 -cl-ext=+__opencl_c_program_scope_global_variables,-__opencl_c_generic_address_space | ||
4289 | +// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=CL3.0 -cl-ext=-__opencl_c_program_scope_global_variables,+__opencl_c_generic_address_space | ||
4290 | +// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=CL3.0 -cl-ext=+__opencl_c_program_scope_global_variables,+__opencl_c_generic_address_space | ||
4291 | static constant int G1 = 0; | ||
4292 | constant int G2 = 0; | ||
4293 | -int G3 = 0; // expected-error{{program scope variable must reside in constant address space}} | ||
4294 | -global int G4 = 0; // expected-error{{program scope variable must reside in constant address space}} | ||
4295 | |||
4296 | -static float g_implicit_static_var = 0; // expected-error {{program scope variable must reside in constant address space}} | ||
4297 | +int G3 = 0; | ||
4298 | +#ifndef __opencl_c_program_scope_global_variables | ||
4299 | +// expected-error@-2 {{program scope variable must reside in constant address space}} | ||
4300 | +#endif | ||
4301 | + | ||
4302 | +global int G4 = 0; | ||
4303 | +#ifndef __opencl_c_program_scope_global_variables | ||
4304 | +// expected-error@-2 {{program scope variable must reside in constant address space}} | ||
4305 | +#endif | ||
4306 | + | ||
4307 | +static float g_implicit_static_var = 0; | ||
4308 | +#ifndef __opencl_c_program_scope_global_variables | ||
4309 | +// expected-error@-2 {{program scope variable must reside in constant address space}} | ||
4310 | +#endif | ||
4311 | + | ||
4312 | static constant float g_constant_static_var = 0; | ||
4313 | -static global float g_global_static_var = 0; // expected-error {{program scope variable must reside in constant address space}} | ||
4314 | -static local float g_local_static_var = 0; // expected-error {{program scope variable must reside in constant address space}} | ||
4315 | -static private float g_private_static_var = 0; // expected-error {{program scope variable must reside in constant address space}} | ||
4316 | -static generic float g_generic_static_var = 0; // expected-error{{OpenCL C version 1.2 does not support the 'generic' type qualifier}} // expected-error {{program scope variable must reside in constant address space}} | ||
4317 | |||
4318 | -extern float g_implicit_extern_var; // expected-error {{extern variable must reside in constant address space}} | ||
4319 | +static global float g_global_static_var = 0; | ||
4320 | +#ifndef __opencl_c_program_scope_global_variables | ||
4321 | +// expected-error@-2 {{program scope variable must reside in constant address space}} | ||
4322 | +#endif | ||
4323 | + | ||
4324 | +static local float g_local_static_var = 0; | ||
4325 | +#ifndef __opencl_c_program_scope_global_variables | ||
4326 | +// expected-error@-2 {{program scope variable must reside in constant address space}} | ||
4327 | +#else | ||
4328 | +// expected-error@-4 {{program scope variable must reside in global or constant address space}} | ||
4329 | +#endif | ||
4330 | + | ||
4331 | +static private float g_private_static_var = 0; | ||
4332 | +#ifndef __opencl_c_program_scope_global_variables | ||
4333 | +// expected-error@-2 {{program scope variable must reside in constant address space}} | ||
4334 | +#else | ||
4335 | +// expected-error@-4 {{program scope variable must reside in global or constant address space}} | ||
4336 | +#endif | ||
4337 | + | ||
4338 | +static generic float g_generic_static_var = 0; | ||
4339 | +#if (__OPENCL_C_VERSION__ < 300) | ||
4340 | +// expected-error@-2 {{OpenCL C version 1.2 does not support the 'generic' type qualifier}} | ||
4341 | +// expected-error@-3 {{program scope variable must reside in constant address space}} | ||
4342 | +#elif (__OPENCL_C_VERSION__ == 300) | ||
4343 | + #if !defined(__opencl_c_generic_address_space) | ||
4344 | +// expected-error@-6 {{OpenCL C version 3.0 does not support the 'generic' type qualifier}} | ||
4345 | + #endif | ||
4346 | + #if !defined(__opencl_c_program_scope_global_variables) | ||
4347 | +// expected-error@-9 {{program scope variable must reside in constant address space}} | ||
4348 | + #endif | ||
4349 | + #if defined(__opencl_c_generic_address_space) && defined(__opencl_c_program_scope_global_variables) | ||
4350 | +// expected-error@-12 {{program scope variable must reside in global or constant address space}} | ||
4351 | + #endif | ||
4352 | +#endif | ||
4353 | + | ||
4354 | +extern float g_implicit_extern_var; | ||
4355 | +#ifndef __opencl_c_program_scope_global_variables | ||
4356 | +// expected-error@-2 {{extern variable must reside in constant address space}} | ||
4357 | +#endif | ||
4358 | + | ||
4359 | extern constant float g_constant_extern_var; | ||
4360 | -extern global float g_global_extern_var; // expected-error {{extern variable must reside in constant address space}} | ||
4361 | -extern local float g_local_extern_var; // expected-error {{extern variable must reside in constant address space}} | ||
4362 | -extern private float g_private_extern_var; // expected-error {{extern variable must reside in constant address space}} | ||
4363 | -extern generic float g_generic_extern_var; // expected-error{{OpenCL C version 1.2 does not support the 'generic' type qualifier}} // expected-error {{extern variable must reside in constant address space}} | ||
4364 | + | ||
4365 | +extern global float g_global_extern_var; | ||
4366 | +#ifndef __opencl_c_program_scope_global_variables | ||
4367 | +// expected-error@-2 {{extern variable must reside in constant address space}} | ||
4368 | +#endif | ||
4369 | + | ||
4370 | +extern local float g_local_extern_var; | ||
4371 | +#ifndef __opencl_c_program_scope_global_variables | ||
4372 | +// expected-error@-2 {{extern variable must reside in constant address space}} | ||
4373 | +#else | ||
4374 | +// expected-error@-4 {{extern variable must reside in global or constant address space}} | ||
4375 | +#endif | ||
4376 | + | ||
4377 | +extern private float g_private_extern_var; | ||
4378 | +#ifndef __opencl_c_program_scope_global_variables | ||
4379 | +// expected-error@-2 {{extern variable must reside in constant address space}} | ||
4380 | +#else | ||
4381 | +// expected-error@-4 {{extern variable must reside in global or constant address space}} | ||
4382 | +#endif | ||
4383 | + | ||
4384 | +extern generic float g_generic_extern_var; | ||
4385 | +#if (__OPENCL_C_VERSION__ < 300) | ||
4386 | +// expected-error@-2 {{OpenCL C version 1.2 does not support the 'generic' type qualifier}} | ||
4387 | +// expected-error@-3 {{extern variable must reside in constant address space}} | ||
4388 | +#elif (__OPENCL_C_VERSION__ == 300) | ||
4389 | + #if !defined(__opencl_c_generic_address_space) | ||
4390 | +// expected-error@-6 {{OpenCL C version 3.0 does not support the 'generic' type qualifier}} | ||
4391 | + #endif | ||
4392 | + #if !defined(__opencl_c_program_scope_global_variables) | ||
4393 | +// expected-error@-9 {{extern variable must reside in constant address space}} | ||
4394 | + #endif | ||
4395 | + #if defined(__opencl_c_generic_address_space) && defined(__opencl_c_program_scope_global_variables) | ||
4396 | +// expected-error@-12 {{extern variable must reside in global or constant address space}} | ||
4397 | + #endif | ||
4398 | +#endif | ||
4399 | |||
4400 | void kernel foo(int x) { | ||
4401 | // static is not allowed at local scope before CL2.0 | ||
4402 | - static int S1 = 5; // expected-error{{variables in function scope cannot be declared static}} | ||
4403 | - static constant int S2 = 5; // expected-error{{variables in function scope cannot be declared static}} | ||
4404 | + static int S1 = 5; | ||
4405 | +#if __OPENCL_C_VERSION__ < 300 | ||
4406 | +// expected-error@-2 {{variables in function scope cannot be declared static}} | ||
4407 | +#elif !defined(__opencl_c_program_scope_global_variables) | ||
4408 | +// expected-error@-4 {{static local variable must reside in constant address space}} | ||
4409 | +#endif | ||
4410 | + | ||
4411 | + static constant int S2 = 5; | ||
4412 | +#if __OPENCL_C_VERSION__ < 300 | ||
4413 | +// expected-error@-2 {{variables in function scope cannot be declared static}} | ||
4414 | +#endif | ||
4415 | |||
4416 | constant int L1 = 0; | ||
4417 | local int L2; | ||
4418 | @@ -32,12 +122,13 @@ void kernel foo(int x) { | ||
4419 | constant int L1 = 42; // expected-error {{variables in the constant address space can only be declared in the outermost scope of a kernel function}} | ||
4420 | } | ||
4421 | |||
4422 | - auto int L3 = 7; // expected-error{{OpenCL C version 1.2 does not support the 'auto' storage class specifier}} | ||
4423 | + auto int L3 = 7; // expected-error-re{{OpenCL C version {{1.2|3.0}} does not support the 'auto' storage class specifier}} | ||
4424 | global int L4; // expected-error{{function scope variable cannot be declared in global address space}} | ||
4425 | __attribute__((address_space(100))) int L5; // expected-error{{automatic variable qualified with an invalid address space}} | ||
4426 | |||
4427 | constant int L6 = x; // expected-error {{initializer element is not a compile-time constant}} | ||
4428 | global int *constant L7 = &G4; | ||
4429 | + | ||
4430 | private int *constant L8 = &x; // expected-error {{initializer element is not a compile-time constant}} | ||
4431 | constant int *constant L9 = &L1; | ||
4432 | local int *constant L10 = &L2; // expected-error {{initializer element is not a compile-time constant}} | ||
4433 | @@ -59,17 +150,106 @@ void f() { | ||
4434 | __attribute__((address_space(100))) int L4; // expected-error{{automatic variable qualified with an invalid address space}} | ||
4435 | } | ||
4436 | |||
4437 | - static float l_implicit_static_var = 0; // expected-error {{variables in function scope cannot be declared static}} | ||
4438 | - static constant float l_constant_static_var = 0; // expected-error {{variables in function scope cannot be declared static}} | ||
4439 | - static global float l_global_static_var = 0; // expected-error {{variables in function scope cannot be declared static}} | ||
4440 | - static local float l_local_static_var = 0; // expected-error {{variables in function scope cannot be declared static}} | ||
4441 | - static private float l_private_static_var = 0; // expected-error {{variables in function scope cannot be declared static}} | ||
4442 | - static generic float l_generic_static_var = 0; // expected-error{{OpenCL C version 1.2 does not support the 'generic' type qualifier}} // expected-error {{variables in function scope cannot be declared static}} | ||
4443 | + static float l_implicit_static_var = 0; | ||
4444 | +#if __OPENCL_C_VERSION__ < 300 | ||
4445 | +// expected-error@-2 {{variables in function scope cannot be declared static}} | ||
4446 | +#elif !defined(__opencl_c_program_scope_global_variables) | ||
4447 | +// expected-error@-4 {{static local variable must reside in constant address space}} | ||
4448 | +#endif | ||
4449 | + | ||
4450 | + static constant float l_constant_static_var = 0; | ||
4451 | +#if __OPENCL_C_VERSION__ < 300 | ||
4452 | +// expected-error@-2 {{variables in function scope cannot be declared static}} | ||
4453 | +#endif | ||
4454 | + | ||
4455 | + static global float l_global_static_var = 0; | ||
4456 | +#if __OPENCL_C_VERSION__ < 300 | ||
4457 | +// expected-error@-2 {{variables in function scope cannot be declared static}} | ||
4458 | +#elif !defined(__opencl_c_program_scope_global_variables) | ||
4459 | +// expected-error@-4 {{static local variable must reside in constant address space}} | ||
4460 | +#endif | ||
4461 | + | ||
4462 | + static local float l_local_static_var = 0; | ||
4463 | +#if __OPENCL_C_VERSION__ < 300 | ||
4464 | +// expected-error@-2 {{variables in function scope cannot be declared static}} | ||
4465 | +#elif !defined(__opencl_c_program_scope_global_variables) | ||
4466 | +// expected-error@-4 {{static local variable must reside in constant address space}} | ||
4467 | +#elif defined(__opencl_c_program_scope_global_variables) | ||
4468 | +// expected-error@-6 {{static local variable must reside in global or constant address space}} | ||
4469 | +#endif | ||
4470 | + | ||
4471 | + static private float l_private_static_var = 0; | ||
4472 | +#if __OPENCL_C_VERSION__ < 300 | ||
4473 | +// expected-error@-2 {{variables in function scope cannot be declared static}} | ||
4474 | +#elif !defined(__opencl_c_program_scope_global_variables) | ||
4475 | +// expected-error@-4 {{static local variable must reside in constant address space}} | ||
4476 | +#elif defined(__opencl_c_program_scope_global_variables) | ||
4477 | +// expected-error@-6 {{static local variable must reside in global or constant address space}} | ||
4478 | +#endif | ||
4479 | + | ||
4480 | + static generic float l_generic_static_var = 0; | ||
4481 | +#if (__OPENCL_C_VERSION__ < 300) | ||
4482 | +// expected-error@-2 {{OpenCL C version 1.2 does not support the 'generic' type qualifier}} | ||
4483 | +// expected-error@-3 {{variables in function scope cannot be declared static}} | ||
4484 | +#elif (__OPENCL_C_VERSION__ == 300) | ||
4485 | + #if !defined(__opencl_c_generic_address_space) | ||
4486 | +// expected-error@-6 {{OpenCL C version 3.0 does not support the 'generic' type qualifier}} | ||
4487 | + #endif | ||
4488 | + #if !defined(__opencl_c_program_scope_global_variables) | ||
4489 | +// expected-error@-9 {{static local variable must reside in constant address space}} | ||
4490 | + #endif | ||
4491 | + #if defined(__opencl_c_generic_address_space) && defined(__opencl_c_program_scope_global_variables) | ||
4492 | +// expected-error@-12 {{static local variable must reside in global or constant address space}} | ||
4493 | + #endif | ||
4494 | +#endif | ||
4495 | + | ||
4496 | + extern float l_implicit_extern_var; | ||
4497 | +#if __OPENCL_C_VERSION__ < 300 | ||
4498 | +// expected-error@-2 {{extern variable must reside in constant address space}} | ||
4499 | +#elif !defined(__opencl_c_program_scope_global_variables) | ||
4500 | +// expected-error@-4 {{extern variable must reside in constant address space}} | ||
4501 | +#endif | ||
4502 | |||
4503 | - extern float l_implicit_extern_var; // expected-error {{extern variable must reside in constant address space}} | ||
4504 | extern constant float l_constant_extern_var; | ||
4505 | - extern global float l_global_extern_var; // expected-error {{extern variable must reside in constant address space}} | ||
4506 | - extern local float l_local_extern_var; // expected-error {{extern variable must reside in constant address space}} | ||
4507 | - extern private float l_private_extern_var; // expected-error {{extern variable must reside in constant address space}} | ||
4508 | - extern generic float l_generic_extern_var; // expected-error{{OpenCL C version 1.2 does not support the 'generic' type qualifier}} // expected-error {{extern variable must reside in constant address space}} | ||
4509 | + | ||
4510 | + extern global float l_global_extern_var; | ||
4511 | +#if __OPENCL_C_VERSION__ < 300 | ||
4512 | +// expected-error@-2 {{extern variable must reside in constant address space}} | ||
4513 | +#elif !defined(__opencl_c_program_scope_global_variables) | ||
4514 | +// expected-error@-4 {{extern variable must reside in constant address space}} | ||
4515 | +#endif | ||
4516 | + | ||
4517 | + extern local float l_local_extern_var; | ||
4518 | +#if __OPENCL_C_VERSION__ < 300 | ||
4519 | +// expected-error@-2 {{extern variable must reside in constant address space}} | ||
4520 | +#elif !defined(__opencl_c_program_scope_global_variables) | ||
4521 | +// expected-error@-4 {{extern variable must reside in constant address space}} | ||
4522 | +#elif defined(__opencl_c_program_scope_global_variables) | ||
4523 | +// expected-error@-6 {{extern variable must reside in global or constant address space}} | ||
4524 | +#endif | ||
4525 | + | ||
4526 | + extern private float l_private_extern_var; | ||
4527 | +#if __OPENCL_C_VERSION__ < 300 | ||
4528 | +// expected-error@-2 {{extern variable must reside in constant address space}} | ||
4529 | +#elif !defined(__opencl_c_program_scope_global_variables) | ||
4530 | +// expected-error@-4 {{extern variable must reside in constant address space}} | ||
4531 | +#elif defined(__opencl_c_program_scope_global_variables) | ||
4532 | +// expected-error@-6 {{extern variable must reside in global or constant address space}} | ||
4533 | +#endif | ||
4534 | + | ||
4535 | + extern generic float l_generic_extern_var; | ||
4536 | +#if (__OPENCL_C_VERSION__ < 300) | ||
4537 | +// expected-error@-2 {{OpenCL C version 1.2 does not support the 'generic' type qualifier}} | ||
4538 | +// expected-error@-3 {{extern variable must reside in constant address space}} | ||
4539 | +#elif (__OPENCL_C_VERSION__ == 300) | ||
4540 | + #if !defined(__opencl_c_generic_address_space) | ||
4541 | +// expected-error@-6 {{OpenCL C version 3.0 does not support the 'generic' type qualifier}} | ||
4542 | + #endif | ||
4543 | + #if !defined(__opencl_c_program_scope_global_variables) | ||
4544 | +// expected-error@-9 {{extern variable must reside in constant address space}} | ||
4545 | + #endif | ||
4546 | + #if defined(__opencl_c_generic_address_space) && defined(__opencl_c_program_scope_global_variables) | ||
4547 | +// expected-error@-12 {{extern variable must reside in global or constant address space}} | ||
4548 | + #endif | ||
4549 | +#endif | ||
4550 | } | ||
4551 | diff --git a/clang/test/SemaOpenCL/unsupported-image.cl b/clang/test/SemaOpenCL/unsupported-image.cl | ||
4552 | new file mode 100644 | ||
4553 | index 000000000000..40772460e54d | ||
4554 | --- /dev/null | ||
4555 | +++ b/clang/test/SemaOpenCL/unsupported-image.cl | ||
4556 | @@ -0,0 +1,69 @@ | ||
4557 | +// RUN: %clang_cc1 -triple spir-unknown-unknown -verify -cl-std=CL3.0 -cl-ext=-__opencl_c_images,-__opencl_c_read_write_images,-cl_khr_3d_image_writes,-__opencl_c_3d_image_writes %s | ||
4558 | +// RUN: %clang_cc1 -triple spir-unknown-unknown -verify -cl-std=CL3.0 -cl-ext=+__opencl_c_images,+__opencl_c_read_write_images,+cl_khr_3d_image_writes,+__opencl_c_3d_image_writes %s | ||
4559 | +// RUN: %clang_cc1 -triple spir-unknown-unknown -verify -cl-std=CL3.0 -cl-ext=+__opencl_c_images,+__opencl_c_read_write_images,-cl_khr_3d_image_writes,-__opencl_c_3d_image_writes %s | ||
4560 | + | ||
4561 | +#if defined(__opencl_c_images) && defined(__opencl_c_3d_image_writes) | ||
4562 | +//expected-no-diagnostics | ||
4563 | +#endif | ||
4564 | + | ||
4565 | +void test1(image1d_t i) {} | ||
4566 | +#if !defined(__opencl_c_images) | ||
4567 | +// expected-error@-2{{use of type '__read_only image1d_t' requires __opencl_c_images support}} | ||
4568 | +#endif | ||
4569 | + | ||
4570 | +void test2(image2d_t i) {} | ||
4571 | +#if !defined(__opencl_c_images) | ||
4572 | +// expected-error@-2{{use of type '__read_only image2d_t' requires __opencl_c_images support}} | ||
4573 | +#endif | ||
4574 | + | ||
4575 | +void test3(image1d_array_t i) {} | ||
4576 | +#if !defined(__opencl_c_images) | ||
4577 | +// expected-error@-2{{use of type '__read_only image1d_array_t' requires __opencl_c_images support}} | ||
4578 | +#endif | ||
4579 | + | ||
4580 | +void test4(image2d_array_t i) {} | ||
4581 | +#if !defined(__opencl_c_images) | ||
4582 | +// expected-error@-2{{use of type '__read_only image2d_array_t' requires __opencl_c_images support}} | ||
4583 | +#endif | ||
4584 | + | ||
4585 | +void test5(image2d_depth_t i) {} | ||
4586 | +#if !defined(__opencl_c_images) | ||
4587 | +// expected-error@-2{{use of type '__read_only image2d_depth_t' requires __opencl_c_images support}} | ||
4588 | +#endif | ||
4589 | + | ||
4590 | +void test6(image1d_buffer_t i) {} | ||
4591 | +#if !defined(__opencl_c_images) | ||
4592 | +// expected-error@-2{{use of type '__read_only image1d_buffer_t' requires __opencl_c_images support}} | ||
4593 | +#endif | ||
4594 | + | ||
4595 | +void test7(image2d_msaa_t i) {} | ||
4596 | +#if !defined(__opencl_c_images) | ||
4597 | +// expected-error@-2{{use of type '__read_only image2d_msaa_t' requires __opencl_c_images support}} | ||
4598 | +#endif | ||
4599 | + | ||
4600 | +void test8(image2d_array_msaa_t i) {} | ||
4601 | +#if !defined(__opencl_c_images) | ||
4602 | +// expected-error@-2{{use of type '__read_only image2d_array_msaa_t' requires __opencl_c_images support}} | ||
4603 | +#endif | ||
4604 | + | ||
4605 | +void test9(image2d_msaa_depth_t i) {} | ||
4606 | +#if !defined(__opencl_c_images) | ||
4607 | +// expected-error@-2{{use of type '__read_only image2d_msaa_depth_t' requires __opencl_c_images support}} | ||
4608 | +#endif | ||
4609 | + | ||
4610 | +void test10(image2d_array_msaa_depth_t i) {} | ||
4611 | +#if !defined(__opencl_c_images) | ||
4612 | +// expected-error@-2{{use of type '__read_only image2d_array_msaa_depth_t' requires __opencl_c_images support}} | ||
4613 | +#endif | ||
4614 | + | ||
4615 | +void test11(sampler_t s) {} | ||
4616 | +#if !defined(__opencl_c_images) | ||
4617 | +// expected-error@-2{{use of type 'sampler_t' requires __opencl_c_images support}} | ||
4618 | +#endif | ||
4619 | + | ||
4620 | +void test12(write_only image3d_t i) {} | ||
4621 | +#if !defined(__opencl_c_images) | ||
4622 | +// expected-error@-2{{use of type '__write_only image3d_t' requires __opencl_c_images support}} | ||
4623 | +#elif !defined(__opencl_c_3d_image_writes) | ||
4624 | +// expected-error@-4{{use of type '__write_only image3d_t' requires cl_khr_3d_image_writes and __opencl_c_3d_image_writes support}} | ||
4625 | +#endif | ||
4626 | -- | ||
4627 | 2.18.1 | ||
4628 | |||
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 e3fd054b..00000000 --- a/dynamic-layers/clang-layer/recipes-devtools/clang/llvm-project-source.bbappend +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | FILESEXTRAPATHS:prepend:intel-x86-common := "${THISDIR}/files:" | ||
2 | |||
3 | SRC_URI_LLVM12_PATCHES = " \ | ||
4 | file://llvm12-0001-Remove-__IMAGE_SUPPORT__-macro-for-SPIR-since-SPIR-d.patch \ | ||
5 | file://llvm12-0002-Avoid-calling-ParseCommandLineOptions-in-BackendUtil.patch \ | ||
6 | file://llvm12-0003-Support-cl_ext_float_atomics.patch \ | ||
7 | file://llvm12-0004-ispc-12_0_disable-A-B-A-B-and-BSWAP-in-InstCombine.patch \ | ||
8 | file://llvm12-0005-ispc-12_0_fix_for_2111.patch \ | ||
9 | file://llvm12-0006-OpenCL-Add-cl_khr_integer_dot_product.patch \ | ||
10 | file://llvm12-0007-OpenCL-3.0-support.patch \ | ||
11 | " | ||
12 | |||
13 | SRC_URI:append:intel-x86-common = "${@bb.utils.contains('LLVMVERSION', '12.0.0', ' ${SRC_URI_LLVM12_PATCHES} ', '', d)}" | ||
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/0002-Build-not-able-to-locate-cpp_generation_tool.patch index 4646856d..45288ce1 100644 --- 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/0002-Build-not-able-to-locate-cpp_generation_tool.patch | |||
@@ -1,35 +1,34 @@ | |||
1 | From 40e9344d37d62158e6c9f72919f0595ef5fde61a Mon Sep 17 00:00:00 2001 | 1 | From 8c330d0cb5167612296801f0202b0de35e9ca88d Mon Sep 17 00:00:00 2001 |
2 | From: Dongwon Kim <dongwon.kim@intel.com> | 2 | From: Dongwon Kim <dongwon.kim@intel.com> |
3 | Date: Sat, 21 Aug 2021 16:09:39 -0700 | 3 | Date: Sat, 21 Aug 2021 16:09:39 -0700 |
4 | Subject: [PATCH] Build not able to locate cpp_generation_tool. | 4 | Subject: [PATCH 2/5] Build not able to locate cpp_generation_tool. |
5 | 5 | ||
6 | Upstream-Status: Inappropriate [oe specific] | 6 | Upstream-Status: Inappropriate [oe specific] |
7 | 7 | ||
8 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | 8 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> |
9 | Signed-off-by: Dongwon Kim <dongwon.kim@intel.com> | 9 | Signed-off-by: Dongwon Kim <dongwon.kim@intel.com> |
10 | |||
11 | --- | 10 | --- |
12 | shared/source/built_ins/kernels/CMakeLists.txt | 8 ++++---- | 11 | shared/source/built_ins/kernels/CMakeLists.txt | 10 +++++----- |
13 | 1 file changed, 4 insertions(+), 4 deletions(-) | 12 | 1 file changed, 5 insertions(+), 5 deletions(-) |
14 | 13 | ||
15 | diff --git a/shared/source/built_ins/kernels/CMakeLists.txt b/shared/source/built_ins/kernels/CMakeLists.txt | 14 | Index: git/shared/source/built_ins/kernels/CMakeLists.txt |
16 | index 769e2a100..eef25747e 100644 | 15 | =================================================================== |
17 | --- a/shared/source/built_ins/kernels/CMakeLists.txt | 16 | --- git.orig/shared/source/built_ins/kernels/CMakeLists.txt |
18 | +++ b/shared/source/built_ins/kernels/CMakeLists.txt | 17 | +++ git/shared/source/built_ins/kernels/CMakeLists.txt |
19 | @@ -94,9 +94,9 @@ function(compile_builtin core_type platform_type builtin bits builtin_options mo | 18 | @@ -122,9 +122,9 @@ function(compile_builtin core_type platf |
20 | ) | 19 | endif() |
21 | add_custom_command( | 20 | add_custom_command( |
22 | OUTPUT ${OUTPUT_FILE_CPP} | 21 | OUTPUT ${OUTPUT_FILE_CPP} |
23 | - COMMAND $<TARGET_FILE:cpp_generate_tool> --file ${BINARY_OUTPUT}.gen --output ${OUTPUT_FILE_CPP} --array ${mode}_${BASENAME} --platform ${family_name_with_type} --revision_id ${REVISION_ID} | 22 | - COMMAND $<TARGET_FILE:cpp_generate_tool> --file ${BINARY_OUTPUT}.bin --output ${OUTPUT_FILE_CPP} --array ${mode}_${BASENAME} --device ${RELEASE_FILENAME} |
24 | + COMMAND cpp_generate_tool --file ${BINARY_OUTPUT}.gen --output ${OUTPUT_FILE_CPP} --array ${mode}_${BASENAME} --platform ${family_name_with_type} --revision_id ${REVISION_ID} | 23 | + COMMAND cpp_generate_tool --file ${BINARY_OUTPUT}.bin --output ${OUTPUT_FILE_CPP} --array ${mode}_${BASENAME} --device ${RELEASE_FILENAME} |
25 | WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | 24 | WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} |
26 | - DEPENDS ${OUTPUT_FILES_BINARIES} $<TARGET_FILE:cpp_generate_tool> | 25 | - DEPENDS ${OUTPUT_FILES_BINARIES} $<TARGET_FILE:cpp_generate_tool> |
27 | + DEPENDS ${OUTPUT_FILES_BINARIES} cpp_generate_tool | 26 | + DEPENDS ${OUTPUT_FILES_BINARIES} cpp_generate_tool |
28 | ) | 27 | ) |
29 | list(APPEND BUILTINS_COMMANDS "${OUTPUT_FILE_CPP}") | 28 | list(APPEND BUILTINS_COMMANDS "${OUTPUT_FILE_CPP}") |
30 | else() | 29 | else() |
31 | @@ -147,9 +147,9 @@ function(generate_cpp_spirv builtin) | 30 | @@ -176,9 +176,9 @@ function(generate_cpp_spirv builtin) |
32 | ) | 31 | endif() |
33 | add_custom_command( | 32 | add_custom_command( |
34 | OUTPUT ${OUTPUT_FILE_CPP} | 33 | OUTPUT ${OUTPUT_FILE_CPP} |
35 | - COMMAND $<TARGET_FILE:cpp_generate_tool> --file ${GENERATED_SPV_INPUT} --output ${OUTPUT_FILE_CPP} --array ${BASENAME} | 34 | - COMMAND $<TARGET_FILE:cpp_generate_tool> --file ${GENERATED_SPV_INPUT} --output ${OUTPUT_FILE_CPP} --array ${BASENAME} |
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/external-ocloc.patch b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/external-ocloc.patch deleted file mode 100644 index 9ee8c96a..00000000 --- a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/external-ocloc.patch +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | From 1189028d9f77265edf6258a66f8ecadf3aad556a 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 9b6bd3cd3..0aba48709 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 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 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=${NEO__IGC_LIBRARY_PATH}:$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>) | ||
33 | + else() | ||
34 | + set(ocloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>) | ||
35 | + endif() | ||
36 | endif() | ||
37 | endif() | ||
38 | -- | ||
39 | 2.20.1 | ||
40 | |||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_22.23.23405.bb b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_25.13.33276.16.bb index dae08cff..b13daaa8 100644 --- a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_22.23.23405.bb +++ b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_25.13.33276.16.bb | |||
@@ -4,27 +4,22 @@ is an open source project to converge Intel's development efforts \ | |||
4 | on OpenCL(TM) compute stacks supporting the GEN graphics hardware \ | 4 | on OpenCL(TM) compute stacks supporting the GEN graphics hardware \ |
5 | architecture." | 5 | architecture." |
6 | 6 | ||
7 | LICENSE = "MIT" | 7 | LICENSE = "MIT & Apache-2.0" |
8 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=9280143b568466d8fbe385f838078b93 \ | 8 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eca6ec6997e18db166db7109cdbe611c \ |
9 | file://third_party/opencl_headers/LICENSE;md5=dcefc90f4c3c689ec0c2489064e7273b" | 9 | file://third_party/opencl_headers/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" |
10 | 10 | ||
11 | SRC_URI = "git://github.com/intel/compute-runtime.git;protocol=https;branch=master \ | 11 | SRC_URI = "git://github.com/intel/compute-runtime.git;protocol=https;branch=releases/25.13 \ |
12 | " | 12 | file://0002-Build-not-able-to-locate-cpp_generation_tool.patch \ |
13 | file://0003-external-ocloc.patch \ | ||
14 | " | ||
13 | 15 | ||
14 | SRC_URI:append:class-target = "file://allow-to-find-cpp-generation-tool.patch \ | 16 | SRCREV = "a9961bdfaa07250fd52ff930bf8f31fb4e3b7799" |
15 | file://external-ocloc.patch \ | ||
16 | " | ||
17 | 17 | ||
18 | SRCREV = "325db6a99c6a21f6610633d43bf57553ba8554ac" | 18 | DEPENDS += " intel-graphics-compiler gmmlib libva qemu-native" |
19 | |||
20 | S = "${WORKDIR}/git" | ||
21 | |||
22 | DEPENDS += " intel-graphics-compiler gmmlib" | ||
23 | DEPENDS:append:class-target = " intel-compute-runtime-native libva" | ||
24 | 19 | ||
25 | RDEPENDS:${PN} += " intel-graphics-compiler gmmlib" | 20 | RDEPENDS:${PN} += " intel-graphics-compiler gmmlib" |
26 | 21 | ||
27 | inherit cmake pkgconfig | 22 | inherit cmake pkgconfig qemu |
28 | 23 | ||
29 | COMPATIBLE_HOST = '(x86_64).*-linux' | 24 | COMPATIBLE_HOST = '(x86_64).*-linux' |
30 | COMPATIBLE_HOST:libc-musl = "null" | 25 | COMPATIBLE_HOST:libc-musl = "null" |
@@ -40,14 +35,20 @@ EXTRA_OECMAKE = " \ | |||
40 | 35 | ||
41 | EXTRA_OECMAKE:append:class-target = " \ | 36 | EXTRA_OECMAKE:append:class-target = " \ |
42 | -Docloc_cmd_prefix=ocloc \ | 37 | -Docloc_cmd_prefix=ocloc \ |
43 | " | 38 | -DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper \ |
39 | " | ||
44 | 40 | ||
45 | PACKAGECONFIG ??= "" | 41 | PACKAGECONFIG ??= "" |
46 | PACKAGECONFIG[levelzero] = "-DBUILD_WITH_L0=ON, -DBUILD_WITH_L0=OFF, level-zero" | 42 | PACKAGECONFIG[levelzero] = "-DBUILD_WITH_L0=ON, -DBUILD_WITH_L0=OFF, level-zero" |
47 | 43 | ||
48 | do_install:append:class-native() { | 44 | do_configure:prepend:class-target () { |
49 | install -d ${D}${bindir} | 45 | # Write out a qemu wrapper that will be used by cmake. |
50 | install ${B}/bin/cpp_generate_tool ${D}${bindir}/ | 46 | 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}')])}" |
47 | cat > ${WORKDIR}/qemuwrapper << EOF | ||
48 | #!/bin/sh | ||
49 | $qemu_binary "\$@" | ||
50 | EOF | ||
51 | chmod +x ${WORKDIR}/qemuwrapper | ||
51 | } | 52 | } |
52 | 53 | ||
53 | FILES:${PN} += " \ | 54 | FILES:${PN} += " \ |
@@ -57,6 +58,4 @@ FILES:${PN} += " \ | |||
57 | 58 | ||
58 | FILES:${PN}-dev = "${includedir}" | 59 | FILES:${PN}-dev = "${includedir}" |
59 | 60 | ||
60 | BBCLASSEXTEND = "native nativesdk" | ||
61 | |||
62 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)" | 61 | 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 index 0dd75537..456a8c65 100644 --- 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 | |||
@@ -1,4 +1,4 @@ | |||
1 | From 16fb6c022380bbb3c48f21372fcb1da7f30d3903 Mon Sep 17 00:00:00 2001 | 1 | From 1b98a931c3bf8daccc48cd618335ff35e3d382da Mon Sep 17 00:00:00 2001 |
2 | From: Anuj Mittal <anuj.mittal@intel.com> | 2 | From: Anuj Mittal <anuj.mittal@intel.com> |
3 | Date: Tue, 12 Oct 2021 23:46:42 +0800 | 3 | Date: Tue, 12 Oct 2021 23:46:42 +0800 |
4 | Subject: [PATCH] BiF/CMakeLists.txt: remove opt from DEPENDS | 4 | Subject: [PATCH] BiF/CMakeLists.txt: remove opt from DEPENDS |
@@ -14,22 +14,19 @@ Upstream-Status: Inappropriate | |||
14 | 14 | ||
15 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | 15 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> |
16 | --- | 16 | --- |
17 | IGC/VectorCompiler/lib/BiF/CMakeLists.txt | 2 +- | 17 | IGC/VectorCompiler/lib/BiF/cmake/Functions.cmake | 2 +- |
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | 18 | 1 file changed, 1 insertion(+), 1 deletion(-) |
19 | 19 | ||
20 | diff --git a/IGC/VectorCompiler/lib/BiF/CMakeLists.txt b/IGC/VectorCompiler/lib/BiF/CMakeLists.txt | 20 | Index: git/IGC/VectorCompiler/lib/BiF/cmake/Functions.cmake |
21 | index be8e5557e..07ab40382 100644 | 21 | =================================================================== |
22 | --- a/IGC/VectorCompiler/lib/BiF/CMakeLists.txt | 22 | --- git.orig/IGC/VectorCompiler/lib/BiF/cmake/Functions.cmake |
23 | +++ b/IGC/VectorCompiler/lib/BiF/CMakeLists.txt | 23 | +++ git/IGC/VectorCompiler/lib/BiF/cmake/Functions.cmake |
24 | @@ -112,7 +112,7 @@ function(vc_build_bif RES_FILE CMCL_SRC_PATH BIF_NAME PTR_BIT_SIZE) | 24 | @@ -121,7 +121,7 @@ function(vc_build_bif RES_FILE CMCL_SRC_ |
25 | add_custom_command(OUTPUT ${BIF_OPT_BC_PATH} | 25 | COMMENT "vc_build_bif: Translating CMCL builtins: ${BIF_CLANG_BC_NAME_FINAL} -> ${BIF_OPT_BC_NAME}" |
26 | COMMAND ${LLVM_OPT_EXE} --O2 -o ${BIF_OPT_BC_NAME} ${BIF_CMCL_BC_NAME} | 26 | COMMAND CMCLTranslatorTool ${OPT_OPAQUE_ARG} -o ${BIF_CMCL_BC_PATH} ${BIF_CLANG_BC_PATH_FINAL} |
27 | COMMENT "vc_build_bif: running opt with O2: ${BIF_CMCL_BC_NAME} -> ${BIF_OPT_BC_NAME}" | 27 | COMMAND ${LLVM_OPT_EXE} ${OPT_OPAQUE_ARG} --O2 -o ${BIF_OPT_BC_PATH} ${BIF_CMCL_BC_PATH} |
28 | - DEPENDS opt ${BIF_CMCL_BC_PATH}) | 28 | - DEPENDS CMCLTranslatorTool ${LLVM_OPT_EXE} ${OPT_BC_DEPENDS}) |
29 | + DEPENDS ${BIF_CMCL_BC_PATH}) | 29 | + DEPENDS CMCLTranslatorTool ${BIF_CLANG_BC_PATH_FINAL}) |
30 | set(${RES_FILE} ${BIF_OPT_BC_NAME} PARENT_SCOPE) | ||
31 | endfunction() | ||
32 | 30 | ||
33 | -- | 31 | add_custom_target(${TARGET_NAME} |
34 | 2.35.3 | 32 | DEPENDS ${BIF_OPT_BC_PATH} |
35 | |||
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 index 24367f19..3d9ae02f 100644 --- 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 | |||
@@ -1,17 +1,18 @@ | |||
1 | From 5329f00de484b470152e2bd3a5ab6dac45668b13 Mon Sep 17 00:00:00 2001 | 1 | From 1641dc87b2ed6b6b87b2cef824e4d66da65b0b30 Mon Sep 17 00:00:00 2001 |
2 | From: Anuj Mittal <anuj.mittal@intel.com> | 2 | From: Anuj Mittal <anuj.mittal@intel.com> |
3 | Date: Thu, 19 May 2022 22:50:09 +0800 | 3 | Date: Thu, 19 May 2022 22:50:09 +0800 |
4 | Subject: [PATCH] fix tblgen | 4 | Subject: [PATCH] fix tblgen |
5 | 5 | ||
6 | Upstream-Status: Inappropriate [OE specific] | ||
6 | --- | 7 | --- |
7 | IGC/cmake/igc_llvm.cmake | 2 +- | 8 | IGC/cmake/igc_llvm.cmake | 2 +- |
8 | 1 file changed, 1 insertion(+), 1 deletion(-) | 9 | 1 file changed, 1 insertion(+), 1 deletion(-) |
9 | 10 | ||
10 | diff --git a/IGC/cmake/igc_llvm.cmake b/IGC/cmake/igc_llvm.cmake | 11 | diff --git a/IGC/cmake/igc_llvm.cmake b/IGC/cmake/igc_llvm.cmake |
11 | index 89c03fc49..85be9ae08 100644 | 12 | index b708cc904..fe4668890 100644 |
12 | --- a/IGC/cmake/igc_llvm.cmake | 13 | --- a/IGC/cmake/igc_llvm.cmake |
13 | +++ b/IGC/cmake/igc_llvm.cmake | 14 | +++ b/IGC/cmake/igc_llvm.cmake |
14 | @@ -48,7 +48,7 @@ else() | 15 | @@ -53,7 +53,7 @@ else() |
15 | set(LLVM_OPT_EXE "opt" CACHE STRING "") | 16 | set(LLVM_OPT_EXE "opt" CACHE STRING "") |
16 | 17 | ||
17 | set(LLVM_TABLEGEN_EXE "llvm-tblgen") | 18 | set(LLVM_TABLEGEN_EXE "llvm-tblgen") |
@@ -20,6 +21,3 @@ index 89c03fc49..85be9ae08 100644 | |||
20 | if(DEFINED LLVM_TABLEGEN) | 21 | if(DEFINED LLVM_TABLEGEN) |
21 | set(LLVM_TABLEGEN_EXE ${LLVM_TABLEGEN}) | 22 | set(LLVM_TABLEGEN_EXE ${LLVM_TABLEGEN}) |
22 | else() | 23 | else() |
23 | -- | ||
24 | 2.35.3 | ||
25 | |||
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 index 7dd36aec..4269fadf 100644 --- 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 | |||
@@ -1,7 +1,7 @@ | |||
1 | From c2b7f30dd56568482b1b7c2f22bafdf68736fc88 Mon Sep 17 00:00:00 2001 | 1 | From ca136c04d4ac60e3febc8ea2b9c4d4736365a424 Mon Sep 17 00:00:00 2001 |
2 | From: Lee Chee Yang <chee.yang.lee@intel.com> | 2 | From: Lee Chee Yang <chee.yang.lee@intel.com> |
3 | Date: Wed, 2 Sep 2020 08:28:35 +0800 | 3 | Date: Wed, 2 Sep 2020 08:28:35 +0800 |
4 | Subject: [PATCH 3/5] Improve Reproducibility for src package | 4 | Subject: [PATCH] Improve Reproducibility for src package |
5 | 5 | ||
6 | Improve reproducibility for intel-graphics-compiler-src package. | 6 | Improve reproducibility for intel-graphics-compiler-src package. |
7 | needs to pass build path as environment variable to the build. | 7 | needs to pass build path as environment variable to the build. |
@@ -13,11 +13,11 @@ Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> | |||
13 | visa/CMakeLists.txt | 7 +++++-- | 13 | visa/CMakeLists.txt | 7 +++++-- |
14 | 1 file changed, 5 insertions(+), 2 deletions(-) | 14 | 1 file changed, 5 insertions(+), 2 deletions(-) |
15 | 15 | ||
16 | diff --git a/visa/CMakeLists.txt b/visa/CMakeLists.txt | 16 | Index: git/visa/CMakeLists.txt |
17 | index 65dbb4934..8cd607a69 100644 | 17 | =================================================================== |
18 | --- a/visa/CMakeLists.txt | 18 | --- git.orig/visa/CMakeLists.txt |
19 | +++ b/visa/CMakeLists.txt | 19 | +++ git/visa/CMakeLists.txt |
20 | @@ -123,8 +123,11 @@ endif() | 20 | @@ -135,8 +135,11 @@ endif() |
21 | set(bison_output_file ${CMAKE_CURRENT_BINARY_DIR}/CISA.tab.cpp) | 21 | set(bison_output_file ${CMAKE_CURRENT_BINARY_DIR}/CISA.tab.cpp) |
22 | set(flex_output_file ${CMAKE_CURRENT_BINARY_DIR}/lex.CISA.cpp) | 22 | set(flex_output_file ${CMAKE_CURRENT_BINARY_DIR}/lex.CISA.cpp) |
23 | 23 | ||
@@ -31,6 +31,3 @@ index 65dbb4934..8cd607a69 100644 | |||
31 | ADD_FLEX_BISON_DEPENDENCY(CISAScanner CISAParser) | 31 | ADD_FLEX_BISON_DEPENDENCY(CISAScanner CISAParser) |
32 | set(CISAScanner_dependencies) | 32 | set(CISAScanner_dependencies) |
33 | 33 | ||
34 | -- | ||
35 | 2.20.1 | ||
36 | |||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.11378.bb b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.11378.bb deleted file mode 100644 index f9654d32..00000000 --- a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.11378.bb +++ /dev/null | |||
@@ -1,72 +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 & 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=7f4fbc3eb2c34807465e63b1ec3c9d1a" | ||
10 | |||
11 | SRC_URI = "git://github.com/intel/intel-graphics-compiler.git;protocol=https;name=igc;branch=master \ | ||
12 | git://github.com/intel/vc-intrinsics.git;protocol=https;destsuffix=git/vc-intrinsics;name=vc;branch=master \ | ||
13 | git://github.com/KhronosGroup/SPIRV-Tools.git;protocol=https;destsuffix=SPIRV-Tools;name=spirv-tools;branch=sdk-1.3.204 \ | ||
14 | git://github.com/KhronosGroup/SPIRV-Headers.git;protocol=https;destsuffix=SPIRV-Headers;name=spirv-headers;branch=master \ | ||
15 | file://0003-Improve-Reproducibility-for-src-package.patch \ | ||
16 | file://0001-BiF-CMakeLists.txt-remove-opt-from-DEPENDS.patch \ | ||
17 | " | ||
18 | |||
19 | SRC_URI:append:class-native = " file://0001-fix-tblgen.patch" | ||
20 | |||
21 | SRCREV_igc = "9a6528771ee9b41aa06bbaa0da90f50b94e170af" | ||
22 | SRCREV_vc = "4ce354da51f219bbdfa9c4cd5d8f640e92e38511" | ||
23 | SRCREV_spirv-tools = "45dd184c790d6bfc78a5a74a10c37e888b1823fa" | ||
24 | SRCREV_spirv-headers = "b42ba6d92faf6b4938e6f22ddd186dbdacc98d78" | ||
25 | |||
26 | SRCREV_FORMAT = "igc_vc_spirv-tools_spirv-headers" | ||
27 | |||
28 | # Used to replace with relative path in reproducibility patch | ||
29 | export B | ||
30 | |||
31 | S = "${WORKDIR}/git" | ||
32 | |||
33 | inherit cmake pkgconfig | ||
34 | |||
35 | CXXFLAGS:append = " -Wno-error=nonnull" | ||
36 | |||
37 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
38 | COMPATIBLE_HOST:libc-musl = "null" | ||
39 | |||
40 | DEPENDS += " flex-native bison-native clang opencl-clang" | ||
41 | DEPENDS:append:class-target = " clang-cross-x86_64 intel-graphics-compiler-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__USE_KHRONOS_SPIRV_TRANSLATOR_IN_VC=ON -DIGC_OPTION__SPIRV_TRANSLATOR_MODE=Prebuilds,-DIGC_BUILD__VC_ENABLED=OFF," | ||
47 | |||
48 | EXTRA_OECMAKE = " \ | ||
49 | -DIGC_OPTION__LLVM_PREFERRED_VERSION=${LLVMVERSION} \ | ||
50 | -DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python3 \ | ||
51 | -DVC_INTRINSICS_SRC="${S}/vc-intrinsics" \ | ||
52 | -DIGC_OPTION__LLVM_MODE=Prebuilds \ | ||
53 | -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ | ||
54 | -DLLVM_LINK_EXE=${STAGING_BINDIR_NATIVE}/llvm-link \ | ||
55 | " | ||
56 | |||
57 | do_install:append:class-native () { | ||
58 | install -d ${D}${bindir} | ||
59 | install ${B}/IGC/Release/elf_packager ${D}${bindir}/ | ||
60 | if ${@bb.utils.contains('PACKAGECONFIG', 'vc', 'true', 'false', d)}; then | ||
61 | install ${B}/IGC/Release/CMCLTranslatorTool ${D}${bindir}/ | ||
62 | install ${B}/IGC/Release/vcb ${D}${bindir}/ | ||
63 | fi | ||
64 | } | ||
65 | |||
66 | BBCLASSEXTEND = "native nativesdk" | ||
67 | |||
68 | UPSTREAM_CHECK_GITTAGREGEX = "^igc-(?P<pver>(?!19\..*)\d+(\.\d+)+)$" | ||
69 | |||
70 | FILES:${PN} += " \ | ||
71 | ${libdir}/igc/NOTICES.txt \ | ||
72 | " | ||
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..05611cbf --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_2.10.10.bb | |||
@@ -0,0 +1,77 @@ | |||
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=${BB_GIT_DEFAULT_DESTSUFFIX}/vc-intrinsics;name=vc;nobranch=1 \ | ||
13 | git://github.com/KhronosGroup/SPIRV-Tools.git;protocol=https;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/SPIRV-Tools;name=spirv-tools;branch=main \ | ||
14 | git://github.com/KhronosGroup/SPIRV-Headers.git;protocol=https;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/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 | inherit cmake pkgconfig qemu python3native | ||
34 | |||
35 | CXXFLAGS:append = " -Wno-error=nonnull" | ||
36 | |||
37 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
38 | COMPATIBLE_HOST:libc-musl = "null" | ||
39 | |||
40 | DEPENDS += " flex-native bison-native clang clang-cross-x86_64 opencl-clang qemu-native python3-mako-native \ | ||
41 | python3-pyyaml-native \ | ||
42 | " | ||
43 | |||
44 | RDEPENDS:${PN} += "opencl-clang" | ||
45 | |||
46 | PACKAGECONFIG ??= "vc" | ||
47 | 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," | ||
48 | |||
49 | EXTRA_OECMAKE = " \ | ||
50 | -DIGC_OPTION__LLVM_PREFERRED_VERSION=${LLVMVERSION} \ | ||
51 | -DVC_INTRINSICS_SRC="${S}/vc-intrinsics" \ | ||
52 | -DIGC_OPTION__LLVM_MODE=Prebuilds \ | ||
53 | -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ | ||
54 | -DLLVM_LINK_EXE=${STAGING_BINDIR_NATIVE}/llvm-link \ | ||
55 | -DCLANG_EXE=${STAGING_BINDIR_NATIVE}/clang \ | ||
56 | -DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper \ | ||
57 | " | ||
58 | |||
59 | do_configure:prepend:class-target () { | ||
60 | # Write out a qemu wrapper that will be used by cmake. | ||
61 | qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}" | ||
62 | cat > ${WORKDIR}/qemuwrapper << EOF | ||
63 | #!/bin/sh | ||
64 | $qemu_binary "\$@" | ||
65 | EOF | ||
66 | chmod +x ${WORKDIR}/qemuwrapper | ||
67 | } | ||
68 | |||
69 | |||
70 | UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>\d+(\.\d+)+)$" | ||
71 | |||
72 | FILES:${PN} += " \ | ||
73 | ${libdir}/igc2/NOTICES.txt \ | ||
74 | " | ||
75 | |||
76 | # libigc.so contains buildpaths | ||
77 | 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/0001-don-t-redefine-LLVM_TABLEGEN_EXE.patch b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0001-don-t-redefine-LLVM_TABLEGEN_EXE.patch deleted file mode 100644 index 8df7e3ab..00000000 --- a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0001-don-t-redefine-LLVM_TABLEGEN_EXE.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | From f3ef79a6301bab0b3a447f07ceb94c39a95009df Mon Sep 17 00:00:00 2001 | ||
2 | From: Anuj Mittal <anuj.mittal@intel.com> | ||
3 | Date: Thu, 2 Apr 2020 08:59:20 +0800 | ||
4 | Subject: [PATCH] don't redefine LLVM_TABLEGEN_EXE | ||
5 | |||
6 | Use the value that has been passed by the user. | ||
7 | |||
8 | Upstream-Status: Submitted | ||
9 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
10 | --- | ||
11 | CMakeLists.txt | 5 ++++- | ||
12 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
15 | index 6893e97..941b0ae 100644 | ||
16 | --- a/CMakeLists.txt | ||
17 | +++ b/CMakeLists.txt | ||
18 | @@ -137,7 +137,10 @@ endif(NOT USE_PREBUILT_LLVM) | ||
19 | set (COMPILE_OPTIONS_TD opencl_clang_options.td) | ||
20 | set (COMPILE_OPTIONS_INC opencl_clang_options.inc) | ||
21 | |||
22 | -set(LLVM_TABLEGEN_EXE "llvm-tblgen") | ||
23 | +if(NOT DEFINED LLVM_TABLEGEN_EXE) | ||
24 | + set(LLVM_TABLEGEN_EXE "llvm-tblgen") | ||
25 | +endif() | ||
26 | + | ||
27 | set(LLVM_TARGET_DEFINITIONS ${COMPILE_OPTIONS_TD}) | ||
28 | if(USE_PREBUILT_LLVM) | ||
29 | set(TABLEGEN_ADDITIONAL -I ${LLVM_INCLUDE_DIRS}) | ||
30 | -- | ||
31 | 2.25.1 | ||
32 | |||
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/opencl-clang.inc b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang.inc index 1d9b4d51..726b035d 100644 --- a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang.inc +++ b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang.inc | |||
@@ -6,8 +6,9 @@ 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=${BRANCH};protocol=https \ | 8 | SRC_URI = "git://github.com/intel/opencl-clang.git;branch=${BRANCH};protocol=https \ |
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 \ | ||
9 | " | 11 | " |
10 | S = "${WORKDIR}/git" | ||
11 | 12 | ||
12 | inherit cmake | 13 | inherit cmake |
13 | DEPENDS += "clang" | 14 | DEPENDS += "clang" |
@@ -16,9 +17,17 @@ DEPENDS:append:class-target = " opencl-clang-native" | |||
16 | COMPATIBLE_HOST = '(x86_64).*-linux' | 17 | COMPATIBLE_HOST = '(x86_64).*-linux' |
17 | COMPATIBLE_HOST:libc-musl = "null" | 18 | COMPATIBLE_HOST:libc-musl = "null" |
18 | 19 | ||
20 | DEPENDS += " spirv-llvm-translator" | ||
21 | |||
22 | EXTRA_OECMAKE += "\ | ||
23 | -DLLVM_TABLEGEN_EXE=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ | ||
24 | -DCMAKE_SKIP_RPATH=TRUE \ | ||
25 | -DPREFERRED_LLVM_VERSION=${LLVMVERSION} \ | ||
26 | " | ||
27 | |||
19 | do_install:append:class-native() { | 28 | do_install:append:class-native() { |
20 | install -d ${D}${bindir} | 29 | install -d ${D}${bindir} |
21 | install -m 0755 ${B}/linux_linker/linux_resource_linker ${D}${bindir}/ | 30 | install -m 0755 ${B}/bin/linux_resource_linker ${D}${bindir}/ |
22 | } | 31 | } |
23 | 32 | ||
24 | BBCLASSEXTEND = "native nativesdk" | 33 | BBCLASSEXTEND = "native nativesdk" |
diff --git a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_12.0.0.bb b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_12.0.0.bb deleted file mode 100644 index d0b2acfb..00000000 --- a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_12.0.0.bb +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | require opencl-clang.inc | ||
2 | |||
3 | SRCREV = "8fc6b059248dc6c9c40c7cbe5fedcc6ebb951983" | ||
4 | |||
5 | DEPENDS += " spirv-llvm-translator" | ||
6 | |||
7 | BRANCH = "ocl-open-120" | ||
8 | |||
9 | EXTRA_OECMAKE += "\ | ||
10 | -DCMAKE_SKIP_RPATH=TRUE \ | ||
11 | -DPREFERRED_LLVM_VERSION="12.0.0" \ | ||
12 | " | ||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_14.0.0.bb b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_14.0.0.bb deleted file mode 100644 index 367ca7e9..00000000 --- a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_14.0.0.bb +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | require opencl-clang.inc | ||
2 | |||
3 | SRC_URI:append = " file://0001-don-t-redefine-LLVM_TABLEGEN_EXE.patch \ | ||
4 | " | ||
5 | SRCREV = "06c7c0d7f5cbd13810d79489a533fa6c5b6c7d9f" | ||
6 | |||
7 | BRANCH = "ocl-open-140" | ||
8 | |||
9 | DEPENDS += " spirv-llvm-translator" | ||
10 | |||
11 | EXTRA_OECMAKE += "\ | ||
12 | -DLLVM_TABLEGEN_EXE=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ | ||
13 | -DCMAKE_SKIP_RPATH=TRUE \ | ||
14 | -DPREFERRED_LLVM_VERSION=${LLVMVERSION} \ | ||
15 | " | ||
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/clang-layer/recipes-opencl/vc-intrinsics/vc-intrinsics_0.1.0.bb b/dynamic-layers/clang-layer/recipes-opencl/vc-intrinsics/vc-intrinsics_0.1.0.bb deleted file mode 100644 index dfdb4450..00000000 --- a/dynamic-layers/clang-layer/recipes-opencl/vc-intrinsics/vc-intrinsics_0.1.0.bb +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | SUMMARY = "VC Intrinsics" | ||
2 | DESCRIPTION = "VC Intrinsics project contains a set of new intrinsics on \ | ||
3 | top of core LLVM IR instructions that represent SIMD semantics of a program \ | ||
4 | targeting GPU" | ||
5 | |||
6 | LICENSE = "MIT" | ||
7 | LIC_FILES_CHKSUM = "file://Readme.md;beginline=1;endline=7;md5=3b2db19c3b0877bb312b7adbcb815adc" | ||
8 | |||
9 | SRC_URI = "git://github.com/intel/vc-intrinsics.git;protocol=https;branch=master \ | ||
10 | " | ||
11 | SRCREV = "99ac111c2604a47d865bd4d7996be8cfaf2af146" | ||
12 | |||
13 | S = "${WORKDIR}/git" | ||
14 | |||
15 | PE = "1" | ||
16 | PV .= "+git${SRCPV}" | ||
17 | |||
18 | inherit cmake | ||
19 | |||
20 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
21 | COMPATIBLE_HOST:libc-musl = "null" | ||
22 | |||
23 | DEPENDS += " clang" | ||
24 | |||
25 | EXTRA_OECMAKE = "-DLLVM_DIR=${STAGING_LIBDIR}" | ||
26 | |||
27 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/dynamic-layers/meta-python/recipes-opencv/dldt/openvino-model-optimizer_2022.1.bb b/dynamic-layers/meta-python/recipes-opencv/dldt/openvino-model-optimizer_2022.1.bb deleted file mode 100644 index c2e91eda..00000000 --- a/dynamic-layers/meta-python/recipes-opencv/dldt/openvino-model-optimizer_2022.1.bb +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | SUMMARY = "OpenVINO Model Optimzer" | ||
2 | DESCRIPTION = "Model Optimizer is a cross-platform command-line tool that \ | ||
3 | facilitates the transition between the training and deployment \ | ||
4 | environment, performs static model analysis, and adjusts deep \ | ||
5 | learning models for optimal execution on end-point target devices." | ||
6 | HOMEPAGE = "https://01.org/openvinotoolkit" | ||
7 | |||
8 | SRC_URI = "git://github.com/openvinotoolkit/openvino.git;protocol=https;branch=releases/2022/1;lfs=0 \ | ||
9 | " | ||
10 | SRCREV = "cdb9bec7210f8c24fde3e416c7ada820faaaa23e" | ||
11 | |||
12 | LICENSE = "Apache-2.0" | ||
13 | LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" | ||
14 | |||
15 | CVE_PRODUCT = "intel:openvino" | ||
16 | S = "${WORKDIR}/git" | ||
17 | |||
18 | inherit setuptools3 | ||
19 | |||
20 | SETUPTOOLS_SETUP_PATH = "${WORKDIR}/git/tools/mo" | ||
21 | |||
22 | RDEPENDS:${PN} += " \ | ||
23 | python3-numpy \ | ||
24 | python3-protobuf \ | ||
25 | python3-defusedxml \ | ||
26 | python3-networkx \ | ||
27 | python3-requests \ | ||
28 | python3-urllib3 \ | ||
29 | bash \ | ||
30 | " | ||
31 | |||
32 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))" | ||
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/lms_2151.0.0.0.bb b/dynamic-layers/openembedded-layer/recipes-bsp/amt/lms_2406.0.0.0.bb index a573aca4..0a5a57ed 100644 --- a/dynamic-layers/openembedded-layer/recipes-bsp/amt/lms_2151.0.0.0.bb +++ b/dynamic-layers/openembedded-layer/recipes-bsp/amt/lms_2406.0.0.0.bb | |||
@@ -10,30 +10,28 @@ COMPATIBLE_HOST = '(i.86|x86_64).*-linux' | |||
10 | 10 | ||
11 | COMPATIBLE_HOST:libc-musl = "null" | 11 | COMPATIBLE_HOST:libc-musl = "null" |
12 | 12 | ||
13 | inherit cmake systemd features_check | 13 | inherit cmake systemd features_check python3native |
14 | 14 | ||
15 | DEPENDS = "metee ace xerces-c libnl libxml2 glib-2.0 glib-2.0-native pkgconfig-native" | 15 | DEPENDS = "metee ace xerces-c libnl libxml2 glib-2.0 glib-2.0-native pkgconfig-native python3-packaging-native" |
16 | |||
17 | EXTRA_OECMAKE += "-DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python3" | ||
18 | 16 | ||
19 | # Enable either connman or networkmanager or none but not both. | 17 | # Enable either connman or networkmanager or none but not both. |
20 | PACKAGECONFIG ??= "connman" | 18 | PACKAGECONFIG ??= "connman" |
21 | PACKAGECONFIG[connman] = "-DNETWORK_CN=ON, -DNETWORK_CN=OFF, connman" | 19 | PACKAGECONFIG[connman] = "-DNETWORK_CN=ON, -DNETWORK_CN=OFF, connman" |
22 | PACKAGECONFIG[networkmanager] = "-DNETWORK_NM=ON, -DNETWORK_NM=OFF, networkmanager" | 20 | PACKAGECONFIG[networkmanager] = "-DNETWORK_NM=ON, -DNETWORK_NM=OFF, networkmanager" |
23 | 21 | ||
24 | REQUIRED_DISTRO_FEATURES= "systemd" | 22 | REQUIRED_DISTRO_FEATURES = "systemd" |
25 | 23 | ||
26 | FILES:${PN} += "${datadir}/dbus-1/system-services/*.service" | 24 | FILES:${PN} += "${datadir}/dbus-1/system-services/*.service" |
27 | 25 | ||
28 | S = "${WORKDIR}/git" | ||
29 | |||
30 | SYSTEMD_SERVICE:${PN} = "lms.service" | 26 | SYSTEMD_SERVICE:${PN} = "lms.service" |
31 | 27 | ||
32 | SRC_URI = "git://github.com/intel/lms.git;branch=master;protocol=https \ | 28 | SRC_URI = "git://github.com/intel/lms.git;branch=master;protocol=https \ |
29 | file://0001-LMS-fix-build-issue-with-gcc-15.patch \ | ||
33 | " | 30 | " |
34 | SRCREV = "cda6a25e0f39b2a18f10415560ee6a2cfc5fbbcb" | 31 | SRCREV = "388f115b2aeb3ea11499971c65f828daefd32c47" |
35 | 32 | ||
36 | do_install:append() { | 33 | do_install:append() { |
34 | install -d ${D}${sysconfdir}/lms | ||
37 | install -d ${D}${systemd_system_unitdir} | 35 | install -d ${D}${systemd_system_unitdir} |
38 | install -m 0644 ${B}/UNS/lms.service ${D}${systemd_system_unitdir} | 36 | install -m 0644 ${B}/UNS/lms.service ${D}${systemd_system_unitdir} |
39 | install -d ${D}${sysconfdir}/udev/rules.d | 37 | install -d ${D}${sysconfdir}/udev/rules.d |
@@ -42,5 +40,4 @@ do_install:append() { | |||
42 | 40 | ||
43 | RDEPENDS:${PN} += "ace" | 41 | RDEPENDS:${PN} += "ace" |
44 | 42 | ||
45 | # This CVE is for Lan Management System software and not this lms. | 43 | CVE_STATUS[CVE-2018-1000535] = "cpe-incorrect: This CVE is for a different LMS - Lan Management System." |
46 | CVE_CHECK_IGNORE += "CVE-2018-1000535" | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-bsp/thermald/thermald_2.4.9.bb b/dynamic-layers/openembedded-layer/recipes-bsp/thermald/thermald_2.5.8.bb index 7d516814..575a00e8 100644 --- a/dynamic-layers/openembedded-layer/recipes-bsp/thermald/thermald_2.4.9.bb +++ b/dynamic-layers/openembedded-layer/recipes-bsp/thermald/thermald_2.5.8.bb | |||
@@ -7,14 +7,15 @@ compensation using available cooling methods." | |||
7 | HOMEPAGE = "https://github.com/01org/thermal_daemon" | 7 | HOMEPAGE = "https://github.com/01org/thermal_daemon" |
8 | 8 | ||
9 | DEPENDS = "dbus dbus-glib dbus-glib-native libxml2 glib-2.0 glib-2.0-native upower libevdev" | 9 | DEPENDS = "dbus dbus-glib dbus-glib-native libxml2 glib-2.0 glib-2.0-native upower libevdev" |
10 | DEPENDS += "autoconf-archive-native" | ||
11 | |||
10 | LICENSE = "GPL-2.0-only" | 12 | LICENSE = "GPL-2.0-only" |
11 | LIC_FILES_CHKSUM = "file://COPYING;md5=ea8831610e926e2e469075b52bf08848" | 13 | LIC_FILES_CHKSUM = "file://COPYING;md5=ea8831610e926e2e469075b52bf08848" |
12 | 14 | ||
13 | SRC_URI = "git://github.com/intel/thermal_daemon/;branch=master;protocol=https \ | 15 | SRC_URI = "git://github.com/intel/thermal_daemon/;branch=master;protocol=https \ |
14 | " | 16 | " |
15 | 17 | ||
16 | SRCREV = "2c862048edd473182e66cd3aed98f78b746d64aa" | 18 | SRCREV = "df3b9ab0ffe780c4fbad7750987eff76f659cfd5" |
17 | S = "${WORKDIR}/git" | ||
18 | 19 | ||
19 | inherit pkgconfig autotools systemd gtk-doc | 20 | inherit pkgconfig autotools systemd gtk-doc |
20 | 21 | ||
@@ -28,7 +29,7 @@ EXTRA_OECONF = " \ | |||
28 | --with-systemdsystemunitdir=${systemd_system_unitdir} \ | 29 | --with-systemdsystemunitdir=${systemd_system_unitdir} \ |
29 | " | 30 | " |
30 | 31 | ||
31 | FILES:${PN} += "${datadir}/dbus-1/system-services/*.service" | 32 | FILES:${PN} += "${datadir}/dbus-1" |
32 | 33 | ||
33 | SYSTEMD_SERVICE:${PN} = "thermald.service" | 34 | SYSTEMD_SERVICE:${PN} = "thermald.service" |
34 | 35 | ||
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/clang-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 index a13ade9f..f452dc50 100644 --- a/dynamic-layers/clang-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 | |||
@@ -1,4 +1,4 @@ | |||
1 | From 493e886d6dae2ed7bdc12ed03f717ee0e98dfe09 Mon Sep 17 00:00:00 2001 | 1 | From 16a2c22339287122d2c25d8bb33a5a51b4e6ee51 Mon Sep 17 00:00:00 2001 |
2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | 2 | From: Naveen Saini <naveen.kumar.saini@intel.com> |
3 | Date: Thu, 24 Feb 2022 20:01:11 +0530 | 3 | Date: Thu, 24 Feb 2022 20:01:11 +0530 |
4 | Subject: [PATCH] cmake: don't build for 32-bit targets | 4 | Subject: [PATCH] cmake: don't build for 32-bit targets |
@@ -16,14 +16,14 @@ Upstream-Status: Inappropriate | |||
16 | 16 | ||
17 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | 17 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> |
18 | --- | 18 | --- |
19 | cmake/GenerateBuiltins.cmake | 8 ++++---- | 19 | cmake/GenerateBuiltins.cmake | 6 +++--- |
20 | 1 file changed, 4 insertions(+), 4 deletions(-) | 20 | 1 file changed, 3 insertions(+), 3 deletions(-) |
21 | 21 | ||
22 | diff --git a/cmake/GenerateBuiltins.cmake b/cmake/GenerateBuiltins.cmake | 22 | diff --git a/cmake/GenerateBuiltins.cmake b/cmake/GenerateBuiltins.cmake |
23 | index fa228247..7adc7e52 100644 | 23 | index f84494ed..d90cb1ec 100644 |
24 | --- a/cmake/GenerateBuiltins.cmake | 24 | --- a/cmake/GenerateBuiltins.cmake |
25 | +++ b/cmake/GenerateBuiltins.cmake | 25 | +++ b/cmake/GenerateBuiltins.cmake |
26 | @@ -272,7 +272,7 @@ function(builtin_to_cpp bit os_name arch supported_archs supported_oses resultFi | 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 | 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 | 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. | 29 | # the headers can be found in other locations, this should not be a problem. |
@@ -32,7 +32,7 @@ index fa228247..7adc7e52 100644 | |||
32 | endif() | 32 | endif() |
33 | endif() | 33 | endif() |
34 | 34 | ||
35 | @@ -354,7 +354,7 @@ function (generate_target_builtins resultList) | 35 | @@ -339,7 +339,7 @@ function (generate_target_builtins resultList) |
36 | set(regular_targets ${ARGN}) | 36 | set(regular_targets ${ARGN}) |
37 | list(FILTER regular_targets EXCLUDE REGEX wasm) | 37 | list(FILTER regular_targets EXCLUDE REGEX wasm) |
38 | foreach (ispc_target ${regular_targets}) | 38 | foreach (ispc_target ${regular_targets}) |
@@ -41,24 +41,12 @@ index fa228247..7adc7e52 100644 | |||
41 | foreach (os_name ${TARGET_OS_LIST_FOR_LL}) | 41 | foreach (os_name ${TARGET_OS_LIST_FOR_LL}) |
42 | target_ll_to_cpp(target-${ispc_target} ${bit} ${os_name} output${os_name}${bit}) | 42 | target_ll_to_cpp(target-${ispc_target} ${bit} ${os_name} output${os_name}${bit}) |
43 | list(APPEND tmpList ${output${os_name}${bit}}) | 43 | list(APPEND tmpList ${output${os_name}${bit}}) |
44 | @@ -415,7 +415,7 @@ function (generate_common_builtins resultList) | 44 | @@ -405,7 +405,7 @@ function (generate_common_builtins resultList) |
45 | endif() | 45 | endif() |
46 | 46 | ||
47 | message (STATUS "ISPC will be built with support of ${supported_oses} for ${supported_archs}") | 47 | message (STATUS "ISPC will be built with support of ${supported_oses} for ${supported_archs}") |
48 | - foreach (bit 32 64) | 48 | - foreach (bit 32 64) |
49 | + foreach (bit 64) | 49 | + foreach (bit 64) |
50 | foreach (os_name "windows" "linux" "freebsd" "macos" "android" "ios" "ps4" "web") | 50 | foreach (os_name "windows" "linux" "freebsd" "macos" "android" "ios" "ps4" "web") |
51 | foreach (arch "x86" "arm" "wasm32") | 51 | foreach (arch "x86" "arm" "wasm") |
52 | builtin_to_cpp(${bit} ${os_name} ${arch} "${supported_archs}" "${supported_oses}" res${bit}${os_name}${arch}) | 52 | builtin_to_cpp(${bit} ${os_name} ${arch} "${supported_archs}" "${supported_oses}" res${bit}${os_name}${arch}) |
53 | @@ -428,7 +428,7 @@ function (generate_common_builtins resultList) | ||
54 | endforeach() | ||
55 | endforeach() | ||
56 | if (XE_ENABLED) | ||
57 | - foreach (bit 32 64) | ||
58 | + foreach (bit 64) | ||
59 | builtin_xe_to_cpp(${bit} res_xe_${bit}) | ||
60 | list(APPEND tmpList ${res_xe_${bit}} ) | ||
61 | if(MSVC) | ||
62 | -- | ||
63 | 2.17.1 | ||
64 | |||
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..f40e445c --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc_1.24.0.bb | |||
@@ -0,0 +1,62 @@ | |||
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 | SRC_URI = "git://github.com/ispc/ispc.git;protocol=https;branch=main \ | ||
13 | file://0002-cmake-don-t-build-for-32-bit-targets.patch \ | ||
14 | file://0001-Fix-QA-Issues.patch \ | ||
15 | file://0001-Add-print-function-to-print-test-run-status-in-ptest.patch \ | ||
16 | file://run-ptest \ | ||
17 | " | ||
18 | |||
19 | SRCREV = "d394222aef59e4759b06e39ec160e4aba6ee5f40" | ||
20 | |||
21 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
22 | |||
23 | DEPENDS += " clang-native bison-native flex-native" | ||
24 | DEPENDS:append:class-target = " clang" | ||
25 | RDEPENDS:${PN}-ptest += " python3-multiprocessing" | ||
26 | |||
27 | PACKAGECONFIG ??= "tbb" | ||
28 | PACKAGECONFIG[tbb] = "-DISPCRT_BUILD_TASK_MODEL=TBB, -DISPCRT_BUILD_TASK_MODEL=OpenMP, tbb" | ||
29 | |||
30 | YFLAGS = '-d -t -v -y --file-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}' | ||
31 | |||
32 | do_configure:prepend() { | ||
33 | sed -i -e 's#\${BISON_EXECUTABLE}.*#\${BISON_EXECUTABLE} ${YFLAGS} #g' ${S}/CMakeLists.txt | ||
34 | sed -i -e 's#\${FLEX_EXECUTABLE}.*#\${FLEX_EXECUTABLE} \-L #g' ${S}/CMakeLists.txt | ||
35 | } | ||
36 | |||
37 | do_install_ptest() { | ||
38 | cp -rf ${S}/run_tests.py ${D}${PTEST_PATH} | ||
39 | cp -rf ${S}/common.py ${D}${PTEST_PATH} | ||
40 | cp -rf ${S}/tests ${D}${PTEST_PATH} | ||
41 | cp -rf ${S}/test_static.isph ${D}${PTEST_PATH} | ||
42 | cp -rf ${S}/fail_db.txt ${D}${PTEST_PATH} | ||
43 | cp -rf ${S}/test_static.cpp ${D}${PTEST_PATH} | ||
44 | } | ||
45 | |||
46 | EXTRA_OECMAKE += " \ | ||
47 | -DISPC_INCLUDE_TESTS=OFF \ | ||
48 | -DISPC_INCLUDE_EXAMPLES=OFF \ | ||
49 | -DARM_ENABLED=OFF \ | ||
50 | -DISPC_CROSS=ON \ | ||
51 | -DISPC_ANDROID_TARGET=OFF \ | ||
52 | -DISPC_FREEBSD_TARGET=OFF \ | ||
53 | -DISPC_WINDOWS_TARGET=OFF \ | ||
54 | -DISPC_IOS_TARGET=OFF \ | ||
55 | -DISPC_PS_TARGET=OFF \ | ||
56 | -DSYSROOT_DIR=${STAGING_DIR} \ | ||
57 | -DCLANG_EXECUTABLE=${STAGING_BINDIR_NATIVE}/clang \ | ||
58 | -DCLANGPP_EXECUTABLE=${STAGING_BINDIR_NATIVE}/clang++ \ | ||
59 | -DLLVM_AS_EXECUTABLE=${STAGING_BINDIR_NATIVE}/llvm-as \ | ||
60 | " | ||
61 | |||
62 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-core/levelzero/level-zero_1.7.15.bb b/dynamic-layers/openembedded-layer/recipes-core/levelzero/level-zero_1.21.1.bb index 42431416..21b3956f 100644 --- a/dynamic-layers/openembedded-layer/recipes-core/levelzero/level-zero_1.7.15.bb +++ b/dynamic-layers/openembedded-layer/recipes-core/levelzero/level-zero_1.21.1.bb | |||
@@ -4,8 +4,7 @@ LICENSE = "MIT" | |||
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=97957beb2f7808ffa247e5d93e6442cc" | 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=97957beb2f7808ffa247e5d93e6442cc" |
5 | 5 | ||
6 | SRC_URI = "git://github.com/oneapi-src/level-zero.git;protocol=https;branch=master" | 6 | SRC_URI = "git://github.com/oneapi-src/level-zero.git;protocol=https;branch=master" |
7 | SRCREV = "bb7fff05b801e26c3d7858e03e509d1089914d59" | 7 | SRCREV = "9536683855b17a21508e5b54ba358225d6a976da" |
8 | S = "${WORKDIR}/git" | ||
9 | 8 | ||
10 | inherit cmake | 9 | inherit cmake |
11 | DEPENDS += "opencl-headers" | 10 | DEPENDS += "opencl-headers" |
@@ -30,3 +29,4 @@ FILES:${PN}-loader = "${libdir}" | |||
30 | INSANE_SKIP:${PN}-loader = "dev-so" | 29 | INSANE_SKIP:${PN}-loader = "dev-so" |
31 | INSANE_SKIP:${PN}-samples = "dev-so" | 30 | INSANE_SKIP:${PN}-samples = "dev-so" |
32 | ALLOW_EMPTY:${PN} = "1" | 31 | ALLOW_EMPTY:${PN} = "1" |
32 | 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..852bc0c1 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-core/linux-npu-driver/linux-npu-driver_1.17.0.bb | |||
@@ -0,0 +1,43 @@ | |||
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=${BB_GIT_DEFAULT_DESTSUFFIX}/third_party/vpux_elf;name=vpux-elf;nobranch=1 \ | ||
10 | git://github.com/jbeder/yaml-cpp.git;protocol=https;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/third_party/yaml-cpp;name=yaml-cpp;nobranch=1 \ | ||
11 | git://github.com/intel/level-zero-npu-extensions.git;protocol=https;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/third_party/level-zero-npu-extensions;name=lzvext;nobranch=1 \ | ||
12 | git://github.com/google/googletest.git;protocol=https;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/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 | inherit cmake | ||
24 | |||
25 | |||
26 | # Fix warning _FORTIFY_SOURCE requires compiling with optimization (-O) | ||
27 | EXTRA_OECMAKE += " -DCMAKE_BUILD_TYPE=Release " | ||
28 | EXTRA_OECMAKE += " -DCMAKE_CXX_FLAGS_RELEASE=-O2 " | ||
29 | |||
30 | EXTRA_OECMAKE += " -DCMAKE_CXX_FLAGS='-I${RECIPE_SYSROOT}/usr/include/level_zero'" | ||
31 | EXTRA_OECMAKE += " -DCMAKE_INSTALL_FIRMWARE_DIR=${nonarch_base_libdir}" | ||
32 | |||
33 | DEPENDS = "level-zero dpkg-native pkgconfig-native" | ||
34 | |||
35 | PACKAGES =+ "${PN}-firmware ${PN}-tests" | ||
36 | |||
37 | FILES:${PN}-firmware = "${nonarch_base_libdir}/firmware/updates/intel/vpu/*" | ||
38 | FILES:${PN}-tests = "${bindir}" | ||
39 | |||
40 | INSANE_SKIP:${PN} += "buildpaths" | ||
41 | INSANE_SKIP:${PN}-dbg += "buildpaths" | ||
42 | INSANE_SKIP:${PN}-tests += "buildpaths" | ||
43 | INSANE_SKIP:${PN}-firmware += "buildpaths" | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-oneapi/compiler/intel-oneapi-compiler_2022.0.1-3633.bb b/dynamic-layers/openembedded-layer/recipes-oneapi/compiler/intel-oneapi-compiler_2022.0.1-3633.bb deleted file mode 100644 index b9d4fdf6..00000000 --- a/dynamic-layers/openembedded-layer/recipes-oneapi/compiler/intel-oneapi-compiler_2022.0.1-3633.bb +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | SUMMARY = "Intel® oneAPI DPC++/C++ Compiler & Intel® C++ Compiler Classic runtime common files" | ||
2 | DESCRIPTION = "Intel® C++ Compiler Classic generates applications\ | ||
3 | that can run on Intel® 64 architecture and the IA-32 architecture.\ | ||
4 | Intel® oneAPI Data Parallel C++ (DPC++) is an open alternative \ | ||
5 | to single-architecture proprietary languages. It allows developers to reuse \ | ||
6 | code across hardware targets (CPUs and accelerators such as GPUs and FPGAs) \ | ||
7 | and also perform custom tuning for a specific accelerator." | ||
8 | HOMEPAGE = "https://software.intel.com/content/www/us/en/develop/documentation/cpp-compiler-developer-guide-and-reference/top/introducing-the-intel-c-compiler-classic.html" | ||
9 | |||
10 | LICENSE="EULA" | ||
11 | |||
12 | LIC_FILES_CHKSUM = " \ | ||
13 | file://opt/intel/oneapi/lib/licensing/compiler/Intel%20Developer%20Tools%20EULA;md5=7bfc91523de2e84e7131d0eacf2827d4 \ | ||
14 | file://opt/intel/oneapi/lib/licensing/compiler/openmp/third-party-programs.txt;md5=da72b17a4a1efef54faf14df4a703282 \ | ||
15 | file://opt/intel/oneapi/lib/licensing/compiler/c/third-party-programs.txt;md5=3414f5649b09160ade46d4981f3452fe \ | ||
16 | file://opt/intel/oneapi/lib/licensing/opencl/EULA.txt;md5=7bfc91523de2e84e7131d0eacf2827d4 \ | ||
17 | file://opt/intel/oneapi/lib/licensing/opencl/TBB_TPP.txt;md5=0a69156543e3e115c673c6041b6aee92 \ | ||
18 | file://opt/intel/oneapi/lib/licensing/opencl/redist.txt;md5=32fb3b7d1c0a92ea577fe2e4b0dfa663 \ | ||
19 | file://opt/intel/oneapi/lib/licensing/opencl/third-party-programs.txt;md5=c660b8b0891e780a62da6a198e80e9ac \ | ||
20 | " | ||
21 | |||
22 | SRC_URI = " \ | ||
23 | https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-runtime-compilers-${PV}_amd64.deb;subdir=${BPN};name=runtime-compilers \ | ||
24 | https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-runtime-compilers-common-${PV}_all.deb;subdir=${BPN};name=common-compilers \ | ||
25 | https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-runtime-dpcpp-cpp-${PV}_amd64.deb;subdir=${BPN};name=runtime-dpcpp-cpp \ | ||
26 | https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-runtime-dpcpp-cpp-common-${PV}_all.deb;subdir=${BPN};name=common-dpcpp-cpp \ | ||
27 | https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-runtime-openmp-${PV}_amd64.deb;subdir=${BPN};name=runtime-openmp \ | ||
28 | https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-runtime-openmp-common-${PV}_all.deb;subdir=${BPN};name=common-openmp \ | ||
29 | https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-runtime-opencl-${PV}_amd64.deb;subdir=${BPN};name=runtime-opencl \ | ||
30 | " | ||
31 | |||
32 | SRC_URI[runtime-compilers.sha256sum] = "8951fd8a0946095609f0ef7bb2b51c698fc0315455a76d268a54851936c07db9" | ||
33 | SRC_URI[common-compilers.sha256sum] = "c592482f68b131fff0623fdc978c592950f02d7f35f6795587e93a28fe1d3c31" | ||
34 | SRC_URI[runtime-dpcpp-cpp.sha256sum] = "9e26b9c5321281d829d62542c22552182d00255ebc2f8a6e179b95515c63c24d" | ||
35 | SRC_URI[common-dpcpp-cpp.sha256sum] = "9cd0957a75f5ad45b208f2c1c8ee2aa032e335ada9193ca69f8ac5a7cb548d02" | ||
36 | SRC_URI[runtime-openmp.sha256sum] = "86fb0d6e3a34217cc30594e9f21e89070425c6c56773edae4d5a86730239c171" | ||
37 | SRC_URI[common-openmp.sha256sum] = "5bd2fc7a1605545fc8536ec0e8d80c982f1feb7dc6eed5b45adf3cd0370e0a98" | ||
38 | SRC_URI[runtime-opencl.sha256sum] = "65d73c23f07c2419b8a1d22043b73346f25b387d3ec07b48f08177de1835a360" | ||
39 | |||
40 | S = "${WORKDIR}/${BPN}" | ||
41 | |||
42 | inherit bin_package update-alternatives | ||
43 | |||
44 | ALTERNATIVE:${PN} = "Intel_FPGA_SSG_Emulator.icd" | ||
45 | ALTERNATIVE_LINK_NAME[Intel_FPGA_SSG_Emulator.icd] = "/etc/OpenCL/vendors/intel64-fpgaemu.icd" | ||
46 | ALTERNATIVE_TARGET[Intel_FPGA_SSG_Emulator.icd] = "/opt/intel/oneapi/lib/etc/Intel_FPGA_SSG_Emulator.icd" | ||
47 | ALTERNATIVE_PRIORITY[Intel_FPGA_SSG_Emulator.icd] = "328736233" | ||
48 | |||
49 | INHIBIT_PACKAGE_STRIP = "1" | ||
50 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
51 | |||
52 | RDEPENDS:${PN} += "perl elfutils ocl-icd level-zero-loader zlib tbb libelf setup-intel-oneapi-env" | ||
53 | INSANE_SKIP:${PN} += "textrel dev-so" | ||
54 | |||
55 | # The libomptarget.rtl.x86_64.so library is not supported on Yocto 3.1+ due to using obsolete libffi.so.6 | ||
56 | do_install:append () { | ||
57 | rm -f ${D}/opt/intel/oneapi/lib/libomptarget.rtl.x86_64.so | ||
58 | echo "/opt/intel/oneapi/lib/emu/libintelocl_emu.so" > ${D}/opt/intel/oneapi/lib/etc/Intel_FPGA_SSG_Emulator.icd | ||
59 | } | ||
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..106b3ad5 --- /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 = "${UNPACKDIR}/${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..d2bd72a3 --- /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 = "${UNPACKDIR}/${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_3.13.3.bb b/dynamic-layers/openembedded-layer/recipes-oneapi/embree/embree_4.3.3.bb index 5dc4cc8d..77549479 100644 --- a/dynamic-layers/openembedded-layer/recipes-oneapi/embree/embree_3.13.3.bb +++ b/dynamic-layers/openembedded-layer/recipes-oneapi/embree/embree_4.3.3.bb | |||
@@ -4,18 +4,15 @@ intended to graphics application engineers that want to improve the \ | |||
4 | performance of their application." | 4 | performance of their application." |
5 | HOMEPAGE = "https://github.com/embree/embree" | 5 | HOMEPAGE = "https://github.com/embree/embree" |
6 | 6 | ||
7 | LICENSE = "Apache-2.0 & syrah" | 7 | LICENSE = "Apache-2.0 & BSD-3-Clause" |
8 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57 \ | 8 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57 \ |
9 | file://third-party-programs.txt;md5=86f6028ba2138fe41ac5c121d0a3518e \ | 9 | file://third-party-programs.txt;md5=f989f5b74cfff0d45d3ccf0e1366cbdc \ |
10 | file://common/math/transcendental.h;beginline=6;endline=8;md5=73380bb2ab6613b30b8464f114bd0ca8" | 10 | file://common/math/transcendental.h;beginline=6;endline=8;md5=73380bb2ab6613b30b8464f114bd0ca8" |
11 | 11 | ||
12 | inherit pkgconfig cmake | 12 | inherit pkgconfig cmake |
13 | 13 | ||
14 | S = "${WORKDIR}/git" | 14 | SRC_URI = "git://github.com/embree/embree.git;protocol=https;branch=master" |
15 | 15 | SRCREV = "5730b150471602d6dc02d9b7d8a4a6ce9ceffe16" | |
16 | SRC_URI = "git://github.com/embree/embree.git;protocol=https;branch=master \ | ||
17 | " | ||
18 | SRCREV = "0835461a5dd1659696524303dc9cb2f2300ae156" | ||
19 | 16 | ||
20 | COMPATIBLE_HOST = '(x86_64).*-linux' | 17 | COMPATIBLE_HOST = '(x86_64).*-linux' |
21 | COMPATIBLE_HOST:libc-musl = "null" | 18 | COMPATIBLE_HOST:libc-musl = "null" |
@@ -23,9 +20,11 @@ COMPATIBLE_HOST:libc-musl = "null" | |||
23 | DEPENDS = "tbb jpeg libpng glfw ispc-native" | 20 | DEPENDS = "tbb jpeg libpng glfw ispc-native" |
24 | 21 | ||
25 | EXTRA_OECMAKE += " \ | 22 | EXTRA_OECMAKE += " \ |
26 | -DEMBREE_ISPC_SUPPORT=OFF \ | ||
27 | -DEMBREE_IGNORE_CMAKE_CXX_FLAGS=OFF \ | 23 | -DEMBREE_IGNORE_CMAKE_CXX_FLAGS=OFF \ |
28 | -DEMBREE_MAX_ISA=DEFAULT \ | 24 | -DEMBREE_MAX_ISA=DEFAULT \ |
29 | -DEMBREE_TUTORIALS=OFF \ | 25 | -DEMBREE_TUTORIALS=OFF \ |
30 | -DEMBREE_ISPC_SUPPORT=ON \ | 26 | -DEMBREE_ISPC_SUPPORT=ON \ |
27 | -DEMBREE_ZIP_MODE=OFF \ | ||
31 | " | 28 | " |
29 | |||
30 | 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..d10f50f9 --- /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 = "${UNPACKDIR}/${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/ipp/intel-oneapi-ipp_2021.5.1-522.bb b/dynamic-layers/openembedded-layer/recipes-oneapi/ipp/intel-oneapi-ipp_2021.5.1-522.bb deleted file mode 100644 index ae764253..00000000 --- a/dynamic-layers/openembedded-layer/recipes-oneapi/ipp/intel-oneapi-ipp_2021.5.1-522.bb +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
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 | LIC_FILES_CHKSUM = " \ | ||
9 | file://opt/intel/oneapi/lib/licensing/ipp/license.txt;md5=0c8b92562c3c165187e2c15ff638855e \ | ||
10 | file://opt/intel/oneapi/lib/licensing/ipp/third-party-programs.txt;md5=6cd9ad51f3b5cdfd4a355fa5599a6c03 \ | ||
11 | " | ||
12 | |||
13 | SRC_URI = " \ | ||
14 | https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-runtime-ipp-${PV}_amd64.deb;subdir=${BPN};name=runtime \ | ||
15 | https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-runtime-ipp-common-${PV}_all.deb;subdir=${BPN};name=common \ | ||
16 | " | ||
17 | |||
18 | SRC_URI[runtime.sha256sum] = "98cd14bf635969d57bf9ea7bb27b90f27f72404f1927aa486a2bcf3c20a0f303" | ||
19 | SRC_URI[common.sha256sum] = "1aac41633179e824567b90afd39b8405db30df79a027421568df019b2b51bdd1" | ||
20 | |||
21 | S = "${WORKDIR}/${BPN}" | ||
22 | |||
23 | COMPATIBLE_HOST:libc-musl = "null" | ||
24 | |||
25 | inherit bin_package | ||
26 | |||
27 | INHIBIT_PACKAGE_STRIP = "1" | ||
28 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
29 | |||
30 | RDEPENDS:${PN} += "tbb setup-intel-oneapi-env" | ||
31 | INSANE_SKIP:${PN} += "ldflags dev-so" | ||
32 | |||
33 | # Some libraries are linking against the unversioned lib and there's no soname entry. | ||
34 | # Workaround errors like: | ||
35 | # Problem: conflicting requests | ||
36 | # - nothing provides libippcore_tl_omp.so()(64bit) needed by intel-oneapi-ipp-2021.3.0+333-r0.skylake_64 | ||
37 | do_install:append () { | ||
38 | install -m 755 ${D}/opt/intel/oneapi/lib/intel64/libippcore_tl_omp.so.10.4 ${D}/opt/intel/oneapi/lib/intel64/libippcore_tl_omp.so | ||
39 | install -m 755 ${D}/opt/intel/oneapi/lib/intel64/libippcore_tl_tbb.so.10.4 ${D}/opt/intel/oneapi/lib/intel64/libippcore_tl_tbb.so | ||
40 | install -m 755 ${D}/opt/intel/oneapi/lib/intel64/libippi_tl_omp.so.10.4 ${D}/opt/intel/oneapi/lib/intel64/libippi_tl_omp.so | ||
41 | install -m 755 ${D}/opt/intel/oneapi/lib/intel64/libippi_tl_tbb.so.10.4 ${D}/opt/intel/oneapi/lib/intel64/libippi_tl_tbb.so | ||
42 | } | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-oneapi/mkl/intel-oneapi-mkl_2022.0.1-117.bb b/dynamic-layers/openembedded-layer/recipes-oneapi/mkl/intel-oneapi-mkl_2022.0.1-117.bb deleted file mode 100644 index fc89206a..00000000 --- a/dynamic-layers/openembedded-layer/recipes-oneapi/mkl/intel-oneapi-mkl_2022.0.1-117.bb +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
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 | LIC_FILES_CHKSUM = " \ | ||
15 | file://opt/intel/oneapi/lib/licensing/mkl/license.txt;md5=0c8b92562c3c165187e2c15ff638855e \ | ||
16 | file://opt/intel/oneapi/lib/licensing/mkl/third-party-programs-benchmarks.txt;md5=cb98e1a1f14c05ea85a979ea8982e7a4 \ | ||
17 | file://opt/intel/oneapi/lib/licensing/mkl/third-party-programs-ipp.txt;md5=a4b2bf15e38f5c1267cdafed18bc0b09 \ | ||
18 | file://opt/intel/oneapi/lib/licensing/mkl/third-party-programs-openmp.txt;md5=6b3c1aa2a11393060074c0346ce21e49 \ | ||
19 | file://opt/intel/oneapi/lib/licensing/mkl/third-party-programs-safestring.txt;md5=c3aeee91c6d35a0f0753aed6c2633b82 \ | ||
20 | file://opt/intel/oneapi/lib/licensing/mkl/third-party-programs.txt;md5=980965cf1f086d40998ca4981968b6a4 \ | ||
21 | " | ||
22 | |||
23 | SRC_URI = " \ | ||
24 | https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-runtime-mkl-${PV}_amd64.deb;subdir=${BPN};name=runtime \ | ||
25 | https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-runtime-mkl-common-${PV}_all.deb;subdir=${BPN};name=common \ | ||
26 | " | ||
27 | |||
28 | SRC_URI[runtime.sha256sum] = "b20e0f7400fbbc55d8489f9f3ef35a8c8df7f5af7d87903bf305703e3a2ebc3b" | ||
29 | SRC_URI[common.sha256sum] = "bff8b2bfedbd09c9e6d0366cca3d4de80af521302bd5938fe6fa0128c6839041" | ||
30 | |||
31 | S = "${WORKDIR}/${BPN}" | ||
32 | |||
33 | inherit bin_package | ||
34 | |||
35 | INHIBIT_PACKAGE_STRIP = "1" | ||
36 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
37 | |||
38 | RDEPENDS:${PN} += "tbb intel-oneapi-compiler setup-intel-oneapi-env" | ||
39 | INSANE_SKIP:${PN} = "ldflags textrel 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..e77ac588 --- /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 = "${UNPACKDIR}/${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/0001-remove-redundant-RPATH.patch b/dynamic-layers/openembedded-layer/recipes-oneapi/oidn/oidn/0001-remove-redundant-RPATH.patch deleted file mode 100644 index 0f39a581..00000000 --- a/dynamic-layers/openembedded-layer/recipes-oneapi/oidn/oidn/0001-remove-redundant-RPATH.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | From 46b7de8c4ae0cc34805c2a11356c5a730fb8760a Mon Sep 17 00:00:00 2001 | ||
2 | From: Ezhilarasan <ezhilarasanx.s@intel.com> | ||
3 | Date: Fri, 4 Mar 2022 21:04:47 +0530 | ||
4 | Subject: [PATCH] remove-redundant-RPATH | ||
5 | |||
6 | Error Log: | ||
7 | ERROR: oidn-1.4.3-r0 do_package_qa: QA Issue: oidn: /usr/lib/libOpenImageDenoise.so.1.4.3 contains probably-redundant RPATH /usr/lib | ||
8 | oidn: /usr/bin/oidnTest contains probably-redundant RPATH /usr/lib | ||
9 | oidn: /usr/bin/oidnDenoise contains probably-redundant RPATH /usr/lib | ||
10 | oidn: /usr/bin/oidnBenchmark contains probably-redundant RPATH /usr/lib [useless-rpaths] | ||
11 | ERROR: oidn-1.4.3-r0 do_package_qa: Fatal QA errors were found, failing task. | ||
12 | |||
13 | Remove the redundant RPATH | ||
14 | |||
15 | Upstream-Status: Inappropriate | ||
16 | |||
17 | Signed-off-by: Ezhilarasan <ezhilarasanx.s@intel.com> | ||
18 | --- | ||
19 | cmake/oidn_package.cmake | 2 +- | ||
20 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/cmake/oidn_package.cmake b/cmake/oidn_package.cmake | ||
23 | index 1f76af8..46c0854 100644 | ||
24 | --- a/cmake/oidn_package.cmake | ||
25 | +++ b/cmake/oidn_package.cmake | ||
26 | @@ -29,7 +29,7 @@ if(OIDN_ZIP_MODE) | ||
27 | set(CMAKE_INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}") | ||
28 | endif() | ||
29 | else() | ||
30 | - set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}") | ||
31 | +# set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}") | ||
32 | endif() | ||
33 | |||
34 | ## ----------------------------------------------------------------------------- | ||
35 | -- | ||
36 | 2.17.1 | ||
37 | |||
diff --git a/dynamic-layers/openembedded-layer/recipes-oneapi/oidn/oidn_1.4.3.bb b/dynamic-layers/openembedded-layer/recipes-oneapi/oidn/oidn_2.1.0.bb index 8e055a57..8005f544 100644 --- a/dynamic-layers/openembedded-layer/recipes-oneapi/oidn/oidn_1.4.3.bb +++ b/dynamic-layers/openembedded-layer/recipes-oneapi/oidn/oidn_2.1.0.bb | |||
@@ -7,18 +7,21 @@ HOMEPAGE = "https://www.openimagedenoise.org/" | |||
7 | 7 | ||
8 | LICENSE = "Apache-2.0 & BSD-3-Clause" | 8 | LICENSE = "Apache-2.0 & BSD-3-Clause" |
9 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57 \ | 9 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57 \ |
10 | file://mkl-dnn/LICENSE;md5=8e17c0f9656ebaf0c380d9b22707c846 \ | 10 | file://external/mkl-dnn/LICENSE;md5=b48e3de3bfd47c27882a0d85b20823f5 \ |
11 | file://mkl-dnn/src/cpu/x64/xbyak/COPYRIGHT;md5=3b9bf048d063d54cdb28964db558bcc7 \ | 11 | file://external/mkl-dnn/src/cpu/x64/xbyak/COPYRIGHT;md5=3b9bf048d063d54cdb28964db558bcc7 \ |
12 | file://mkl-dnn/src/common/ittnotify/LICENSE.BSD;md5=e671ff178b24a95a382ba670503c66fb \ | 12 | file://external/mkl-dnn/src/common/ittnotify/LICENSE.BSD;md5=e671ff178b24a95a382ba670503c66fb \ |
13 | file://weights/LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" | 13 | file://weights/LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" |
14 | 14 | ||
15 | SRC_URI = "https://github.com/OpenImageDenoise/${BPN}/releases/download/v${PV}/${BP}.src.tar.gz\ | 15 | SRC_URI = "https://github.com/OpenImageDenoise/${BPN}/releases/download/v${PV}/${BP}.src.tar.gz\ |
16 | file://0001-remove-redundant-RPATH.patch \ | ||
17 | " | 16 | " |
18 | SRC_URI[sha256sum] = "3276e252297ebad67a999298d8f0c30cfb221e166b166ae5c955d88b94ad062a" | 17 | SRC_URI[sha256sum] = "ce144ba582ff36563d9442ee07fa2a4d249bc85aa93e5b25fc527ff4ee755ed6" |
19 | 18 | ||
20 | inherit cmake | 19 | inherit cmake |
21 | 20 | ||
22 | DEPENDS += "tbb ispc-native" | 21 | DEPENDS += "tbb ispc-native" |
23 | 22 | ||
23 | do_install:append() { | ||
24 | chrpath -d ${D}${bindir}/* ${D}${libdir}/*${SOLIBS} | ||
25 | } | ||
26 | |||
24 | UPSTREAM_CHECK_URI = "https://github.com/OpenImageDenoise/oidn/releases" | 27 | UPSTREAM_CHECK_URI = "https://github.com/OpenImageDenoise/oidn/releases" |
diff --git a/dynamic-layers/openembedded-layer/recipes-oneapi/openvkl/openvkl_1.2.0.bb b/dynamic-layers/openembedded-layer/recipes-oneapi/openvkl/openvkl_2.0.1.bb index 4691b07f..1b0b32ed 100644 --- a/dynamic-layers/openembedded-layer/recipes-oneapi/openvkl/openvkl_1.2.0.bb +++ b/dynamic-layers/openembedded-layer/recipes-oneapi/openvkl/openvkl_2.0.1.bb | |||
@@ -16,20 +16,24 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57 \ | |||
16 | 16 | ||
17 | inherit pkgconfig cmake | 17 | inherit pkgconfig cmake |
18 | 18 | ||
19 | S = "${WORKDIR}/git" | ||
20 | |||
21 | SRC_URI = "git://github.com/openvkl/openvkl.git;protocol=https;branch=master \ | 19 | SRC_URI = "git://github.com/openvkl/openvkl.git;protocol=https;branch=master \ |
22 | " | 20 | " |
23 | SRCREV = "5da393e9edc8becebbf41c9bb6cb9b87aa0b1e93" | 21 | SRCREV = "8c6ba526813b871a624cb9d73d4cbb689ac7f4ce" |
24 | 22 | ||
25 | COMPATIBLE_HOST = '(x86_64).*-linux' | 23 | COMPATIBLE_HOST = '(x86_64).*-linux' |
26 | COMPATIBLE_HOST:libc-musl = "null" | 24 | COMPATIBLE_HOST:libc-musl = "null" |
27 | 25 | ||
28 | DEPENDS = "ispc-native rkcommon embree" | 26 | DEPENDS = "ispc ispc-native rkcommon embree" |
29 | 27 | ||
30 | EXTRA_OECMAKE += " \ | 28 | EXTRA_OECMAKE += " \ |
31 | -DISPC_EXECUTABLE=${STAGING_BINDIR_NATIVE}/ispc \ | 29 | -DISPC_EXECUTABLE=${STAGING_BINDIR_NATIVE}/ispc \ |
32 | " | 30 | " |
31 | EXTRA_OECMAKE:intel-corei7-64 += " \ | ||
32 | -DOPENVKL_ISA_AVX=OFF \ | ||
33 | -DOPENVKL_ISA_AVX2=OFF \ | ||
34 | -DOPENVKL_ISA_AVX512SKX=OFF \ | ||
35 | " | ||
36 | |||
33 | PACKAGES =+ "${PN}-examples" | 37 | PACKAGES =+ "${PN}-examples" |
34 | FILES:${PN}-examples = "\ | 38 | FILES:${PN}-examples = "\ |
35 | ${bindir} \ | 39 | ${bindir} \ |
diff --git a/dynamic-layers/openembedded-layer/recipes-oneapi/ospray/ospray_2.9.0.bb b/dynamic-layers/openembedded-layer/recipes-oneapi/ospray/ospray_3.2.0.bb index cd70ecd8..d4e85cbc 100644 --- a/dynamic-layers/openembedded-layer/recipes-oneapi/ospray/ospray_2.9.0.bb +++ b/dynamic-layers/openembedded-layer/recipes-oneapi/ospray/ospray_3.2.0.bb | |||
@@ -6,25 +6,26 @@ HOMEPAGE = "https://www.ospray.org/" | |||
6 | 6 | ||
7 | LICENSE = "Apache-2.0 & BSD-3-Clause & MIT & Zlib" | 7 | LICENSE = "Apache-2.0 & BSD-3-Clause & MIT & Zlib" |
8 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1dece7821bf3fd70fe1309eaa37d52a2 \ | 8 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1dece7821bf3fd70fe1309eaa37d52a2 \ |
9 | file://third-party-programs.txt;md5=d0b3d9b55b2ccd6a3bffc374cf2d5563" | 9 | file://third-party-programs.txt;md5=e37b77e3bd997abccc359c710fb1f1db \ |
10 | " | ||
10 | 11 | ||
11 | inherit pkgconfig cmake | 12 | inherit pkgconfig cmake |
12 | 13 | ||
13 | S = "${WORKDIR}/git" | ||
14 | |||
15 | SRC_URI = "git://github.com/ospray/ospray.git;protocol=https;branch=master \ | 14 | SRC_URI = "git://github.com/ospray/ospray.git;protocol=https;branch=master \ |
16 | " | 15 | git://github.com/nothings/stb;protocol=https;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/apps/common/external/stb_image/stb;name=stb;nobranch=1 \ |
17 | SRCREV = "bc891f413f5657a31faa273992fda61d3666eef7" | 16 | " |
17 | SRCREV = "85af2929937d516997451cbd52d352cf93125ed2" | ||
18 | 18 | ||
19 | COMPATIBLE_HOST = '(x86_64).*-linux' | 19 | COMPATIBLE_HOST = '(x86_64).*-linux' |
20 | COMPATIBLE_HOST:libc-musl = "null" | 20 | COMPATIBLE_HOST:libc-musl = "null" |
21 | 21 | ||
22 | DEPENDS = "rkcommon ispc-native openvkl embree" | 22 | DEPENDS = "rkcommon ispc ispc-native openvkl embree" |
23 | 23 | ||
24 | EXTRA_OECMAKE += " \ | 24 | EXTRA_OECMAKE += " \ |
25 | -DISPC_EXECUTABLE=${STAGING_BINDIR_NATIVE}/ispc \ | 25 | -DISPC_EXECUTABLE=${STAGING_BINDIR_NATIVE}/ispc \ |
26 | -DOSPRAY_ENABLE_APPS_BENCHMARK=OFF \ | 26 | -DOSPRAY_ENABLE_APPS_BENCHMARK=OFF \ |
27 | -DOSPRAY_ENABLE_APPS_TESTING=OFF \ | 27 | -DOSPRAY_ENABLE_APPS_TESTING=OFF \ |
28 | -DOSPRAY_ENABLE_APPS_EXAMPLES=OFF \ | ||
28 | " | 29 | " |
29 | 30 | ||
30 | PACKAGES =+ "${PN}-apps" | 31 | PACKAGES =+ "${PN}-apps" |
diff --git a/dynamic-layers/openembedded-layer/recipes-oneapi/rkcommon/rkcommon_1.9.0.bb b/dynamic-layers/openembedded-layer/recipes-oneapi/rkcommon/rkcommon_1.14.0.bb index c5e0fcdd..5289e9eb 100644 --- a/dynamic-layers/openembedded-layer/recipes-oneapi/rkcommon/rkcommon_1.9.0.bb +++ b/dynamic-layers/openembedded-layer/recipes-oneapi/rkcommon/rkcommon_1.14.0.bb | |||
@@ -8,11 +8,9 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" | |||
8 | 8 | ||
9 | inherit pkgconfig cmake | 9 | inherit pkgconfig cmake |
10 | 10 | ||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | SRC_URI = "git://github.com/ospray/rkcommon.git;protocol=https;branch=master \ | 11 | SRC_URI = "git://github.com/ospray/rkcommon.git;protocol=https;branch=master \ |
14 | " | 12 | " |
15 | SRCREV = "8636cc74a254178175601a656b58faefb299fd43" | 13 | SRCREV = "4a00047ae5a3ac705b6b33b4a7574588d91e7953" |
16 | 14 | ||
17 | DEPENDS = "tbb" | 15 | DEPENDS = "tbb" |
18 | 16 | ||
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 index 7fede93c..8a734ed2 100644 --- 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 | |||
@@ -1,27 +1,29 @@ | |||
1 | 1 | Subject: [PATCH] [PATCH]: ignore static asserts and null define for os and ut | |
2 | builds | ||
2 | Upstream-Status: Backport | 3 | Upstream-Status: Backport |
3 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | 4 | Signed-off-by: Teoh Suh Haw <suh.haw.teoh@intel.com> |
4 | 5 | --- | |
5 | MdePkg/Include/Base.h | 12 ++++++++++++ | 6 | MdePkg/Include/Base.h | 12 ++++++++++++ |
6 | 1 file changed, 12 insertions(+) | 7 | 1 file changed, 12 insertions(+) |
7 | 8 | ||
8 | diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h | 9 | Index: edk2/MdePkg/Include/Base.h |
9 | index 2da08b0c78..072eefdb94 100644 | 10 | =================================================================== |
10 | --- a/MdePkg/Include/Base.h | 11 | --- edk2.orig/MdePkg/Include/Base.h |
11 | +++ b/MdePkg/Include/Base.h | 12 | +++ edk2/MdePkg/Include/Base.h |
12 | @@ -318,7 +318,11 @@ struct _LIST_ENTRY { | 13 | @@ -316,8 +316,12 @@ struct _LIST_ENTRY { |
13 | /// | 14 | #define NULL __null |
14 | /// NULL pointer (VOID *) | 15 | #endif |
15 | /// | 16 | #else |
16 | +#ifndef OS_BUILD | 17 | +#ifndef OS_BUILD |
17 | +#ifndef UNIT_TEST_UEFI_BUILD | 18 | +#ifndef UNIT_TEST_UEFI_BUILD |
18 | #define NULL ((VOID *) 0) | 19 | #define NULL ((VOID *) 0) |
20 | #endif | ||
19 | +#endif | 21 | +#endif |
20 | +#endif | 22 | +#endif |
21 | 23 | ||
22 | // | 24 | // |
23 | // Null character | 25 | // Null character |
24 | @@ -810,6 +814,8 @@ typedef UINTN *BASE_LIST; | 26 | @@ -813,6 +817,8 @@ typedef UINTN *BASE_LIST; |
25 | // Section 2.3.1 of the UEFI 2.3 Specification. | 27 | // Section 2.3.1 of the UEFI 2.3 Specification. |
26 | // | 28 | // |
27 | 29 | ||
@@ -30,28 +32,31 @@ index 2da08b0c78..072eefdb94 100644 | |||
30 | STATIC_ASSERT (sizeof (BOOLEAN) == 1, "sizeof (BOOLEAN) does not meet UEFI Specification Data Type requirements"); | 32 | STATIC_ASSERT (sizeof (BOOLEAN) == 1, "sizeof (BOOLEAN) does not meet UEFI Specification Data Type requirements"); |
31 | STATIC_ASSERT (sizeof (INT8) == 1, "sizeof (INT8) does not meet UEFI Specification Data Type requirements"); | 33 | STATIC_ASSERT (sizeof (INT8) == 1, "sizeof (INT8) does not meet UEFI Specification Data Type requirements"); |
32 | STATIC_ASSERT (sizeof (UINT8) == 1, "sizeof (UINT8) does not meet UEFI Specification Data Type requirements"); | 34 | STATIC_ASSERT (sizeof (UINT8) == 1, "sizeof (UINT8) does not meet UEFI Specification Data Type requirements"); |
33 | @@ -823,6 +829,8 @@ STATIC_ASSERT (sizeof (CHAR8) == 1, "sizeof (CHAR8) does not meet UEFI Specifi | 35 | @@ -841,7 +847,8 @@ STATIC_ASSERT (ALIGNOF (CHAR16) == size |
34 | STATIC_ASSERT (sizeof (CHAR16) == 2, "sizeof (CHAR16) does not meet UEFI Specification Data Type requirements"); | 36 | STATIC_ASSERT (ALIGNOF (INTN) == sizeof (INTN), "Alignment of INTN does not meet UEFI Specification Data Type requirements"); |
35 | STATIC_ASSERT (sizeof (L'A') == 2, "sizeof (L'A') 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"); |
36 | STATIC_ASSERT (sizeof (L"A") == 4, "sizeof (L\"A\") 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 | - | ||
37 | +#endif | 40 | +#endif |
38 | +#endif | 41 | +#endif |
39 | |||
40 | // | 42 | // |
41 | // The following three enum types are used to verify that the compiler | 43 | // The following three enum types are used to verify that the compiler |
42 | @@ -843,9 +851,13 @@ typedef enum { | 44 | // configuration for enum types is compliant with Section 2.3.1 of the |
43 | __VerifyUint32EnumValue = 0xffffffff | 45 | @@ -861,6 +868,8 @@ typedef enum { |
44 | } __VERIFY_UINT32_ENUM_SIZE; | 46 | __VerifyInt32EnumValue = 0x7fffffff |
47 | } __VERIFY_INT32_ENUM_SIZE; | ||
45 | 48 | ||
46 | +#ifndef OS_BUILD | 49 | +#ifndef OS_BUILD |
47 | +#ifndef UNIT_TEST_UEFI_BUILD | 50 | +#ifndef UNIT_TEST_UEFI_BUILD |
48 | STATIC_ASSERT (sizeof (__VERIFY_UINT8_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements"); | 51 | STATIC_ASSERT (sizeof (__VERIFY_UINT8_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements"); |
49 | STATIC_ASSERT (sizeof (__VERIFY_UINT16_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"); |
50 | STATIC_ASSERT (sizeof (__VERIFY_UINT32_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"); | ||
51 | +#endif | 58 | +#endif |
52 | +#endif | 59 | +#endif |
53 | 60 | ||
54 | /** | 61 | /** |
55 | Macro that returns a pointer to the data structure that contains a specified field of | 62 | Macro that returns a pointer to the data structure that contains a specified field of |
56 | -- | ||
57 | 2.31.0.windows.1 | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl_03.00.00.0438.bb b/dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl_03.00.00.0499.bb index 1ff15189..7b95ffe4 100644 --- a/dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl_03.00.00.0438.bb +++ b/dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl_03.00.00.0499.bb | |||
@@ -15,17 +15,16 @@ LICENSE = "BSD-3-Clause | BSD-2-Clause" | |||
15 | LIC_FILES_CHKSUM = "file://LICENSE;md5=72b9da60da6219d612ce30b746a0fe71 \ | 15 | LIC_FILES_CHKSUM = "file://LICENSE;md5=72b9da60da6219d612ce30b746a0fe71 \ |
16 | file://edk2/License.txt;md5=6123e5bf044a66db96c4ce88a36b2d08" | 16 | file://edk2/License.txt;md5=6123e5bf044a66db96c4ce88a36b2d08" |
17 | 17 | ||
18 | SRC_URI = "git://github.com/intel/ipmctl.git;protocol=https;branch=development;name=ipmctl; \ | 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 \ | 19 | git://github.com/tianocore/edk2.git;protocol=https;name=edk2;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/edk2;branch=master \ |
20 | file://0001-Ignore-STATIC_ASSERTs-and-NULL-define-for-os-and-ut-builds.patch;patchdir=edk2 \ | 20 | file://0001-Ignore-STATIC_ASSERTs-and-NULL-define-for-os-and-ut-builds.patch;patchdir=edk2 \ |
21 | file://0001-CMakeLists-disable-Werror.patch \ | 21 | file://0001-CMakeLists-disable-Werror.patch \ |
22 | " | 22 | " |
23 | 23 | ||
24 | SRCREV_ipmctl = "99188a69a82409f6759e8bfdff8fd71840e851fc" | 24 | SRCREV_ipmctl = "a71f2fb1c90dd07f9862b71c789881132193e8f9" |
25 | #tag: edk2-stable202111 | 25 | #tag edk2-stable202408 |
26 | SRCREV_edk2 = "bb1bba3d776733c41dbfa2d1dc0fe234819a79f2" | 26 | SRCREV_edk2 = "b158dad150bf02879668f72ce306445250838201" |
27 | 27 | SRCREV_FORMAT = "ipmctl_edk2" | |
28 | S = "${WORKDIR}/git" | ||
29 | 28 | ||
30 | inherit cmake dos2unix | 29 | inherit cmake dos2unix |
31 | 30 | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-inference-engine-use-system-installed-packages.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-inference-engine-use-system-installed-packages.patch deleted file mode 100644 index 315385d8..00000000 --- a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-inference-engine-use-system-installed-packages.patch +++ /dev/null | |||
@@ -1,296 +0,0 @@ | |||
1 | From b0f30ab7ecdac98afa72a31371a393a73f855b3c Mon Sep 17 00:00:00 2001 | ||
2 | From: Anuj Mittal <anuj.mittal@intel.com> | ||
3 | Date: Thu, 7 Apr 2022 21:39:26 +0800 | ||
4 | Subject: [PATCH] Use system installed dependencies | ||
5 | |||
6 | Use the system versions of libva, tbb, OpenCV, ade and zlib. | ||
7 | |||
8 | Upstream-Status: Inappropriate | ||
9 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
10 | |||
11 | --- | ||
12 | cmake/dependencies.cmake | 75 ------------------------- | ||
13 | cmake/extra_modules.cmake | 4 +- | ||
14 | cmake/templates/OpenVINOConfig.cmake.in | 9 --- | ||
15 | src/cmake/ie_parallel.cmake | 2 +- | ||
16 | src/plugins/intel_gpu/include/va/va.h | 6 -- | ||
17 | tests/fuzz/src/CMakeLists.txt | 3 +- | ||
18 | thirdparty/CMakeLists.txt | 26 ++++----- | ||
19 | thirdparty/cnpy/CMakeLists.txt | 2 +- | ||
20 | 8 files changed, 15 insertions(+), 112 deletions(-) | ||
21 | delete mode 100644 src/plugins/intel_gpu/include/va/va.h | ||
22 | |||
23 | diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake | ||
24 | index e2f941fcd..1fcc358ef 100644 | ||
25 | --- a/cmake/dependencies.cmake | ||
26 | +++ b/cmake/dependencies.cmake | ||
27 | @@ -29,26 +29,6 @@ endif() | ||
28 | |||
29 | if(CMAKE_CROSSCOMPILING AND CMAKE_HOST_SYSTEM_NAME MATCHES Linux AND CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*") | ||
30 | set(protoc_version "3.18.2") | ||
31 | - | ||
32 | - RESOLVE_DEPENDENCY(SYSTEM_PROTOC_ROOT | ||
33 | - ARCHIVE_LIN "protoc-${protoc_version}-linux-x86_64.tar.gz" | ||
34 | - TARGET_PATH "${TEMP}/protoc-${protoc_version}-linux-x86_64" | ||
35 | - SHA256 "42fde2b6044c1f74c7e86d4e03b43aac87128ddf57ac6ed8c4eab7a1e21bbf21" | ||
36 | - ) | ||
37 | - debug_message(STATUS "host protoc-${protoc_version} root path = " ${SYSTEM_PROTOC_ROOT}) | ||
38 | - | ||
39 | - reset_deps_cache(SYSTEM_PROTOC) | ||
40 | - | ||
41 | - find_host_program( | ||
42 | - SYSTEM_PROTOC | ||
43 | - NAMES protoc | ||
44 | - PATHS "${SYSTEM_PROTOC_ROOT}/bin" | ||
45 | - NO_DEFAULT_PATH) | ||
46 | - if(NOT SYSTEM_PROTOC) | ||
47 | - message(FATAL_ERROR "[ONNX IMPORTER] Missing host protoc binary") | ||
48 | - endif() | ||
49 | - | ||
50 | - update_deps_cache(SYSTEM_PROTOC "${SYSTEM_PROTOC}" "Path to host protoc for ONNX Importer") | ||
51 | endif() | ||
52 | |||
53 | if(ENABLE_INTEL_MYRIAD) | ||
54 | @@ -102,61 +82,6 @@ if(THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO") | ||
55 | set(IE_PATH_TO_DEPS "${THIRDPARTY_SERVER_PATH}") | ||
56 | endif() | ||
57 | |||
58 | - if(WIN32 AND X86_64) | ||
59 | - # TODO: add target_path to be platform specific as well, to avoid following if | ||
60 | - RESOLVE_DEPENDENCY(TBB | ||
61 | - ARCHIVE_WIN "tbb2020_20200415_win.zip" | ||
62 | - TARGET_PATH "${TEMP}/tbb" | ||
63 | - ENVIRONMENT "TBBROOT" | ||
64 | - SHA256 "f1c9b9e2861efdaa01552bd25312ccbc5feeb45551e5f91ae61e29221c5c1479") | ||
65 | - if(ENABLE_TBBBIND_2_5) | ||
66 | - RESOLVE_DEPENDENCY(TBBBIND_2_5 | ||
67 | - ARCHIVE_WIN "tbbbind_2_5_static_win_v1.zip" | ||
68 | - TARGET_PATH "${TEMP}/tbbbind_2_5" | ||
69 | - ENVIRONMENT "TBBBIND_2_5_ROOT" | ||
70 | - SHA256 "a67afeea8cf194f97968c800dab5b5459972908295242e282045d6b8953573c1") | ||
71 | - else() | ||
72 | - message(WARNING "prebuilt TBBBIND_2_5 is not available. | ||
73 | - Build oneTBB from sources and set TBBROOT environment var before OpenVINO cmake configure") | ||
74 | - endif() | ||
75 | - elseif(ANDROID) # Should be before LINUX due LINUX is detected as well | ||
76 | - RESOLVE_DEPENDENCY(TBB | ||
77 | - ARCHIVE_ANDROID "tbb2020_20200404_android.tgz" | ||
78 | - TARGET_PATH "${TEMP}/tbb" | ||
79 | - ENVIRONMENT "TBBROOT" | ||
80 | - SHA256 "f42d084224cc2d643314bd483ad180b081774608844000f132859fca3e9bf0ce") | ||
81 | - elseif(LINUX AND X86_64) | ||
82 | - RESOLVE_DEPENDENCY(TBB | ||
83 | - ARCHIVE_LIN "tbb2020_20200415_lin_strip.tgz" | ||
84 | - TARGET_PATH "${TEMP}/tbb" | ||
85 | - ENVIRONMENT "TBBROOT" | ||
86 | - SHA256 "95b2f3b0b70c7376a0c7de351a355c2c514b42c4966e77e3e34271a599501008") | ||
87 | - if(ENABLE_TBBBIND_2_5) | ||
88 | - RESOLVE_DEPENDENCY(TBBBIND_2_5 | ||
89 | - ARCHIVE_LIN "tbbbind_2_5_static_lin_v2.tgz" | ||
90 | - TARGET_PATH "${TEMP}/tbbbind_2_5" | ||
91 | - ENVIRONMENT "TBBBIND_2_5_ROOT" | ||
92 | - SHA256 "865e7894c58402233caf0d1b288056e0e6ab2bf7c9d00c9dc60561c484bc90f4") | ||
93 | - else() | ||
94 | - message(WARNING "prebuilt TBBBIND_2_5 is not available. | ||
95 | - Build oneTBB from sources and set TBBROOT environment var before OpenVINO cmake configure") | ||
96 | - endif() | ||
97 | - elseif(LINUX AND AARCH64) | ||
98 | - RESOLVE_DEPENDENCY(TBB | ||
99 | - ARCHIVE_LIN "keembay/tbb2020_38404_kmb_lic.tgz" | ||
100 | - TARGET_PATH "${TEMP}/tbb_yocto" | ||
101 | - ENVIRONMENT "TBBROOT" | ||
102 | - SHA256 "321261ff2eda6d4568a473cb883262bce77a93dac599f7bd65d2918bdee4d75b") | ||
103 | - elseif(APPLE AND X86_64) | ||
104 | - RESOLVE_DEPENDENCY(TBB | ||
105 | - ARCHIVE_MAC "tbb2020_20200404_mac.tgz" | ||
106 | - TARGET_PATH "${TEMP}/tbb" | ||
107 | - ENVIRONMENT "TBBROOT" | ||
108 | - SHA256 "ad9cf52e657660058aa6c6844914bc0fc66241fec89a392d8b79a7ff69c3c7f6") | ||
109 | - else() | ||
110 | - message(FATAL_ERROR "TBB is not available on current platform") | ||
111 | - endif() | ||
112 | - | ||
113 | update_deps_cache(TBBROOT "${TBB}" "Path to TBB root folder") | ||
114 | if(EXISTS "${TBBROOT}/lib/cmake/TBB/TBBConfig.cmake") | ||
115 | # oneTBB case | ||
116 | diff --git a/cmake/extra_modules.cmake b/cmake/extra_modules.cmake | ||
117 | index e33e4378f..f0cacdf6f 100644 | ||
118 | --- a/cmake/extra_modules.cmake | ||
119 | +++ b/cmake/extra_modules.cmake | ||
120 | @@ -18,7 +18,7 @@ function(ie_generate_dev_package_config) | ||
121 | configure_package_config_file("${OpenVINO_SOURCE_DIR}/cmake/templates/InferenceEngineDeveloperPackageConfig.cmake.in" | ||
122 | "${CMAKE_BINARY_DIR}/InferenceEngineDeveloperPackageConfig.cmake" | ||
123 | INSTALL_DESTINATION share # not used | ||
124 | - PATH_VARS "OpenVINO_SOURCE_DIR;gflags_BINARY_DIR" | ||
125 | + PATH_VARS "OpenVINO_SOURCE_DIR" | ||
126 | NO_CHECK_REQUIRED_COMPONENTS_MACRO) | ||
127 | |||
128 | configure_file("${OpenVINO_SOURCE_DIR}/cmake/templates/InferenceEngineConfig-version.cmake.in" | ||
129 | @@ -45,7 +45,7 @@ function(ov_generate_dev_package_config) | ||
130 | configure_package_config_file("${OpenVINO_SOURCE_DIR}/cmake/templates/OpenVINODeveloperPackageConfig.cmake.in" | ||
131 | "${CMAKE_BINARY_DIR}/OpenVINODeveloperPackageConfig.cmake" | ||
132 | INSTALL_DESTINATION share # not used | ||
133 | - PATH_VARS "OpenVINO_SOURCE_DIR;gflags_BINARY_DIR" | ||
134 | + PATH_VARS "OpenVINO_SOURCE_DIR" | ||
135 | NO_CHECK_REQUIRED_COMPONENTS_MACRO) | ||
136 | |||
137 | configure_file("${OpenVINO_SOURCE_DIR}/cmake/templates/OpenVINOConfig-version.cmake.in" | ||
138 | diff --git a/cmake/templates/OpenVINOConfig.cmake.in b/cmake/templates/OpenVINOConfig.cmake.in | ||
139 | index 00e892f2b..7c686fa07 100644 | ||
140 | --- a/cmake/templates/OpenVINOConfig.cmake.in | ||
141 | +++ b/cmake/templates/OpenVINOConfig.cmake.in | ||
142 | @@ -146,15 +146,6 @@ set(_ov_package_prefix_dir "${PACKAGE_PREFIX_DIR}") | ||
143 | |||
144 | set(THREADING "@THREADING@") | ||
145 | if((THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO") AND NOT TBB_FOUND) | ||
146 | - set_and_check(_tbb_dir "@PACKAGE_IE_TBB_DIR@") | ||
147 | - _ov_find_dependency(TBB | ||
148 | - COMPONENTS tbb tbbmalloc | ||
149 | - CONFIG | ||
150 | - PATHS ${TBBROOT}/cmake | ||
151 | - ${_tbb_dir} | ||
152 | - NO_CMAKE_FIND_ROOT_PATH | ||
153 | - NO_DEFAULT_PATH) | ||
154 | - | ||
155 | set(install_tbbbind "@install_tbbbind@") | ||
156 | if(install_tbbbind) | ||
157 | set_and_check(_tbb_bind_dir "@PACKAGE_IE_TBBBIND_DIR@") | ||
158 | diff --git a/src/cmake/ie_parallel.cmake b/src/cmake/ie_parallel.cmake | ||
159 | index a036b019c..031f1ea48 100644 | ||
160 | --- a/src/cmake/ie_parallel.cmake | ||
161 | +++ b/src/cmake/ie_parallel.cmake | ||
162 | @@ -34,7 +34,7 @@ function(set_ie_threading_interface_for TARGET_NAME) | ||
163 | endforeach() | ||
164 | endif() | ||
165 | set(TBB_FOUND ${TBB_FOUND} PARENT_SCOPE) | ||
166 | - set(TBB_IMPORTED_TARGETS ${TBB_IMPORTED_TARGETS} PARENT_SCOPE) | ||
167 | + set(TBB_IMPORTED_TARGETS "tbb;tbbmalloc" PARENT_SCOPE) | ||
168 | set(TBB_VERSION ${TBB_VERSION} PARENT_SCOPE) | ||
169 | if (NOT TBB_FOUND) | ||
170 | set(THREADING "SEQ" PARENT_SCOPE) | ||
171 | diff --git a/src/plugins/intel_gpu/include/va/va.h b/src/plugins/intel_gpu/include/va/va.h | ||
172 | deleted file mode 100644 | ||
173 | index 5c8a5c6f6..000000000 | ||
174 | --- a/src/plugins/intel_gpu/include/va/va.h | ||
175 | +++ /dev/null | ||
176 | @@ -1,6 +0,0 @@ | ||
177 | -// Copyright (C) 2018-2022 Intel Corporation | ||
178 | -// SPDX-License-Identifier: Apache-2.0 | ||
179 | -// | ||
180 | - | ||
181 | -typedef cl_uint VASurfaceID; | ||
182 | -typedef void* VADisplay; | ||
183 | diff --git a/tests/fuzz/src/CMakeLists.txt b/tests/fuzz/src/CMakeLists.txt | ||
184 | index 5e6b7b168..a81c51bb7 100644 | ||
185 | --- a/tests/fuzz/src/CMakeLists.txt | ||
186 | +++ b/tests/fuzz/src/CMakeLists.txt | ||
187 | @@ -10,14 +10,13 @@ add_custom_target(fuzz) | ||
188 | FILE(GLOB tests "*-fuzzer.cc") | ||
189 | |||
190 | add_subdirectory(../../../thirdparty/cnpy ${CMAKE_CURRENT_BINARY_DIR}/cnpy) | ||
191 | -add_subdirectory(../../../thirdparty/zlib ${CMAKE_CURRENT_BINARY_DIR}/zlib) | ||
192 | |||
193 | foreach(test_source ${tests}) | ||
194 | get_filename_component(test_name ${test_source} NAME_WE) | ||
195 | add_fuzzer(${test_name} ${test_source}) | ||
196 | |||
197 | target_link_libraries(${test_name} PRIVATE | ||
198 | - openvino::runtime cnpy zlib) | ||
199 | + openvino::runtime cnpy z) | ||
200 | |||
201 | add_dependencies(fuzz ${test_name}) | ||
202 | |||
203 | diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt | ||
204 | index 2d61c5fd7..97b372998 100644 | ||
205 | --- a/thirdparty/CMakeLists.txt | ||
206 | +++ b/thirdparty/CMakeLists.txt | ||
207 | @@ -12,10 +12,9 @@ endif() | ||
208 | |||
209 | add_subdirectory(ittapi) | ||
210 | add_subdirectory(itt_collector EXCLUDE_FROM_ALL) | ||
211 | -add_subdirectory(zlib EXCLUDE_FROM_ALL) | ||
212 | add_subdirectory(cnpy EXCLUDE_FROM_ALL) | ||
213 | if(ENABLE_INTEL_GPU) | ||
214 | - add_subdirectory(ocl) | ||
215 | + #add_subdirectory(ocl) | ||
216 | endif() | ||
217 | |||
218 | add_subdirectory(xbyak EXCLUDE_FROM_ALL) | ||
219 | @@ -52,21 +51,16 @@ endif() | ||
220 | add_library(ocv_hal INTERFACE) | ||
221 | target_include_directories(ocv_hal INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/ocv") | ||
222 | |||
223 | -add_subdirectory(ade EXCLUDE_FROM_ALL) | ||
224 | add_subdirectory(fluid/modules/gapi EXCLUDE_FROM_ALL) | ||
225 | -set_target_properties(ade fluid PROPERTIES FOLDER thirdparty) | ||
226 | -openvino_developer_export_targets(COMPONENT openvino_common TARGETS ade fluid) | ||
227 | +set_target_properties(fluid PROPERTIES FOLDER thirdparty) | ||
228 | +openvino_developer_export_targets(COMPONENT openvino_common TARGETS fluid) | ||
229 | |||
230 | -ov_install_static_lib(ade openvino_common) | ||
231 | ov_install_static_lib(fluid openvino_common) | ||
232 | |||
233 | # | ||
234 | # Gflags | ||
235 | # | ||
236 | |||
237 | -add_subdirectory(gflags EXCLUDE_FROM_ALL) | ||
238 | -openvino_developer_export_targets(COMPONENT openvino_common TARGETS gflags) | ||
239 | - | ||
240 | # | ||
241 | # Google Tests framework | ||
242 | # | ||
243 | @@ -89,13 +83,13 @@ if(ENABLE_OV_PADDLE_FRONTEND OR ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_TF_FRONTEND | ||
244 | set(Protobuf_DEBUG ON) | ||
245 | endif() | ||
246 | find_package(Protobuf 3.18.2 REQUIRED) | ||
247 | - set(Protobuf_LITE_LIBRARIES protobuf::libprotobuf-lite) | ||
248 | - set(Protobuf_LIBRARIES protobuf::libprotobuf) | ||
249 | - set(SYSTEM_PROTOC protobuf::protoc) | ||
250 | + set(Protobuf_LITE_LIBRARIES protobuf::libprotobuf-lite) | ||
251 | + set(Protobuf_LIBRARIES protobuf::libprotobuf) | ||
252 | + #set(SYSTEM_PROTOC protobuf::protoc) | ||
253 | set(PROTOC_EXECUTABLE ${SYSTEM_PROTOC}) | ||
254 | |||
255 | foreach(target ${SYSTEM_PROTOC} ${Protobuf_LIBRARIES} ${Protobuf_LITE_LIBRARIES}) | ||
256 | - set_property(TARGET ${target} PROPERTY IMPORTED_GLOBAL TRUE) | ||
257 | + #set_property(TARGET ${target} PROPERTY IMPORTED_GLOBAL TRUE) | ||
258 | endforeach() | ||
259 | else() | ||
260 | add_subdirectory(protobuf EXCLUDE_FROM_ALL) | ||
261 | @@ -104,8 +98,8 @@ if(ENABLE_OV_PADDLE_FRONTEND OR ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_TF_FRONTEND | ||
262 | # forward variables used in the other places | ||
263 | set(SYSTEM_PROTOC ${SYSTEM_PROTOC} PARENT_SCOPE) | ||
264 | set(PROTOC_EXECUTABLE ${PROTOC_EXECUTABLE} PARENT_SCOPE) | ||
265 | - set(Protobuf_LIBRARIES ${Protobuf_LIBRARIES} PARENT_SCOPE) | ||
266 | - set(Protobuf_LITE_LIBRARIES ${Protobuf_LITE_LIBRARIES} PARENT_SCOPE) | ||
267 | + set(Protobuf_LIBRARIES ${Protobuf_LIBRARY} PARENT_SCOPE) | ||
268 | + set(Protobuf_LITE_LIBRARIES ${Protobuf_LITE_LIBRARY} PARENT_SCOPE) | ||
269 | set(Protobuf_INCLUDE_DIRS ${Protobuf_INCLUDE_DIRS} PARENT_SCOPE) | ||
270 | set(Protobuf_IN_FRONTEND ON PARENT_SCOPE) | ||
271 | |||
272 | @@ -116,7 +110,7 @@ if(ENABLE_OV_PADDLE_FRONTEND OR ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_TF_FRONTEND | ||
273 | set(link_type INTERFACE) | ||
274 | endif() | ||
275 | if(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG) | ||
276 | - target_compile_options(${target} ${link_type} -Wno-undef) | ||
277 | + #target_compile_options(${target} ${link_type} -Wno-undef) | ||
278 | endif() | ||
279 | endforeach() | ||
280 | endif() | ||
281 | diff --git a/thirdparty/cnpy/CMakeLists.txt b/thirdparty/cnpy/CMakeLists.txt | ||
282 | index 041031e92..793de9845 100644 | ||
283 | --- a/thirdparty/cnpy/CMakeLists.txt | ||
284 | +++ b/thirdparty/cnpy/CMakeLists.txt | ||
285 | @@ -13,7 +13,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang$") | ||
286 | PRIVATE -Wno-all) | ||
287 | endif() | ||
288 | |||
289 | -target_link_libraries(${TARGET_NAME} PUBLIC zlib) | ||
290 | +target_link_libraries(${TARGET_NAME} PUBLIC z) | ||
291 | target_include_directories(${TARGET_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") | ||
292 | |||
293 | set_target_properties(${TARGET_NAME} PROPERTIES FOLDER thirdparty) | ||
294 | -- | ||
295 | 2.35.1 | ||
296 | |||
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0002-inference-engine-installation-fixes.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0002-inference-engine-installation-fixes.patch deleted file mode 100644 index 9e2b46fd..00000000 --- a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0002-inference-engine-installation-fixes.patch +++ /dev/null | |||
@@ -1,348 +0,0 @@ | |||
1 | From 07772636ef9b7207967395d22a869e204e8f485b Mon Sep 17 00:00:00 2001 | ||
2 | From: Anuj Mittal <anuj.mittal@intel.com> | ||
3 | Date: Mon, 11 Apr 2022 11:11:23 +0800 | ||
4 | Subject: [PATCH] Fix installation of binaries and libraries | ||
5 | |||
6 | Make sure binaries are installed correctly. | ||
7 | |||
8 | Upstream-Status: Inappropriate | ||
9 | |||
10 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
11 | --- | ||
12 | CMakeLists.txt | 2 +- | ||
13 | cmake/developer_package/frontends/frontends.cmake | 2 +- | ||
14 | cmake/developer_package/packaging.cmake | 4 ++-- | ||
15 | cmake/developer_package/plugins/plugins.cmake | 2 +- | ||
16 | docs/CMakeLists.txt | 3 ++- | ||
17 | samples/CMakeLists.txt | 2 +- | ||
18 | samples/c/common/opencv_c_wrapper/CMakeLists.txt | 2 ++ | ||
19 | samples/cpp/CMakeLists.txt | 2 ++ | ||
20 | scripts/CMakeLists.txt | 10 +++++----- | ||
21 | src/bindings/c/src/CMakeLists.txt | 4 ++-- | ||
22 | src/cmake/openvino.cmake | 12 ++++++------ | ||
23 | src/common/preprocessing/CMakeLists.txt | 2 +- | ||
24 | src/core/CMakeLists.txt | 4 ++-- | ||
25 | src/inference/CMakeLists.txt | 2 +- | ||
26 | .../intel_gpu/src/kernel_selector/CMakeLists.txt | 2 +- | ||
27 | src/plugins/intel_myriad/myriad_dependencies.cmake | 2 +- | ||
28 | .../intel_myriad/myriad_plugin/CMakeLists.txt | 2 +- | ||
29 | tools/CMakeLists.txt | 2 +- | ||
30 | tools/compile_tool/CMakeLists.txt | 8 ++++---- | ||
31 | 19 files changed, 37 insertions(+), 32 deletions(-) | ||
32 | |||
33 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
34 | index fe62c6318..344d9398f 100644 | ||
35 | --- a/CMakeLists.txt | ||
36 | +++ b/CMakeLists.txt | ||
37 | @@ -104,7 +104,7 @@ include(cmake/extra_modules.cmake) | ||
38 | add_subdirectory(docs) | ||
39 | add_subdirectory(tools) | ||
40 | add_subdirectory(scripts) | ||
41 | -add_subdirectory(licensing) | ||
42 | +#add_subdirectory(licensing) | ||
43 | |||
44 | # | ||
45 | # CPack | ||
46 | diff --git a/cmake/developer_package/frontends/frontends.cmake b/cmake/developer_package/frontends/frontends.cmake | ||
47 | index 39b23fe65..aa638c077 100644 | ||
48 | --- a/cmake/developer_package/frontends/frontends.cmake | ||
49 | +++ b/cmake/developer_package/frontends/frontends.cmake | ||
50 | @@ -2,7 +2,7 @@ | ||
51 | # SPDX-License-Identifier: Apache-2.0 | ||
52 | # | ||
53 | |||
54 | -set(FRONTEND_INSTALL_INCLUDE "runtime/include/") | ||
55 | +set(FRONTEND_INSTALL_INCLUDE "include/") | ||
56 | set(FRONTEND_NAME_PREFIX "openvino_") | ||
57 | set(FRONTEND_NAME_SUFFIX "_frontend") | ||
58 | |||
59 | diff --git a/cmake/developer_package/packaging.cmake b/cmake/developer_package/packaging.cmake | ||
60 | index cc287ff1f..2daee6611 100644 | ||
61 | --- a/cmake/developer_package/packaging.cmake | ||
62 | +++ b/cmake/developer_package/packaging.cmake | ||
63 | @@ -20,8 +20,8 @@ function(ie_cpack_set_library_dir) | ||
64 | set(IE_CPACK_RUNTIME_PATH runtime/lib/${ARCH_FOLDER}/$<CONFIG> PARENT_SCOPE) | ||
65 | set(IE_CPACK_ARCHIVE_PATH runtime/lib/${ARCH_FOLDER}/$<CONFIG> PARENT_SCOPE) | ||
66 | else() | ||
67 | - set(IE_CPACK_LIBRARY_PATH runtime/lib/${ARCH_FOLDER} PARENT_SCOPE) | ||
68 | - set(IE_CPACK_RUNTIME_PATH runtime/lib/${ARCH_FOLDER} PARENT_SCOPE) | ||
69 | + set(IE_CPACK_LIBRARY_PATH ${CMAKE_INSTALL_LIBDIR} PARENT_SCOPE) | ||
70 | + set(IE_CPACK_RUNTIME_PATH ${CMAKE_INSTALL_BINDIR} PARENT_SCOPE) | ||
71 | set(IE_CPACK_ARCHIVE_PATH runtime/lib/${ARCH_FOLDER} PARENT_SCOPE) | ||
72 | endif() | ||
73 | endfunction() | ||
74 | diff --git a/cmake/developer_package/plugins/plugins.cmake b/cmake/developer_package/plugins/plugins.cmake | ||
75 | index a630d6c35..779c43631 100644 | ||
76 | --- a/cmake/developer_package/plugins/plugins.cmake | ||
77 | +++ b/cmake/developer_package/plugins/plugins.cmake | ||
78 | @@ -138,7 +138,7 @@ function(ie_add_plugin) | ||
79 | |||
80 | if(BUILD_SHARED_LIBS) | ||
81 | install(TARGETS ${IE_PLUGIN_NAME} | ||
82 | - LIBRARY DESTINATION ${IE_CPACK_RUNTIME_PATH} | ||
83 | + LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} | ||
84 | COMPONENT ${install_component}) | ||
85 | else() | ||
86 | ov_install_static_lib(${IE_PLUGIN_NAME} ${install_component}) | ||
87 | diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt | ||
88 | index 86b0e8652..4f31d3cc4 100644 | ||
89 | --- a/docs/CMakeLists.txt | ||
90 | +++ b/docs/CMakeLists.txt | ||
91 | @@ -36,9 +36,10 @@ if(NOT ENABLE_DOCKER) | ||
92 | foreach(target openvino_template_plugin template_extension openvino_template_extension) | ||
93 | if(TARGET ${target}) | ||
94 | install(TARGETS ${target} | ||
95 | - LIBRARY DESTINATION ${IE_CPACK_RUNTIME_PATH} | ||
96 | + LIBRARY DESTINATION ${IE_CPACK_RUNTIME_PATH} | ||
97 | COMPONENT tests | ||
98 | EXCLUDE_FROM_ALL) | ||
99 | + install(TARGETS ${target} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
100 | endif() | ||
101 | endforeach() | ||
102 | endif() | ||
103 | diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt | ||
104 | index 8101b5e32..6abe8c20c 100644 | ||
105 | --- a/samples/CMakeLists.txt | ||
106 | +++ b/samples/CMakeLists.txt | ||
107 | @@ -9,7 +9,7 @@ add_subdirectory(c) | ||
108 | if(TARGET format_reader) | ||
109 | install(TARGETS format_reader | ||
110 | RUNTIME DESTINATION ${IE_CPACK_RUNTIME_PATH} COMPONENT tests EXCLUDE_FROM_ALL | ||
111 | - LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT tests EXCLUDE_FROM_ALL) | ||
112 | + LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT tests) | ||
113 | endif() | ||
114 | |||
115 | openvino_developer_export_targets(COMPONENT openvino_common TARGETS format_reader ie_samples_utils) | ||
116 | diff --git a/samples/c/common/opencv_c_wrapper/CMakeLists.txt b/samples/c/common/opencv_c_wrapper/CMakeLists.txt | ||
117 | index a8e6e5172..aa3d2fe0e 100644 | ||
118 | --- a/samples/c/common/opencv_c_wrapper/CMakeLists.txt | ||
119 | +++ b/samples/c/common/opencv_c_wrapper/CMakeLists.txt | ||
120 | @@ -34,3 +34,5 @@ install( | ||
121 | RUNTIME DESTINATION samples_bin/ COMPONENT samples_bin EXCLUDE_FROM_ALL | ||
122 | LIBRARY DESTINATION samples_bin/ COMPONENT samples_bin EXCLUDE_FROM_ALL | ||
123 | ) | ||
124 | + | ||
125 | +install(TARGETS ${TARGET_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
126 | diff --git a/samples/cpp/CMakeLists.txt b/samples/cpp/CMakeLists.txt | ||
127 | index 3433dee0e..0c0fa0723 100644 | ||
128 | --- a/samples/cpp/CMakeLists.txt | ||
129 | +++ b/samples/cpp/CMakeLists.txt | ||
130 | @@ -222,6 +222,8 @@ macro(ie_add_sample) | ||
131 | EXCLUDE_FROM_ALL | ||
132 | ) | ||
133 | |||
134 | + install(TARGETS ${IE_SAMPLE_NAME} DESTINATION bin) | ||
135 | + | ||
136 | # create global target with all samples / demo apps | ||
137 | if(NOT TARGET ie_samples) | ||
138 | add_custom_target(ie_samples ALL) | ||
139 | diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt | ||
140 | index 9ad26ba95..0853e2370 100644 | ||
141 | --- a/scripts/CMakeLists.txt | ||
142 | +++ b/scripts/CMakeLists.txt | ||
143 | @@ -28,7 +28,7 @@ ie_shellcheck_process(DIRECTORY "${OpenVINO_SOURCE_DIR}" | ||
144 | |||
145 | # install setupvars | ||
146 | |||
147 | -ie_cpack_add_component(setupvars REQUIRED) | ||
148 | +#ie_cpack_add_component(setupvars REQUIRED) | ||
149 | |||
150 | if(UNIX) | ||
151 | set(_setupvars_file setupvars/setupvars.sh) | ||
152 | @@ -43,13 +43,13 @@ elseif(WIN32) | ||
153 | file(WRITE "${_setupvars_file}" "${_setupvars_content}") | ||
154 | endif() | ||
155 | endif() | ||
156 | -install(PROGRAMS "${_setupvars_file}" | ||
157 | - DESTINATION . | ||
158 | - COMPONENT setupvars) | ||
159 | +#install(PROGRAMS "${_setupvars_file}" | ||
160 | +# DESTINATION . | ||
161 | +# COMPONENT setupvars) | ||
162 | |||
163 | # install install_dependencies | ||
164 | |||
165 | -if(LINUX) | ||
166 | +if (FALSE) | ||
167 | ie_cpack_add_component(install_dependencies REQUIRED) | ||
168 | install(DIRECTORY install_dependencies/ | ||
169 | DESTINATION install_dependencies | ||
170 | diff --git a/src/bindings/c/src/CMakeLists.txt b/src/bindings/c/src/CMakeLists.txt | ||
171 | index 9200d0bda..b3636e071 100644 | ||
172 | --- a/src/bindings/c/src/CMakeLists.txt | ||
173 | +++ b/src/bindings/c/src/CMakeLists.txt | ||
174 | @@ -43,8 +43,8 @@ install(TARGETS ${TARGET_NAME} EXPORT OpenVINOTargets | ||
175 | RUNTIME DESTINATION ${IE_CPACK_RUNTIME_PATH} COMPONENT core_c | ||
176 | ARCHIVE DESTINATION ${IE_CPACK_ARCHIVE_PATH} COMPONENT core_c | ||
177 | LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT core_c | ||
178 | - INCLUDES DESTINATION runtime/include/ie) | ||
179 | + INCLUDES DESTINATION include/ie) | ||
180 | |||
181 | install(DIRECTORY ${InferenceEngine_C_API_SOURCE_DIR}/include/ | ||
182 | - DESTINATION runtime/include/ie | ||
183 | + DESTINATION include/ie | ||
184 | COMPONENT core_c_dev) | ||
185 | diff --git a/src/cmake/openvino.cmake b/src/cmake/openvino.cmake | ||
186 | index c46548468..3d65a20a5 100644 | ||
187 | --- a/src/cmake/openvino.cmake | ||
188 | +++ b/src/cmake/openvino.cmake | ||
189 | @@ -59,8 +59,8 @@ install(TARGETS ${TARGET_NAME} EXPORT OpenVINOTargets | ||
190 | RUNTIME DESTINATION ${IE_CPACK_RUNTIME_PATH} COMPONENT core | ||
191 | ARCHIVE DESTINATION ${IE_CPACK_ARCHIVE_PATH} COMPONENT core | ||
192 | LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT core | ||
193 | - INCLUDES DESTINATION runtime/include | ||
194 | - runtime/include/ie) | ||
195 | + INCLUDES DESTINATION include | ||
196 | + include/ie) | ||
197 | |||
198 | # --------------- OpenVINO runtime library dev ------------------------------ | ||
199 | add_library(${TARGET_NAME}_dev INTERFACE) | ||
200 | @@ -96,7 +96,7 @@ ie_cpack_add_component(core_dev REQUIRED DEPENDS core ${core_dev_components}) | ||
201 | |||
202 | if(BUILD_SHARED_LIBS) | ||
203 | install(FILES $<TARGET_FILE_DIR:${TARGET_NAME}>/plugins.xml | ||
204 | - DESTINATION ${IE_CPACK_RUNTIME_PATH} | ||
205 | + DESTINATION ${IE_CPACK_LIBRARY_PATH} | ||
206 | COMPONENT core) | ||
207 | |||
208 | # for InferenceEngineUnitTest | ||
209 | @@ -115,7 +115,7 @@ endif() | ||
210 | install(EXPORT OpenVINOTargets | ||
211 | FILE OpenVINOTargets.cmake | ||
212 | NAMESPACE openvino:: | ||
213 | - DESTINATION runtime/cmake | ||
214 | + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/OpenVINO | ||
215 | COMPONENT core_dev) | ||
216 | |||
217 | set(OV_CORE_DIR "${CMAKE_BINARY_DIR}/src/core") | ||
218 | @@ -161,10 +161,10 @@ configure_file("${OpenVINO_SOURCE_DIR}/cmake/templates/OpenVINOConfig-version.cm | ||
219 | install(FILES "${CMAKE_BINARY_DIR}/share/InferenceEngineConfig.cmake" | ||
220 | "${CMAKE_BINARY_DIR}/InferenceEngineConfig-version.cmake" | ||
221 | "${OpenVINO_SOURCE_DIR}/src/cmake/ie_parallel.cmake" | ||
222 | - DESTINATION runtime/cmake | ||
223 | + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/InferenceEngine | ||
224 | COMPONENT core_dev) | ||
225 | |||
226 | install(FILES "${CMAKE_BINARY_DIR}/share/OpenVINOConfig.cmake" | ||
227 | "${CMAKE_BINARY_DIR}/OpenVINOConfig-version.cmake" | ||
228 | - DESTINATION runtime/cmake | ||
229 | + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/OpenVINO | ||
230 | COMPONENT core_dev) | ||
231 | diff --git a/src/common/preprocessing/CMakeLists.txt b/src/common/preprocessing/CMakeLists.txt | ||
232 | index e41e286c9..11aaffca6 100644 | ||
233 | --- a/src/common/preprocessing/CMakeLists.txt | ||
234 | +++ b/src/common/preprocessing/CMakeLists.txt | ||
235 | @@ -202,7 +202,7 @@ openvino_developer_export_targets(COMPONENT core TARGETS ${TARGET_NAME}) | ||
236 | |||
237 | if(BUILD_SHARED_LIBS) | ||
238 | install(TARGETS ${TARGET_NAME} | ||
239 | - LIBRARY DESTINATION ${IE_CPACK_RUNTIME_PATH} COMPONENT core) | ||
240 | + LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT core) | ||
241 | else() | ||
242 | ov_install_static_lib(${TARGET_NAME} core) | ||
243 | endif() | ||
244 | diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt | ||
245 | index cc64b94ca..5f0dcf20c 100644 | ||
246 | --- a/src/core/CMakeLists.txt | ||
247 | +++ b/src/core/CMakeLists.txt | ||
248 | @@ -114,7 +114,7 @@ target_include_directories(ngraph INTERFACE $<BUILD_INTERFACE:${OV_CORE_INCLUDE_ | ||
249 | #----------------------------------------------------------------------------------------------- | ||
250 | |||
251 | install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ | ||
252 | - DESTINATION "runtime/include" | ||
253 | + DESTINATION "include" | ||
254 | COMPONENT core_dev | ||
255 | FILES_MATCHING | ||
256 | PATTERN "*.hpp" | ||
257 | @@ -130,5 +130,5 @@ write_basic_package_version_file(${CMAKE_BINARY_DIR}/ngraphConfigVersion.cmake | ||
258 | |||
259 | install(FILES ${CMAKE_BINARY_DIR}/ngraphConfig.cmake | ||
260 | ${CMAKE_BINARY_DIR}/ngraphConfigVersion.cmake | ||
261 | - DESTINATION "runtime/cmake" | ||
262 | + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ngraph | ||
263 | COMPONENT core_dev) | ||
264 | diff --git a/src/inference/CMakeLists.txt b/src/inference/CMakeLists.txt | ||
265 | index ddd2fdcbc..f4ad1e623 100644 | ||
266 | --- a/src/inference/CMakeLists.txt | ||
267 | +++ b/src/inference/CMakeLists.txt | ||
268 | @@ -204,7 +204,7 @@ set_target_properties(${TARGET_NAME}_obj | ||
269 | |||
270 | openvino_developer_export_targets(COMPONENT core_legacy TARGETS ${TARGET_NAME}_plugin_api) | ||
271 | |||
272 | -install(DIRECTORY "${PUBLIC_HEADERS_DIR}/" DESTINATION runtime/include | ||
273 | +install(DIRECTORY "${PUBLIC_HEADERS_DIR}/" DESTINATION include | ||
274 | COMPONENT core_dev) | ||
275 | |||
276 | # Install static libraries for case BUILD_SHARED_LIBS=OFF | ||
277 | diff --git a/src/plugins/intel_gpu/src/kernel_selector/CMakeLists.txt b/src/plugins/intel_gpu/src/kernel_selector/CMakeLists.txt | ||
278 | index 3993bd973..99287bad5 100644 | ||
279 | --- a/src/plugins/intel_gpu/src/kernel_selector/CMakeLists.txt | ||
280 | +++ b/src/plugins/intel_gpu/src/kernel_selector/CMakeLists.txt | ||
281 | @@ -94,7 +94,7 @@ add_custom_command( | ||
282 | COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/core/cache/cache.json ${TUNING_CACHE_PATH}/cache.json) | ||
283 | |||
284 | install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/core/cache/cache.json | ||
285 | - DESTINATION ${IE_CPACK_RUNTIME_PATH} | ||
286 | + DESTINATION ${IE_CPACK_LIBRARY_PATH} | ||
287 | COMPONENT gpu) | ||
288 | |||
289 | ov_install_static_lib(${TARGET_NAME} gpu) | ||
290 | diff --git a/src/plugins/intel_myriad/myriad_dependencies.cmake b/src/plugins/intel_myriad/myriad_dependencies.cmake | ||
291 | index 5bba4235f..69c1470a7 100644 | ||
292 | --- a/src/plugins/intel_myriad/myriad_dependencies.cmake | ||
293 | +++ b/src/plugins/intel_myriad/myriad_dependencies.cmake | ||
294 | @@ -80,7 +80,7 @@ foreach(firmware_name IN LISTS VPU_SUPPORTED_FIRMWARES) | ||
295 | VERBATIM) | ||
296 | |||
297 | install(FILES ${${var_name}} | ||
298 | - DESTINATION ${IE_CPACK_RUNTIME_PATH} | ||
299 | + DESTINATION ${IE_CPACK_LIBRARY_PATH} | ||
300 | COMPONENT myriad) | ||
301 | |||
302 | if(ENABLE_INTEL_MYRIAD AND ENABLE_BEH_TESTS) | ||
303 | diff --git a/src/plugins/intel_myriad/myriad_plugin/CMakeLists.txt b/src/plugins/intel_myriad/myriad_plugin/CMakeLists.txt | ||
304 | index 12a2f15e4..893146294 100644 | ||
305 | --- a/src/plugins/intel_myriad/myriad_plugin/CMakeLists.txt | ||
306 | +++ b/src/plugins/intel_myriad/myriad_plugin/CMakeLists.txt | ||
307 | @@ -56,6 +56,6 @@ set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_REL | ||
308 | # install | ||
309 | if (LINUX) | ||
310 | install(FILES ${OpenVINO_SOURCE_DIR}/src/plugins/intel_myriad/third_party/mvnc/src/97-myriad-usbboot.rules | ||
311 | - DESTINATION runtime/3rdparty | ||
312 | + DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/udev/rules.d | ||
313 | COMPONENT myriad) | ||
314 | endif() | ||
315 | diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt | ||
316 | index c8638f7fd..ba30641c5 100644 | ||
317 | --- a/tools/CMakeLists.txt | ||
318 | +++ b/tools/CMakeLists.txt | ||
319 | @@ -20,7 +20,7 @@ endif() | ||
320 | ie_cpack_add_component(deployment_manager REQUIRED) | ||
321 | |||
322 | install(DIRECTORY deployment_manager | ||
323 | - DESTINATION tools | ||
324 | + DESTINATION share/openvino/tools | ||
325 | COMPONENT deployment_manager | ||
326 | USE_SOURCE_PERMISSIONS) | ||
327 | |||
328 | diff --git a/tools/compile_tool/CMakeLists.txt b/tools/compile_tool/CMakeLists.txt | ||
329 | index d19eb5cc1..9fc929cbb 100644 | ||
330 | --- a/tools/compile_tool/CMakeLists.txt | ||
331 | +++ b/tools/compile_tool/CMakeLists.txt | ||
332 | @@ -38,9 +38,9 @@ add_cpplint_target(${TARGET_NAME}_cpplint FOR_TARGETS ${TARGET_NAME}) | ||
333 | ie_cpack_add_component(core_tools DEPENDS core) | ||
334 | |||
335 | install(TARGETS compile_tool | ||
336 | - RUNTIME DESTINATION tools/compile_tool | ||
337 | + RUNTIME DESTINATION bin | ||
338 | COMPONENT core_tools) | ||
339 | |||
340 | -install(FILES README.md | ||
341 | - DESTINATION tools/compile_tool | ||
342 | - COMPONENT core_tools) | ||
343 | +#install(FILES README.md | ||
344 | +# DESTINATION tools/compile_tool | ||
345 | +# COMPONENT core_tools) | ||
346 | -- | ||
347 | 2.35.1 | ||
348 | |||
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/open-model-zoo/0001-use-oe-gflags.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/open-model-zoo/0001-use-oe-gflags.patch deleted file mode 100644 index 3db0a31e..00000000 --- a/dynamic-layers/openembedded-layer/recipes-support/opencv/open-model-zoo/0001-use-oe-gflags.patch +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | From e071d6a6323f04dc7e6e40047199e509536d7f6e Mon Sep 17 00:00:00 2001 | ||
2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
3 | Date: Mon, 30 Aug 2021 17:54:17 +0800 | ||
4 | Subject: [PATCH] demos: use gflags from meta-oe | ||
5 | |||
6 | Upstream-Status: Inappropriate | ||
7 | |||
8 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
9 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
10 | |||
11 | --- | ||
12 | demos/CMakeLists.txt | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/demos/CMakeLists.txt b/demos/CMakeLists.txt | ||
16 | index 98de0db6c..077d43fb4 100644 | ||
17 | --- a/demos/CMakeLists.txt | ||
18 | +++ b/demos/CMakeLists.txt | ||
19 | @@ -140,7 +140,7 @@ endmacro() | ||
20 | find_package(OpenCV REQUIRED COMPONENTS core highgui videoio imgproc imgcodecs gapi) | ||
21 | find_package(OpenVINO REQUIRED COMPONENTS Runtime) | ||
22 | |||
23 | -add_subdirectory(thirdparty/gflags) | ||
24 | +#add_subdirectory(thirdparty/gflags) | ||
25 | add_subdirectory(common/cpp) | ||
26 | add_subdirectory(common/cpp_gapi) | ||
27 | add_subdirectory(multi_channel_common/cpp) | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/open-model-zoo_2022.1.bb b/dynamic-layers/openembedded-layer/recipes-support/opencv/open-model-zoo_2022.1.bb deleted file mode 100644 index d21b2968..00000000 --- a/dynamic-layers/openembedded-layer/recipes-support/opencv/open-model-zoo_2022.1.bb +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | SUMMARY = "OpenVINO(TM) Toolkit - Open Model Zoo repository" | ||
2 | HOMEPAGE = "https://github.com/opencv/open_model_zoo" | ||
3 | DESCRIPTION = "This repository includes optimized deep learning \ | ||
4 | models and a set of demos to expedite development of high-performance \ | ||
5 | deep learning inference applications." | ||
6 | |||
7 | SRC_URI = "git://github.com/opencv/open_model_zoo.git;protocol=https;branch=releases/2022/1 \ | ||
8 | file://0001-use-oe-gflags.patch \ | ||
9 | " | ||
10 | |||
11 | SRCREV = "cf9003a95ddb742aabea341aa1573c3fa25ebbe1" | ||
12 | |||
13 | LICENSE = "Apache-2.0" | ||
14 | LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327 \ | ||
15 | " | ||
16 | |||
17 | inherit cmake | ||
18 | |||
19 | S = "${WORKDIR}/git" | ||
20 | OECMAKE_SOURCEPATH = "${S}/demos" | ||
21 | |||
22 | DEPENDS += "openvino-inference-engine opencv gflags" | ||
23 | |||
24 | RDEPENDS:${PN} += " \ | ||
25 | python3-decorator \ | ||
26 | python3-defusedxml \ | ||
27 | python3-networkx \ | ||
28 | python3-protobuf \ | ||
29 | python3-requests \ | ||
30 | python3-pyyaml \ | ||
31 | python3-numpy \ | ||
32 | bash \ | ||
33 | " | ||
34 | |||
35 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
36 | COMPATIBLE_HOST:libc-musl = "null" | ||
37 | |||
38 | EXTRA_OECMAKE += " \ | ||
39 | -DENABLE_SAMPLES=ON \ | ||
40 | " | ||
41 | |||
42 | do_install(){ | ||
43 | install -d ${D}${libdir} | ||
44 | install -d ${D}${bindir} | ||
45 | install -d ${D}${datadir}/openvino/open-model-zoo/tools | ||
46 | install -d ${D}${datadir}/openvino/open-model-zoo/demos | ||
47 | cp -rf ${WORKDIR}/build/intel64/Release/*.a ${D}${libdir} | ||
48 | cp -rf ${WORKDIR}/build/intel64/Release/*_demo* ${D}${bindir} | ||
49 | cp -rf ${WORKDIR}/git/models ${D}${datadir}/openvino/open-model-zoo | ||
50 | cp -rf ${WORKDIR}/git/demos ${D}${datadir}/openvino/open-model-zoo | ||
51 | cp -rf ${WORKDIR}/git/tools/model_tools ${D}${datadir}/openvino/open-model-zoo/tools | ||
52 | } | ||
53 | |||
54 | FILES:${PN} += "${datadir}/openvino" | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2022.1.bb b/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2022.1.bb deleted file mode 100644 index 5814380d..00000000 --- a/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2022.1.bb +++ /dev/null | |||
@@ -1,141 +0,0 @@ | |||
1 | SUMMARY = "OpenVINO(TM) Toolkit - Deep Learning Deployment Toolkit" | ||
2 | HOMEPAGE = "https://github.com/opencv/dldt" | ||
3 | DESCRIPTION = "This toolkit allows developers to deploy pre-trained \ | ||
4 | deep learning models through a high-level C++ Inference Engine API \ | ||
5 | integrated with application logic." | ||
6 | |||
7 | SRC_URI = "git://github.com/openvinotoolkit/openvino.git;protocol=https;branch=releases/2022/1;lfs=0 \ | ||
8 | https://download.01.org/opencv/master/openvinotoolkit/thirdparty/unified/VPU/usb-ma2x8x/firmware_usb-ma2x8x_1875.zip;name=usb_ma2x8x \ | ||
9 | https://download.01.org/opencv/master/openvinotoolkit/thirdparty/unified/VPU/pcie-ma2x8x/firmware_pcie-ma2x8x_1875.zip;name=pcie_ma2x8x \ | ||
10 | git://github.com/openvinotoolkit/oneDNN.git;protocol=https;destsuffix=git/src/plugins/intel_cpu/thirdparty/mkl-dnn;name=mkl;nobranch=1 \ | ||
11 | git://github.com/oneapi-src/oneDNN.git;protocol=https;destsuffix=git/src/plugins/intel_gpu/thirdparty/onednn_gpu;name=onednn;branch=master \ | ||
12 | git://github.com/herumi/xbyak.git;protocol=https;destsuffix=git/thirdparty/xbyak;name=xbyak;branch=master \ | ||
13 | git://github.com/pybind/pybind11.git;protocol=https;destsuffix=git/src/bindings/python/thirdparty/pybind11;name=pybind11;branch=master \ | ||
14 | git://github.com/protocolbuffers/protobuf.git;protocol=https;destsuffix=git/thirdparty/protobuf/protobuf;name=protobuf;branch=3.18.x \ | ||
15 | git://github.com/nlohmann/json.git;protocol=https;destsuffix=git/thirdparty/json/nlohmann_json;name=json;branch=master \ | ||
16 | git://github.com/pboettch/json-schema-validator.git;protocol=https;destsuffix=git/thirdparty/json/nlohmann_json_schema_validator;name=jsonschema;branch=main \ | ||
17 | git://github.com/openvinotoolkit/open_model_zoo.git;protocol=https;destsuffix=git/thirdparty/open_model_zoo;name=omz;branch=releases/2022/1 \ | ||
18 | file://0001-inference-engine-use-system-installed-packages.patch \ | ||
19 | file://0002-inference-engine-installation-fixes.patch \ | ||
20 | " | ||
21 | |||
22 | SRCREV = "cdb9bec7210f8c24fde3e416c7ada820faaaa23e" | ||
23 | SRCREV_mkl = "82ca2f931c1d588b67d154d873136d4af1ffb3a8" | ||
24 | SRCREV_onednn = "9e2bf22e51726ad36ddae90c7caf2898d124baa6" | ||
25 | SRCREV_xbyak = "8d1e41b650890080fb77548372b6236bbd4079f9" | ||
26 | SRCREV_pybind11 = "d71ba0cb73616c493d35699a8a9283aa64ef0f6b" | ||
27 | SRCREV_protobuf = "6c6b0778b70f35f93c2f0dee30e5d12ad2a83eea" | ||
28 | SRCREV_json = "fec56a1a16c6e1c1b1f4e116a20e79398282626c" | ||
29 | SRCREV_jsonschema = "b1ef8628326cf0b53612f12784fd245e5e4382f1" | ||
30 | SRCREV_omz = "cf9003a95ddb742aabea341aa1573c3fa25ebbe1" | ||
31 | |||
32 | SRC_URI[usb_ma2x8x.sha256sum] = "e65fcc1c6b0f3e9d814e53022c212ec0a2b83197a9df38badb298fb85ccf3acf" | ||
33 | SRC_URI[pcie_ma2x8x.sha256sum] = "b11368fec2036d96fb703d2a40b171184fefe89f27e74a988ef1ca34260a2bc5" | ||
34 | |||
35 | LICENSE = "Apache-2.0 & MIT & BSD-3-Clause" | ||
36 | LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327 \ | ||
37 | file://thirdparty/xbyak/COPYRIGHT;md5=03532861dad9003cc2c17f14fc7a4efa \ | ||
38 | file://thirdparty/cnpy/LICENSE;md5=689f10b06d1ca2d4b1057e67b16cd580 \ | ||
39 | file://thirdparty/protobuf/protobuf/LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b \ | ||
40 | file://thirdparty/json/nlohmann_json/LICENSE.MIT;md5=441793d25a658d58d79a1f87516a6ad1 \ | ||
41 | file://thirdparty/json/nlohmann_json_schema_validator/LICENSE;md5=c441d022da1b1663c70181a32225d006 \ | ||
42 | file://thirdparty/open_model_zoo/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327 \ | ||
43 | file://src/plugins/intel_cpu/thirdparty/mkl-dnn/LICENSE;md5=b48e3de3bfd47c27882a0d85b20823f5 \ | ||
44 | file://src/plugins/intel_gpu/thirdparty/onednn_gpu/LICENSE;md5=b48e3de3bfd47c27882a0d85b20823f5 \ | ||
45 | file://src/bindings/python/thirdparty/pybind11/LICENSE;md5=774f65abd8a7fe3124be2cdf766cd06f \ | ||
46 | " | ||
47 | |||
48 | inherit cmake python3native | ||
49 | |||
50 | S = "${WORKDIR}/git" | ||
51 | EXTRA_OECMAKE += " \ | ||
52 | -DENABLE_OPENCV=OFF \ | ||
53 | -DOpenCV_DIR=${STAGING_LIBDIR}/cmake \ | ||
54 | -DENABLE_PLUGIN_RPATH=0 \ | ||
55 | -DENABLE_INTEL_GNA=OFF \ | ||
56 | -DPYTHON_EXECUTABLE=${PYTHON} \ | ||
57 | -DCMAKE_BUILD_TYPE=RelWithDebInfo \ | ||
58 | -DTHREADING=TBB -DTBB_DIR="${STAGING_LIBDIR}/cmake/TBB" \ | ||
59 | -DENABLE_SAMPLES=ON \ | ||
60 | -DTREAT_WARNING_AS_ERROR=FALSE \ | ||
61 | -DENABLE_DATA=FALSE \ | ||
62 | -DENABLE_SYSTEM_PUGIXML=TRUE \ | ||
63 | -DENABLE_SYSTEM_PROTOBUF=TRUE \ | ||
64 | -DProtobuf_LIBRARIES=protobuf \ | ||
65 | -DProtobuf_LITE_LIBRARIES=protobuf-lite \ | ||
66 | -DProtobuf_INCLUDE_DIR=${STAGING_INCDIR} \ | ||
67 | -DSYSTEM_PROTOC=${STAGING_BINDIR_NATIVE}/protoc \ | ||
68 | -DENABLE_OV_ONNX_FRONTEND=FALSE \ | ||
69 | -DUSE_BUILD_TYPE_SUBFOLDER=OFF \ | ||
70 | " | ||
71 | |||
72 | DEPENDS += "libusb1 \ | ||
73 | ade \ | ||
74 | opencv \ | ||
75 | pugixml \ | ||
76 | protobuf \ | ||
77 | protobuf-native \ | ||
78 | tbb \ | ||
79 | zlib \ | ||
80 | " | ||
81 | |||
82 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
83 | COMPATIBLE_HOST:libc-musl = "null" | ||
84 | |||
85 | #Disable opencl temporarily. intel-compute-runtime depends on | ||
86 | #intel-graphics-compiler and vc-intrinsics and these two recipes fail to | ||
87 | #compile with LLVM13. Enable it after upstream has fixed it. | ||
88 | #PACKAGECONFIG ?= "vpu opencl" | ||
89 | PACKAGECONFIG ?= "vpu" | ||
90 | PACKAGECONFIG[opencl] = "-DENABLE_INTEL_GPU=TRUE -DOpenCL_INCLUDE_DIR=${STAGING_INCDIR} -DOpenCL_LIBRARY=${STAGING_LIBDIR}/libOpenCL.so, -DENABLE_INTEL_GPU=FALSE, ocl-icd opencl-headers opencl-clhpp libva," | ||
91 | PACKAGECONFIG[python3] = "-DENABLE_PYTHON=ON -DPYTHON_LIBRARY=${PYTHON_LIBRARY} -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIR}, -DENABLE_PYTHON=OFF, python3-cython-native patchelf-native, python3 python3-numpy python3-opencv python3-progress python3-cython" | ||
92 | PACKAGECONFIG[vpu] = "-DENABLE_INTEL_MYRIAD=ON -DVPU_FIRMWARE_USB-MA2X8X_FILE=../mvnc/usb-ma2x8x.mvcmd -DVPU_FIRMWARE_PCIE-MA2X8X_FILE=../mvnc/pcie-ma2x8x.mvcmd,-DENABLE_INTEL_MYRIAD=OFF,,${PN}-vpu-firmware" | ||
93 | PACKAGECONFIG[verbose] = "-DVERBOSE_BUILD=1,-DVERBOSE_BUILD=0" | ||
94 | |||
95 | do_install:append() { | ||
96 | if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then | ||
97 | install -d ${D}${datadir}/openvino | ||
98 | mv ${D}/usr/samples/python ${D}${datadir}/openvino/ | ||
99 | |||
100 | install -d ${D}${PYTHON_SITEPACKAGES_DIR} | ||
101 | mv ${D}${prefix}/python/${PYTHON_DIR}/openvino ${D}${PYTHON_SITEPACKAGES_DIR}/ | ||
102 | mv ${D}${prefix}/python/${PYTHON_DIR}/ngraph ${D}${PYTHON_SITEPACKAGES_DIR}/ | ||
103 | |||
104 | rm -rf ${D}${prefix}/python | ||
105 | fi | ||
106 | |||
107 | rm -rf ${D}${prefix}/deployment_tools | ||
108 | |||
109 | # Remove the samples source directory. We install the built samples. | ||
110 | rm -rf ${D}/usr/samples | ||
111 | } | ||
112 | |||
113 | # Otherwise e.g. ros-openvino-toolkit-dynamic-vino-sample when using dldt-inference-engine uses dldt-inference-engine WORKDIR | ||
114 | # instead of RSS | ||
115 | SSTATE_SCAN_FILES:append = " *.cmake" | ||
116 | |||
117 | FILES:${PN}-dev = "${includedir} \ | ||
118 | ${libdir}/cmake \ | ||
119 | " | ||
120 | |||
121 | FILES:${PN} += "${libdir}/lib*${SOLIBSDEV} \ | ||
122 | ${datadir}/openvino \ | ||
123 | ${libdir}/custom_kernels \ | ||
124 | ${libdir}/plugins.xml \ | ||
125 | ${libdir}/cache.json \ | ||
126 | " | ||
127 | |||
128 | # Move inference engine samples into a separate package | ||
129 | PACKAGES =+ "${PN}-samples ${PN}-vpu-firmware" | ||
130 | |||
131 | FILES:${PN}-samples = "${datadir}/openvino \ | ||
132 | ${bindir} \ | ||
133 | " | ||
134 | FILES:${PN}-vpu-firmware += "${libdir}/*.mvcmd" | ||
135 | |||
136 | # Package for inference engine python API | ||
137 | PACKAGES =+ "${PN}-${PYTHON_PN}" | ||
138 | |||
139 | FILES:${PN}-${PYTHON_PN} = "${PYTHON_SITEPACKAGES_DIR}" | ||
140 | |||
141 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))" | ||
diff --git a/lib/oeqa/runtime/cases/dldt_inference_engine.py b/lib/oeqa/runtime/cases/dldt_inference_engine.py deleted file mode 100644 index fb35d52f..00000000 --- a/lib/oeqa/runtime/cases/dldt_inference_engine.py +++ /dev/null | |||
@@ -1,109 +0,0 @@ | |||
1 | from oeqa.runtime.case import OERuntimeTestCase | ||
2 | from oeqa.runtime.decorator.package import OEHasPackage | ||
3 | from oeqa.core.decorator.depends import OETestDepends | ||
4 | from oeqa.runtime.miutils.targets.oeqatarget import OEQATarget | ||
5 | from oeqa.runtime.miutils.tests.squeezenet_model_download_test import SqueezenetModelDownloadTest | ||
6 | from oeqa.runtime.miutils.tests.dldt_model_optimizer_test import DldtModelOptimizerTest | ||
7 | from oeqa.runtime.miutils.tests.dldt_inference_engine_test import DldtInferenceEngineTest | ||
8 | from oeqa.runtime.miutils.dldtutils import get_testdata_config | ||
9 | |||
10 | class DldtInferenceEngine(OERuntimeTestCase): | ||
11 | |||
12 | @classmethod | ||
13 | def setUpClass(cls): | ||
14 | cls.sqn_download = SqueezenetModelDownloadTest(OEQATarget(cls.tc.target), '/tmp/ie/md') | ||
15 | cls.sqn_download.setup() | ||
16 | cls.dldt_mo = DldtModelOptimizerTest(OEQATarget(cls.tc.target), '/tmp/ie/ir') | ||
17 | cls.dldt_mo.setup() | ||
18 | cls.dldt_ie = DldtInferenceEngineTest(OEQATarget(cls.tc.target), '/tmp/ie/inputs') | ||
19 | cls.dldt_ie.setup() | ||
20 | cls.ir_files_dir = cls.dldt_mo.work_dir | ||
21 | |||
22 | @classmethod | ||
23 | def tearDownClass(cls): | ||
24 | cls.dldt_ie.tear_down() | ||
25 | cls.dldt_mo.tear_down() | ||
26 | cls.sqn_download.tear_down() | ||
27 | |||
28 | @OEHasPackage(['dldt-model-optimizer']) | ||
29 | @OEHasPackage(['wget']) | ||
30 | def test_dldt_ie_can_create_ir_and_download_input(self): | ||
31 | proxy_port = get_testdata_config(self.tc.td, 'DLDT_PIP_PROXY') | ||
32 | if not proxy_port: | ||
33 | self.skipTest('Need to configure bitbake configuration (DLDT_PIP_PROXY="proxy.server:port").') | ||
34 | (status, output) = self.sqn_download.test_can_download_squeezenet_model(proxy_port) | ||
35 | self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output)) | ||
36 | (status, output) = self.sqn_download.test_can_download_squeezenet_prototxt(proxy_port) | ||
37 | self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output)) | ||
38 | |||
39 | mo_exe_dir = get_testdata_config(self.tc.td, 'DLDT_MO_EXE_DIR') | ||
40 | if not mo_exe_dir: | ||
41 | self.skipTest('Need to configure bitbake configuration (DLDT_MO_EXE_DIR="directory_to_mo.py").') | ||
42 | mo_files_dir = self.sqn_download.work_dir | ||
43 | (status, output) = self.dldt_mo.test_dldt_mo_can_create_ir(mo_exe_dir, mo_files_dir) | ||
44 | self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output)) | ||
45 | |||
46 | (status, output) = self.dldt_ie.test_can_download_input_file(proxy_port) | ||
47 | self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output)) | ||
48 | |||
49 | @OETestDepends(['dldt_inference_engine.DldtInferenceEngine.test_dldt_ie_can_create_ir_and_download_input']) | ||
50 | @OEHasPackage(['dldt-inference-engine']) | ||
51 | @OEHasPackage(['dldt-inference-engine-samples']) | ||
52 | def test_dldt_ie_classification_with_cpu(self): | ||
53 | (status, output) = self.dldt_ie.test_dldt_ie_classification_with_device('CPU', self.ir_files_dir) | ||
54 | self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output)) | ||
55 | |||
56 | @OETestDepends(['dldt_inference_engine.DldtInferenceEngine.test_dldt_ie_can_create_ir_and_download_input']) | ||
57 | @OEHasPackage(['dldt-inference-engine']) | ||
58 | @OEHasPackage(['dldt-inference-engine-samples']) | ||
59 | @OEHasPackage(['intel-compute-runtime']) | ||
60 | @OEHasPackage(['ocl-icd']) | ||
61 | def test_dldt_ie_classification_with_gpu(self): | ||
62 | (status, output) = self.dldt_ie.test_dldt_ie_classification_with_device('GPU', self.ir_files_dir) | ||
63 | self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output)) | ||
64 | |||
65 | @OETestDepends(['dldt_inference_engine.DldtInferenceEngine.test_dldt_ie_can_create_ir_and_download_input']) | ||
66 | @OEHasPackage(['dldt-inference-engine']) | ||
67 | @OEHasPackage(['dldt-inference-engine-samples']) | ||
68 | @OEHasPackage(['dldt-inference-engine-vpu-firmware']) | ||
69 | def test_dldt_ie_classification_with_myriad(self): | ||
70 | device = 'MYRIAD' | ||
71 | (status, output) = self.dldt_ie.test_check_if_openvino_device_available(device) | ||
72 | if not status: | ||
73 | self.skipTest('OpenVINO %s device not available on target machine(availalbe devices: %s)' % (device, output)) | ||
74 | (status, output) = self.dldt_ie.test_dldt_ie_classification_with_device(device, self.ir_files_dir) | ||
75 | self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output)) | ||
76 | |||
77 | @OETestDepends(['dldt_inference_engine.DldtInferenceEngine.test_dldt_ie_can_create_ir_and_download_input']) | ||
78 | @OEHasPackage(['dldt-inference-engine']) | ||
79 | @OEHasPackage(['dldt-inference-engine-python3']) | ||
80 | @OEHasPackage(['python3-opencv']) | ||
81 | @OEHasPackage(['python3-numpy']) | ||
82 | def test_dldt_ie_classification_python_api_with_cpu(self): | ||
83 | (status, output) = self.dldt_ie.test_dldt_ie_classification_python_api_with_device('CPU', self.ir_files_dir) | ||
84 | self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output)) | ||
85 | |||
86 | @OETestDepends(['dldt_inference_engine.DldtInferenceEngine.test_dldt_ie_can_create_ir_and_download_input']) | ||
87 | @OEHasPackage(['dldt-inference-engine']) | ||
88 | @OEHasPackage(['dldt-inference-engine-python3']) | ||
89 | @OEHasPackage(['intel-compute-runtime']) | ||
90 | @OEHasPackage(['ocl-icd']) | ||
91 | @OEHasPackage(['python3-opencv']) | ||
92 | @OEHasPackage(['python3-numpy']) | ||
93 | def test_dldt_ie_classification_python_api_with_gpu(self): | ||
94 | (status, output) = self.dldt_ie.test_dldt_ie_classification_python_api_with_device('GPU', self.ir_files_dir) | ||
95 | self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output)) | ||
96 | |||
97 | @OETestDepends(['dldt_inference_engine.DldtInferenceEngine.test_dldt_ie_can_create_ir_and_download_input']) | ||
98 | @OEHasPackage(['dldt-inference-engine']) | ||
99 | @OEHasPackage(['dldt-inference-engine-python3']) | ||
100 | @OEHasPackage(['dldt-inference-engine-vpu-firmware']) | ||
101 | @OEHasPackage(['python3-opencv']) | ||
102 | @OEHasPackage(['python3-numpy']) | ||
103 | def test_dldt_ie_classification_python_api_with_myriad(self): | ||
104 | device = 'MYRIAD' | ||
105 | (status, output) = self.dldt_ie.test_check_if_openvino_device_available(device) | ||
106 | if not status: | ||
107 | self.skipTest('OpenVINO %s device not available on target machine(availalbe devices: %s)' % (device, output)) | ||
108 | (status, output) = self.dldt_ie.test_dldt_ie_classification_python_api_with_device(device, self.ir_files_dir) | ||
109 | self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output)) | ||
diff --git a/lib/oeqa/runtime/cases/dldt_model_optimizer.py b/lib/oeqa/runtime/cases/dldt_model_optimizer.py deleted file mode 100644 index 736ea661..00000000 --- a/lib/oeqa/runtime/cases/dldt_model_optimizer.py +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | from oeqa.runtime.case import OERuntimeTestCase | ||
2 | from oeqa.runtime.decorator.package import OEHasPackage | ||
3 | from oeqa.runtime.miutils.targets.oeqatarget import OEQATarget | ||
4 | from oeqa.runtime.miutils.tests.squeezenet_model_download_test import SqueezenetModelDownloadTest | ||
5 | from oeqa.runtime.miutils.tests.dldt_model_optimizer_test import DldtModelOptimizerTest | ||
6 | from oeqa.runtime.miutils.dldtutils import get_testdata_config | ||
7 | |||
8 | class DldtModelOptimizer(OERuntimeTestCase): | ||
9 | |||
10 | @classmethod | ||
11 | def setUpClass(cls): | ||
12 | cls.sqn_download = SqueezenetModelDownloadTest(OEQATarget(cls.tc.target), '/tmp/mo/md') | ||
13 | cls.sqn_download.setup() | ||
14 | cls.dldt_mo = DldtModelOptimizerTest(OEQATarget(cls.tc.target), '/tmp/mo/ir') | ||
15 | cls.dldt_mo.setup() | ||
16 | |||
17 | @classmethod | ||
18 | def tearDownClass(cls): | ||
19 | cls.dldt_mo.tear_down() | ||
20 | cls.sqn_download.tear_down() | ||
21 | |||
22 | @OEHasPackage(['dldt-model-optimizer']) | ||
23 | @OEHasPackage(['wget']) | ||
24 | def test_dldt_mo_can_create_ir(self): | ||
25 | proxy_port = get_testdata_config(self.tc.td, 'DLDT_PIP_PROXY') | ||
26 | if not proxy_port: | ||
27 | self.skipTest('Need to configure bitbake configuration (DLDT_PIP_PROXY="proxy.server:port").') | ||
28 | (status, output) = self.sqn_download.test_can_download_squeezenet_model(proxy_port) | ||
29 | self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output)) | ||
30 | (status, output) = self.sqn_download.test_can_download_squeezenet_prototxt(proxy_port) | ||
31 | self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output)) | ||
32 | |||
33 | mo_exe_dir = get_testdata_config(self.tc.td, 'DLDT_MO_EXE_DIR') | ||
34 | if not mo_exe_dir: | ||
35 | self.skipTest('Need to configure bitbake configuration (DLDT_MO_EXE_DIR="directory_to_mo.py").') | ||
36 | mo_files_dir = self.sqn_download.work_dir | ||
37 | (status, output) = self.dldt_mo.test_dldt_mo_can_create_ir(mo_exe_dir, mo_files_dir) | ||
38 | self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output)) | ||
diff --git a/lib/oeqa/runtime/cases/jhi.py b/lib/oeqa/runtime/cases/jhi.py deleted file mode 100644 index 7a24b6da..00000000 --- a/lib/oeqa/runtime/cases/jhi.py +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | import os | ||
2 | from oeqa.runtime.decorator.package import OEHasPackage | ||
3 | from oeqa.runtime.case import OERuntimeTestCase | ||
4 | from oeqa.core.decorator.depends import OETestDepends | ||
5 | |||
6 | class JhiTest(OERuntimeTestCase): | ||
7 | |||
8 | @classmethod | ||
9 | def tearDownClass(cls): | ||
10 | _, output = cls.tc.target.run('pidof jhid') | ||
11 | cls.tc.target.run('kill %s' % output) | ||
12 | |||
13 | @OEHasPackage(['openssh-sshd']) | ||
14 | @OEHasPackage(['jhi']) | ||
15 | def test_jhi_mei_driver(self): | ||
16 | command = 'ls /dev/mei*' | ||
17 | (status, output) = self.target.run(command) | ||
18 | self.assertEqual(status, 0, msg="Error messages: %s" % output) | ||
19 | |||
20 | @OETestDepends(['jhi.JhiTest.test_jhi_mei_driver']) | ||
21 | def test_jhi_daemon_version(self): | ||
22 | command = 'jhid -v' | ||
23 | (status, output) = self.target.run(command) | ||
24 | self.assertEqual(status, 0, msg="Error messages: %s" % output) | ||
25 | |||
26 | @OETestDepends(['jhi.JhiTest.test_jhi_mei_driver']) | ||
27 | def test_jhi_daemon_can_initialized(self): | ||
28 | command = 'jhid -d' | ||
29 | (status, output) = self.target.run(command) | ||
30 | self.assertEqual(status, 0, msg="Error messages: %s" % output) | ||
31 | |||
32 | @OEHasPackage(['jhi-test']) | ||
33 | @OETestDepends(['jhi.JhiTest.test_jhi_daemon_can_initialized']) | ||
34 | def test_jhi_bist(self): | ||
35 | (status, output) = self.target.run('uname -m') | ||
36 | self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output)) | ||
37 | if 'x86_64' not in output: | ||
38 | self.skipTest("Skipped jhi bist test if not x86_64 machine (current machine: %s)." % output) | ||
39 | command = 'bist' | ||
40 | (status, output) = self.target.run(command) | ||
41 | self.assertEqual(status, 0, msg="Error messages: %s" % output) | ||
diff --git a/lib/oeqa/runtime/cases/parselogs-ignores-intel-core2-32.txt b/lib/oeqa/runtime/cases/parselogs-ignores-intel-core2-32.txt new file mode 100644 index 00000000..84ce8168 --- /dev/null +++ b/lib/oeqa/runtime/cases/parselogs-ignores-intel-core2-32.txt | |||
@@ -0,0 +1,9 @@ | |||
1 | # These should be reviewed to see if they are still needed | ||
2 | ACPI: No _BQC method, cannot determine initial brightness | ||
3 | [Firmware Bug]: ACPI: No _BQC method, cannot determine initial brightness | ||
4 | (EE) Failed to load module "psb" | ||
5 | (EE) Failed to load module "psbdrv" | ||
6 | (EE) open /dev/fb0: No such file or directory | ||
7 | (EE) AIGLX: reverting to software rendering | ||
8 | dmi: Firmware registration failed. | ||
9 | ioremap error for 0x78 | ||
diff --git a/lib/oeqa/runtime/cases/parselogs-ignores-intel-corei7-64.txt b/lib/oeqa/runtime/cases/parselogs-ignores-intel-corei7-64.txt new file mode 100644 index 00000000..5c9b4bc7 --- /dev/null +++ b/lib/oeqa/runtime/cases/parselogs-ignores-intel-corei7-64.txt | |||
@@ -0,0 +1,14 @@ | |||
1 | # These should be reviewed to see if they are still needed | ||
2 | can't set Max Payload Size to 256 | ||
3 | intel_punit_ipc: can't request region for resource | ||
4 | [drm] parse error at position 4 in video mode 'efifb' | ||
5 | ACPI Error: Could not enable RealTimeClock event | ||
6 | ACPI Warning: Could not enable fixed event - RealTimeClock | ||
7 | hci_intel INT33E1:00: Unable to retrieve gpio | ||
8 | hci_intel: probe of INT33E1:00 failed | ||
9 | can't derive routing for PCI INT A | ||
10 | failed to read out thermal zone | ||
11 | Bluetooth: hci0: Setting Intel event mask failed | ||
12 | ttyS2 - failed to request DMA | ||
13 | Bluetooth: hci0: Failed to send firmware data (-38) | ||
14 | atkbd serio0: Failed to enable keyboard on isa0060/serio0 | ||
diff --git a/lib/oeqa/runtime/files/dldt-inference-engine/classification_sample.py b/lib/oeqa/runtime/files/dldt-inference-engine/classification_sample.py deleted file mode 100644 index 1906e9fe..00000000 --- a/lib/oeqa/runtime/files/dldt-inference-engine/classification_sample.py +++ /dev/null | |||
@@ -1,135 +0,0 @@ | |||
1 | #!/usr/bin/env python3 | ||
2 | """ | ||
3 | Copyright (C) 2018-2019 Intel Corporation | ||
4 | |||
5 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
6 | you may not use this file except in compliance with the License. | ||
7 | You may obtain a copy of the License at | ||
8 | |||
9 | http://www.apache.org/licenses/LICENSE-2.0 | ||
10 | |||
11 | Unless required by applicable law or agreed to in writing, software | ||
12 | distributed under the License is distributed on an "AS IS" BASIS, | ||
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
14 | See the License for the specific language governing permissions and | ||
15 | limitations under the License. | ||
16 | """ | ||
17 | from __future__ import print_function | ||
18 | import sys | ||
19 | import os | ||
20 | from argparse import ArgumentParser, SUPPRESS | ||
21 | import cv2 | ||
22 | import numpy as np | ||
23 | import logging as log | ||
24 | from time import time | ||
25 | from openvino.inference_engine import IENetwork, IECore | ||
26 | |||
27 | |||
28 | def build_argparser(): | ||
29 | parser = ArgumentParser(add_help=False) | ||
30 | args = parser.add_argument_group('Options') | ||
31 | args.add_argument('-h', '--help', action='help', default=SUPPRESS, help='Show this help message and exit.') | ||
32 | args.add_argument("-m", "--model", help="Required. Path to an .xml file with a trained model.", required=True, | ||
33 | type=str) | ||
34 | args.add_argument("-i", "--input", help="Required. Path to a folder with images or path to an image files", | ||
35 | required=True, | ||
36 | type=str, nargs="+") | ||
37 | args.add_argument("-l", "--cpu_extension", | ||
38 | help="Optional. Required for CPU custom layers. " | ||
39 | "MKLDNN (CPU)-targeted custom layers. Absolute path to a shared library with the" | ||
40 | " kernels implementations.", type=str, default=None) | ||
41 | args.add_argument("-d", "--device", | ||
42 | help="Optional. Specify the target device to infer on; CPU, GPU, FPGA, HDDL, MYRIAD or HETERO: is " | ||
43 | "acceptable. The sample will look for a suitable plugin for device specified. Default " | ||
44 | "value is CPU", | ||
45 | default="CPU", type=str) | ||
46 | args.add_argument("--labels", help="Optional. Path to a labels mapping file", default=None, type=str) | ||
47 | args.add_argument("-nt", "--number_top", help="Optional. Number of top results", default=10, type=int) | ||
48 | |||
49 | return parser | ||
50 | |||
51 | |||
52 | def main(): | ||
53 | log.basicConfig(format="[ %(levelname)s ] %(message)s", level=log.INFO, stream=sys.stdout) | ||
54 | args = build_argparser().parse_args() | ||
55 | model_xml = args.model | ||
56 | model_bin = os.path.splitext(model_xml)[0] + ".bin" | ||
57 | |||
58 | # Plugin initialization for specified device and load extensions library if specified | ||
59 | log.info("Creating Inference Engine") | ||
60 | ie = IECore() | ||
61 | if args.cpu_extension and 'CPU' in args.device: | ||
62 | ie.add_extension(args.cpu_extension, "CPU") | ||
63 | # Read IR | ||
64 | log.info("Loading network files:\n\t{}\n\t{}".format(model_xml, model_bin)) | ||
65 | net = IENetwork(model=model_xml, weights=model_bin) | ||
66 | |||
67 | if "CPU" in args.device: | ||
68 | supported_layers = ie.query_network(net, "CPU") | ||
69 | not_supported_layers = [l for l in net.layers.keys() if l not in supported_layers] | ||
70 | if len(not_supported_layers) != 0: | ||
71 | log.error("Following layers are not supported by the plugin for specified device {}:\n {}". | ||
72 | format(args.device, ', '.join(not_supported_layers))) | ||
73 | log.error("Please try to specify cpu extensions library path in sample's command line parameters using -l " | ||
74 | "or --cpu_extension command line argument") | ||
75 | sys.exit(1) | ||
76 | |||
77 | assert len(net.inputs.keys()) == 1, "Sample supports only single input topologies" | ||
78 | assert len(net.outputs) == 1, "Sample supports only single output topologies" | ||
79 | |||
80 | log.info("Preparing input blobs") | ||
81 | input_blob = next(iter(net.inputs)) | ||
82 | out_blob = next(iter(net.outputs)) | ||
83 | net.batch_size = len(args.input) | ||
84 | |||
85 | # Read and pre-process input images | ||
86 | n, c, h, w = net.inputs[input_blob].shape | ||
87 | images = np.ndarray(shape=(n, c, h, w)) | ||
88 | for i in range(n): | ||
89 | image = cv2.imread(args.input[i]) | ||
90 | if image.shape[:-1] != (h, w): | ||
91 | log.warning("Image {} is resized from {} to {}".format(args.input[i], image.shape[:-1], (h, w))) | ||
92 | image = cv2.resize(image, (w, h)) | ||
93 | image = image.transpose((2, 0, 1)) # Change data layout from HWC to CHW | ||
94 | images[i] = image | ||
95 | log.info("Batch size is {}".format(n)) | ||
96 | |||
97 | # Loading model to the plugin | ||
98 | log.info("Loading model to the plugin") | ||
99 | exec_net = ie.load_network(network=net, device_name=args.device) | ||
100 | |||
101 | # Start sync inference | ||
102 | log.info("Starting inference in synchronous mode") | ||
103 | res = exec_net.infer(inputs={input_blob: images}) | ||
104 | |||
105 | # Processing output blob | ||
106 | log.info("Processing output blob") | ||
107 | res = res[out_blob] | ||
108 | log.info("Top {} results: ".format(args.number_top)) | ||
109 | if args.labels: | ||
110 | with open(args.labels, 'r') as f: | ||
111 | labels_map = [x.split(sep=' ', maxsplit=1)[-1].strip() for x in f] | ||
112 | else: | ||
113 | labels_map = None | ||
114 | classid_str = "classid" | ||
115 | probability_str = "probability" | ||
116 | for i, probs in enumerate(res): | ||
117 | probs = np.squeeze(probs) | ||
118 | top_ind = np.argsort(probs)[-args.number_top:][::-1] | ||
119 | print("Image {}\n".format(args.input[i])) | ||
120 | print(classid_str, probability_str) | ||
121 | print("{} {}".format('-' * len(classid_str), '-' * len(probability_str))) | ||
122 | for id in top_ind: | ||
123 | det_label = labels_map[id] if labels_map else "{}".format(id) | ||
124 | label_length = len(det_label) | ||
125 | space_num_before = (len(classid_str) - label_length) // 2 | ||
126 | space_num_after = len(classid_str) - (space_num_before + label_length) + 2 | ||
127 | space_num_before_prob = (len(probability_str) - len(str(probs[id]))) // 2 | ||
128 | print("{}{}{}{}{:.7f}".format(' ' * space_num_before, det_label, | ||
129 | ' ' * space_num_after, ' ' * space_num_before_prob, | ||
130 | probs[id])) | ||
131 | print("\n") | ||
132 | log.info("This sample is an API example, for any performance measurements please use the dedicated benchmark_app tool\n") | ||
133 | |||
134 | if __name__ == '__main__': | ||
135 | sys.exit(main() or 0) | ||
diff --git a/lib/oeqa/runtime/miutils/dldtutils.py b/lib/oeqa/runtime/miutils/dldtutils.py deleted file mode 100644 index 45bf2e12..00000000 --- a/lib/oeqa/runtime/miutils/dldtutils.py +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | |||
2 | def get_testdata_config(testdata, config): | ||
3 | return testdata.get(config) | ||
diff --git a/lib/oeqa/runtime/miutils/tests/dldt_inference_engine_test.py b/lib/oeqa/runtime/miutils/tests/dldt_inference_engine_test.py deleted file mode 100644 index 31bfb539..00000000 --- a/lib/oeqa/runtime/miutils/tests/dldt_inference_engine_test.py +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | import os | ||
2 | script_path = os.path.dirname(os.path.realpath(__file__)) | ||
3 | files_path = os.path.join(script_path, '../../files/') | ||
4 | |||
5 | class DldtInferenceEngineTest(object): | ||
6 | ie_input_files = {'ie_python_sample': 'classification_sample.py', | ||
7 | 'input': 'chicky_512.png', | ||
8 | 'input_download': 'https://raw.githubusercontent.com/opencv/opencv/master/samples/data/chicky_512.png', | ||
9 | 'model': 'squeezenet_v1.1.xml'} | ||
10 | |||
11 | def __init__(self, target, work_dir): | ||
12 | self.target = target | ||
13 | self.work_dir = work_dir | ||
14 | |||
15 | def setup(self): | ||
16 | self.target.run('mkdir -p %s' % self.work_dir) | ||
17 | self.target.copy_to(os.path.join(files_path, 'dldt-inference-engine', self.ie_input_files['ie_python_sample']), | ||
18 | self.work_dir) | ||
19 | python_cmd = 'from openvino.inference_engine import IENetwork, IECore; ie = IECore(); print(ie.available_devices)' | ||
20 | __, output = self.target.run('python3 -c "%s"' % python_cmd) | ||
21 | self.available_devices = output | ||
22 | |||
23 | def tear_down(self): | ||
24 | self.target.run('rm -rf %s' % self.work_dir) | ||
25 | |||
26 | def test_check_if_openvino_device_available(self, device): | ||
27 | if device not in self.available_devices: | ||
28 | return False, self.available_devices | ||
29 | return True, self.available_devices | ||
30 | |||
31 | def test_can_download_input_file(self, proxy_port): | ||
32 | return self.target.run('cd %s; wget %s -e https_proxy=%s' % | ||
33 | (self.work_dir, | ||
34 | self.ie_input_files['input_download'], | ||
35 | proxy_port)) | ||
36 | |||
37 | def test_dldt_ie_classification_with_device(self, device, ir_files_dir): | ||
38 | return self.target.run('classification_sample_async -d %s -i %s -m %s' % | ||
39 | (device, | ||
40 | os.path.join(self.work_dir, self.ie_input_files['input']), | ||
41 | os.path.join(ir_files_dir, self.ie_input_files['model']))) | ||
42 | |||
43 | def test_dldt_ie_classification_python_api_with_device(self, device, ir_files_dir, extension=''): | ||
44 | if extension: | ||
45 | return self.target.run('python3 %s -d %s -i %s -m %s -l %s' % | ||
46 | (os.path.join(self.work_dir, self.ie_input_files['ie_python_sample']), | ||
47 | device, | ||
48 | os.path.join(self.work_dir, self.ie_input_files['input']), | ||
49 | os.path.join(ir_files_dir, self.ie_input_files['model']), | ||
50 | extension)) | ||
51 | else: | ||
52 | return self.target.run('python3 %s -d %s -i %s -m %s' % | ||
53 | (os.path.join(self.work_dir, self.ie_input_files['ie_python_sample']), | ||
54 | device, | ||
55 | os.path.join(self.work_dir, self.ie_input_files['input']), | ||
56 | os.path.join(ir_files_dir, self.ie_input_files['model']))) | ||
diff --git a/lib/oeqa/runtime/miutils/tests/dldt_model_optimizer_test.py b/lib/oeqa/runtime/miutils/tests/dldt_model_optimizer_test.py deleted file mode 100644 index 7d3db15b..00000000 --- a/lib/oeqa/runtime/miutils/tests/dldt_model_optimizer_test.py +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | import os | ||
2 | |||
3 | class DldtModelOptimizerTest(object): | ||
4 | mo_input_files = {'model': 'squeezenet_v1.1.caffemodel', | ||
5 | 'prototxt': 'deploy.prototxt'} | ||
6 | mo_exe = 'mo.py' | ||
7 | |||
8 | def __init__(self, target, work_dir): | ||
9 | self.target = target | ||
10 | self.work_dir = work_dir | ||
11 | |||
12 | def setup(self): | ||
13 | self.target.run('mkdir -p %s' % self.work_dir) | ||
14 | |||
15 | def tear_down(self): | ||
16 | self.target.run('rm -rf %s' % self.work_dir) | ||
17 | |||
18 | def test_dldt_mo_can_create_ir(self, mo_exe_dir, mo_files_dir): | ||
19 | return self.target.run('python3 %s --input_model %s --input_proto %s --output_dir %s --data_type FP16' % | ||
20 | (os.path.join(mo_exe_dir, self.mo_exe), | ||
21 | os.path.join(mo_files_dir, self.mo_input_files['model']), | ||
22 | os.path.join(mo_files_dir, self.mo_input_files['prototxt']), | ||
23 | self.work_dir)) | ||
diff --git a/lib/oeqa/runtime/miutils/tests/squeezenet_model_download_test.py b/lib/oeqa/runtime/miutils/tests/squeezenet_model_download_test.py deleted file mode 100644 index a3e46a0a..00000000 --- a/lib/oeqa/runtime/miutils/tests/squeezenet_model_download_test.py +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | class SqueezenetModelDownloadTest(object): | ||
2 | download_files = {'squeezenet1.1.prototxt': 'https://raw.githubusercontent.com/DeepScale/SqueezeNet/a47b6f13d30985279789d08053d37013d67d131b/SqueezeNet_v1.1/deploy.prototxt', | ||
3 | 'squeezenet1.1.caffemodel': 'https://github.com/DeepScale/SqueezeNet/raw/a47b6f13d30985279789d08053d37013d67d131b/SqueezeNet_v1.1/squeezenet_v1.1.caffemodel'} | ||
4 | |||
5 | def __init__(self, target, work_dir): | ||
6 | self.target = target | ||
7 | self.work_dir = work_dir | ||
8 | |||
9 | def setup(self): | ||
10 | self.target.run('mkdir -p %s' % self.work_dir) | ||
11 | |||
12 | def tear_down(self): | ||
13 | self.target.run('rm -rf %s' % self.work_dir) | ||
14 | |||
15 | def test_can_download_squeezenet_model(self, proxy_port): | ||
16 | return self.target.run('cd %s; wget %s -e https_proxy=%s' % | ||
17 | (self.work_dir, | ||
18 | self.download_files['squeezenet1.1.caffemodel'], | ||
19 | proxy_port)) | ||
20 | |||
21 | def test_can_download_squeezenet_prototxt(self, proxy_port): | ||
22 | return self.target.run('cd %s; wget %s -e https_proxy=%s' % | ||
23 | (self.work_dir, | ||
24 | self.download_files['squeezenet1.1.prototxt'], | ||
25 | proxy_port)) | ||
diff --git a/lib/oeqa/selftest/cases/secureboot.py b/lib/oeqa/selftest/cases/secureboot.py deleted file mode 100644 index 4c059e25..00000000 --- a/lib/oeqa/selftest/cases/secureboot.py +++ /dev/null | |||
@@ -1,176 +0,0 @@ | |||
1 | #!/usr/bin/env python | ||
2 | # ex:ts=4:sw=4:sts=4:et | ||
3 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
4 | # | ||
5 | # Copyright (c) 2017, Intel Corporation. | ||
6 | # All rights reserved. | ||
7 | # | ||
8 | # This program is free software; you can redistribute it and/or modify | ||
9 | # it under the terms of the GNU General Public License version 2 as | ||
10 | # published by the Free Software Foundation. | ||
11 | # | ||
12 | # This program is distributed in the hope that it will be useful, | ||
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | # GNU General Public License for more details. | ||
16 | # | ||
17 | # You should have received a copy of the GNU General Public License along | ||
18 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
19 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
20 | # | ||
21 | # AUTHORS | ||
22 | # Mikko Ylinen <mikko.ylinen@linux.intel.com> | ||
23 | # | ||
24 | # Based on meta/lib/oeqa/selftest/* and meta-refkit/lib/oeqa/selftest/* | ||
25 | |||
26 | """Test cases for secure boot with QEMU running OVMF.""" | ||
27 | |||
28 | import os | ||
29 | import unittest | ||
30 | import re | ||
31 | import glob | ||
32 | from shutil import rmtree, copy | ||
33 | |||
34 | from oeqa.core.decorator.depends import OETestDepends | ||
35 | from oeqa.selftest.case import OESelftestTestCase | ||
36 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars, runqemu | ||
37 | |||
38 | class SecureBootTests(OESelftestTestCase): | ||
39 | """Secure Boot test class.""" | ||
40 | |||
41 | ovmf_keys_enrolled = False | ||
42 | ovmf_qemuparams = '' | ||
43 | ovmf_dir = '' | ||
44 | test_image_unsigned = 'secureboot-selftest-image-unsigned' | ||
45 | test_image_signed = 'secureboot-selftest-image-signed' | ||
46 | correct_key = 'refkit-db' | ||
47 | incorrect_key = 'incorrect' | ||
48 | |||
49 | @classmethod | ||
50 | def setUpLocal(self): | ||
51 | |||
52 | if not SecureBootTests.ovmf_keys_enrolled: | ||
53 | bitbake('ovmf ovmf-shell-image-enrollkeys', output_log=self.logger) | ||
54 | |||
55 | bb_vars = get_bb_vars(['TMPDIR', 'DEPLOY_DIR_IMAGE']) | ||
56 | |||
57 | SecureBootTests.ovmf_dir = os.path.join(bb_vars['TMPDIR'], 'oeselftest', 'secureboot', 'ovmf') | ||
58 | bb.utils.mkdirhier(SecureBootTests.ovmf_dir) | ||
59 | |||
60 | # Copy (all) OVMF in a temporary location | ||
61 | for src in glob.glob('%s/ovmf.*' % bb_vars['DEPLOY_DIR_IMAGE']): | ||
62 | copy(src, SecureBootTests.ovmf_dir) | ||
63 | |||
64 | SecureBootTests.ovmf_qemuparams = '-drive if=pflash,format=qcow2,file=%s/ovmf.secboot.qcow2' % SecureBootTests.ovmf_dir | ||
65 | |||
66 | cmd = ("runqemu " | ||
67 | "qemuparams='%s' " | ||
68 | "ovmf-shell-image-enrollkeys wic intel-corei7-64 " | ||
69 | "nographic slirp") % SecureBootTests.ovmf_qemuparams | ||
70 | print('Running "%s"' % cmd) | ||
71 | status = runCmd(cmd) | ||
72 | |||
73 | if not re.search('info: success', status.output, re.M): | ||
74 | self.fail('Failed to enroll keys. EFI shell log:\n%s' % status.output) | ||
75 | else: | ||
76 | # keys enrolled in ovmf.secboot.vars | ||
77 | SecureBootTests.ovmf_keys_enrolled = True | ||
78 | |||
79 | @classmethod | ||
80 | def tearDownLocal(self): | ||
81 | # Seems this is mandatory between the tests (a signed image is booted | ||
82 | # when running test_boot_unsigned_image after test_boot_signed_image). | ||
83 | # bitbake('-c clean %s' % test_image, output_log=self.logger) | ||
84 | # | ||
85 | # Whatever the problem was, it no longer seems to be necessary, so | ||
86 | # we can skip the time-consuming clean + full rebuild (5:04 min instead | ||
87 | # of 6:55min here). | ||
88 | pass | ||
89 | |||
90 | @classmethod | ||
91 | def tearDownClass(self): | ||
92 | bitbake('ovmf-shell-image-enrollkeys:do_cleanall', output_log=self.logger) | ||
93 | rmtree(self.ovmf_dir, ignore_errors=True) | ||
94 | |||
95 | def secureboot_with_image(self, boot_timeout=300, signing_key=None): | ||
96 | """Boot the image with UEFI SecureBoot enabled and see the result. """ | ||
97 | |||
98 | config = "" | ||
99 | |||
100 | if signing_key: | ||
101 | test_image = self.test_image_signed | ||
102 | config += 'SECURE_BOOT_SIGNING_KEY = "${THISDIR}/files/%s.key"\n' % signing_key | ||
103 | config += 'SECURE_BOOT_SIGNING_CERT = "${THISDIR}/files/%s.crt"\n' % signing_key | ||
104 | else: | ||
105 | test_image = self.test_image_unsigned | ||
106 | |||
107 | self.write_config(config) | ||
108 | bitbake(test_image, output_log=self.logger) | ||
109 | self.remove_config(config) | ||
110 | |||
111 | # Some of the cases depend on the timeout to expire. Allow overrides | ||
112 | # so that we don't have to wait 1000s which is the default. | ||
113 | overrides = { | ||
114 | 'TEST_QEMUBOOT_TIMEOUT': boot_timeout, | ||
115 | } | ||
116 | |||
117 | print('Booting %s' % test_image) | ||
118 | |||
119 | try: | ||
120 | with runqemu(test_image, ssh=False, | ||
121 | runqemuparams='nographic slirp', | ||
122 | qemuparams=self.ovmf_qemuparams, | ||
123 | overrides=overrides, | ||
124 | image_fstype='wic') as qemu: | ||
125 | |||
126 | cmd = 'uname -a' | ||
127 | |||
128 | status, output = qemu.run_serial(cmd) | ||
129 | |||
130 | self.assertTrue(status, 'Could not run \'uname -a\' (status=%s):\n%s' % (status, output)) | ||
131 | |||
132 | # if we got this far without a correctly signed image, something went wrong | ||
133 | if signing_key != self.correct_key: | ||
134 | self.fail('The image not give a Security violation when expected. Boot log:\n%s' % output) | ||
135 | |||
136 | |||
137 | except Exception: | ||
138 | |||
139 | # Currently runqemu() fails if 'login:' prompt is not seen and it's | ||
140 | # not possible to login as 'root'. Those conditions aren't met when | ||
141 | # booting to EFI shell (See [YOCTO #11438]). We catch the failure | ||
142 | # and parse the boot log to determine the success. Note: the | ||
143 | # timeout triggers verbose bb.error() but that's normal with some | ||
144 | # of the test cases. | ||
145 | |||
146 | workdir = get_bb_var('WORKDIR', test_image) | ||
147 | bootlog = "%s/testimage/qemu_boot_log" % workdir | ||
148 | |||
149 | with open(bootlog, "r") as log: | ||
150 | |||
151 | # This isn't right but all we can do at this point. The right | ||
152 | # approach would run commands in the EFI shell to determine | ||
153 | # the BIOS rejects unsigned and/or images signed with keys in | ||
154 | # dbx key store but that needs changes in oeqa framework. | ||
155 | |||
156 | output = log.read() | ||
157 | |||
158 | # PASS if we see a security violation on unsigned or incorrectly signed images, otherwise fail | ||
159 | if signing_key == self.correct_key: | ||
160 | self.fail('Correctly signed image failed to boot. Boot log:\n%s' % output) | ||
161 | elif not re.search('Security Violation', output): | ||
162 | self.fail('The image not give a Security violation when expected. Boot log:\n%s' % output) | ||
163 | |||
164 | def test_boot_unsigned_image(self): | ||
165 | """ Boot unsigned image with secureboot enabled in UEFI.""" | ||
166 | self.secureboot_with_image(boot_timeout=120, signing_key=None) | ||
167 | |||
168 | @OETestDepends(['secureboot.SecureBootTests.test_boot_unsigned_image']) | ||
169 | def test_boot_incorrectly_signed_image(self): | ||
170 | """ Boot (correctly) signed image with secureboot enabled in UEFI.""" | ||
171 | self.secureboot_with_image(boot_timeout=120, signing_key=self.incorrect_key) | ||
172 | |||
173 | @OETestDepends(['secureboot.SecureBootTests.test_boot_incorrectly_signed_image']) | ||
174 | def test_boot_correctly_signed_image(self): | ||
175 | """ Boot (correctly) signed image with secureboot enabled in UEFI.""" | ||
176 | self.secureboot_with_image(boot_timeout=150, signing_key=self.correct_key) | ||
diff --git a/recipes-bsp/intel-cmt-cat/intel-cmt-cat_25.04.bb b/recipes-bsp/intel-cmt-cat/intel-cmt-cat_25.04.bb new file mode 100644 index 00000000..4f9efc7d --- /dev/null +++ b/recipes-bsp/intel-cmt-cat/intel-cmt-cat_25.04.bb | |||
@@ -0,0 +1,27 @@ | |||
1 | SUMMARY = "intel-cmt-cat" | ||
2 | DESCRIPTION = "Software package which provides basic support for Intel(R) \ | ||
3 | Resource Director Technology (Intel(R) RDT)" | ||
4 | HOMEPAGE = "https://github.com/intel/intel-cmt-cat" | ||
5 | |||
6 | LICENSE = "BSD-3-Clause" | ||
7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=4b63c65942e1c16fd897f8cd20abebf8" | ||
8 | |||
9 | SRC_URI = "git://github.com/intel/intel-cmt-cat;protocol=https;branch=master" | ||
10 | SRCREV = "17629d0b726875836af6c7d9cb38b8ed23f32089" | ||
11 | |||
12 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
13 | COMPATIBLE_HOST:libc-musl = "null" | ||
14 | |||
15 | do_install() { | ||
16 | oe_runmake install PREFIX=${D}${prefix} NOLDCONFIG=y | ||
17 | } | ||
18 | |||
19 | FILES:${PN} += "${nonarch_libdir}/libpqos*" | ||
20 | FILES:${PN}-doc = "/usr/man*" | ||
21 | |||
22 | INSANE_SKIP:${PN} += "ldflags" | ||
23 | INSANE_SKIP:${PN} += "dev-so" | ||
24 | INSANE_SKIP:${PN} += "libdir" | ||
25 | INSANE_SKIP:${PN} += "already-stripped" | ||
26 | |||
27 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
diff --git a/recipes-bsp/metee/metee_3.1.3.bb b/recipes-bsp/metee/metee_3.2.4.bb index 99f72abb..7b505453 100644 --- a/recipes-bsp/metee/metee_3.1.3.bb +++ b/recipes-bsp/metee/metee_3.2.4.bb | |||
@@ -10,8 +10,7 @@ COMPATIBLE_HOST = '(i.86|x86_64).*-linux' | |||
10 | 10 | ||
11 | inherit cmake | 11 | inherit cmake |
12 | 12 | ||
13 | SRC_URI = "git://github.com/intel/metee.git;branch=master;protocol=https" | 13 | SRC_URI = "git://github.com/intel/metee.git;branch=master;protocol=https \ |
14 | SRCREV = "0d6f19420bebaa92b0e3dcb6b81e352820f1f1cc" | 14 | " |
15 | 15 | SRCREV = "db45e37e146fd9c06907a15ade55eba06ad1f951" | |
16 | S = "${WORKDIR}/git" | ||
17 | 16 | ||
diff --git a/recipes-core/libxcam/libxcam_1.5.0.bb b/recipes-core/libxcam/libxcam_1.5.0.bb index 31e9344b..7f67b55b 100644 --- a/recipes-core/libxcam/libxcam_1.5.0.bb +++ b/recipes-core/libxcam/libxcam_1.5.0.bb | |||
@@ -6,7 +6,6 @@ SECTION = "lib" | |||
6 | 6 | ||
7 | inherit autotools pkgconfig | 7 | inherit autotools pkgconfig |
8 | 8 | ||
9 | S = "${WORKDIR}/git" | ||
10 | SRCREV = "231a1d5243cd45c7a6b511b667f1ec52178fdda8" | 9 | SRCREV = "231a1d5243cd45c7a6b511b667f1ec52178fdda8" |
11 | SRC_URI = "git://github.com/intel/libxcam.git;branch=1.5.0;protocol=https \ | 10 | SRC_URI = "git://github.com/intel/libxcam.git;branch=1.5.0;protocol=https \ |
12 | file://0001-fake_v4l2_device.h-fix-narrowing-warning.patch \ | 11 | file://0001-fake_v4l2_device.h-fix-narrowing-warning.patch \ |
@@ -30,7 +29,7 @@ PACKAGECONFIG[dnn] = "--enable-dnn, --disable-dnn," | |||
30 | 29 | ||
31 | do_install:append () { | 30 | do_install:append () { |
32 | install -d ${D}${bindir}/libxcam | 31 | install -d ${D}${bindir}/libxcam |
33 | cp -r ${WORKDIR}/build/tests/.libs/* ${D}${bindir}/libxcam/ | 32 | cp -r ${B}/tests/.libs/* ${D}${bindir}/libxcam/ |
34 | } | 33 | } |
35 | 34 | ||
36 | FILES:${PN} += "${libdir}/gstreamer-*/*.so" | 35 | FILES:${PN} += "${libdir}/gstreamer-*/*.so" |
diff --git a/recipes-core/meta/icx-environment.inc b/recipes-core/meta/icx-environment.inc new file mode 100644 index 00000000..65322a91 --- /dev/null +++ b/recipes-core/meta/icx-environment.inc | |||
@@ -0,0 +1,15 @@ | |||
1 | export ICX_LDFLAGS_OPTION = " -Wl,-dynamic-linker,/lib/ld-linux-x86-64.so.2" | ||
2 | export ICXSDK_PREFIX_OPTION = "-B ${TARGET_PREFIX}" | ||
3 | export ICXQSDK_PREFIX_OPTION = "-qgnu-prefix=${TARGET_PREFIX}" | ||
4 | |||
5 | create_sdk_files:append() { | ||
6 | script=${SDK_OUTPUT}/${SDKPATH}/environment-setup-${REAL_MULTIMACH_TARGET_SYS} | ||
7 | if ${@bb.utils.contains('ICXSDK', '1', 'true', 'false', d)}; then | ||
8 | echo 'export ICX="icx ${ICXSDK_PREFIX_OPTION} --target=${TARGET_SYS} ${TARGET_CC_ARCH} --sysroot=$SDKTARGETSYSROOT ${ICX_LDFLAGS_OPTION}"' >> $script | ||
9 | echo 'export ICXCXX="icpx ${ICXSDK_PREFIX_OPTION} --target=${TARGET_SYS} ${TARGET_CC_ARCH} --sysroot=$SDKTARGETSYSROOT ${ICX_LDFLAGS_OPTION}"' >> $script | ||
10 | echo 'export ICXCPP="icx ${ICXSDK_PREFIX_OPTION} -E --target=${TARGET_SYS} ${TARGET_CC_ARCH} --sysroot=$SDKTARGETSYSROOT ${ICX_LDFLAGS_OPTION}"' >> $script | ||
11 | echo 'export ICXLD="xild --sysroot=$SDKTARGETSYSROOT "' >> $script | ||
12 | echo 'export ICXCCLD="icx ${ICXSDK_PREFIX_OPTION} --sysroot=$SDKTARGETSYSROOT"' >> $script | ||
13 | echo 'export ICXAR="xiar ${ICXQSDK_PREFIX_OPTION}"' >> $script | ||
14 | fi | ||
15 | } | ||
diff --git a/recipes-core/meta/meta-environment-extsdk.bbappend b/recipes-core/meta/meta-environment-extsdk.bbappend new file mode 100644 index 00000000..2cff6fc4 --- /dev/null +++ b/recipes-core/meta/meta-environment-extsdk.bbappend | |||
@@ -0,0 +1,3 @@ | |||
1 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" | ||
2 | |||
3 | require ${@bb.utils.contains('ICXSDK', '1', 'icx-environment.inc', '', d)} | ||
diff --git a/recipes-core/meta/meta-environment.bbappend b/recipes-core/meta/meta-environment.bbappend new file mode 100644 index 00000000..2cff6fc4 --- /dev/null +++ b/recipes-core/meta/meta-environment.bbappend | |||
@@ -0,0 +1,3 @@ | |||
1 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" | ||
2 | |||
3 | require ${@bb.utils.contains('ICXSDK', '1', 'icx-environment.inc', '', d)} | ||
diff --git a/recipes-core/microcode/intel-microcode_20220510.bb b/recipes-core/microcode/intel-microcode_20250512.bb index ce59ab0e..ff383f85 100644 --- a/recipes-core/microcode/intel-microcode_20220510.bb +++ b/recipes-core/microcode/intel-microcode_20250512.bb | |||
@@ -16,10 +16,9 @@ LIC_FILES_CHKSUM = "file://license;md5=d8405101ec6e90c1d84b082b0c40c721" | |||
16 | SRC_URI = "git://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files.git;protocol=https;branch=main \ | 16 | SRC_URI = "git://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files.git;protocol=https;branch=main \ |
17 | " | 17 | " |
18 | 18 | ||
19 | SRCREV = "6c0c4691e5bb446e0e428ebca595164709c59586" | 19 | SRCREV = "eeb93b7a818bb27cb6b7a2be0454f8a0a75f1bd6" |
20 | 20 | ||
21 | DEPENDS = "iucode-tool-native" | 21 | DEPENDS = "iucode-tool-native" |
22 | S = "${WORKDIR}/git" | ||
23 | 22 | ||
24 | COMPATIBLE_HOST = "(i.86|x86_64).*-linux" | 23 | COMPATIBLE_HOST = "(i.86|x86_64).*-linux" |
25 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 24 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
diff --git a/recipes-core/ovmf/files/0001-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch b/recipes-core/ovmf/files/0001-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch deleted file mode 100644 index 6065b1f7..00000000 --- a/recipes-core/ovmf/files/0001-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch +++ /dev/null | |||
@@ -1,127 +0,0 @@ | |||
1 | From b2099e7184d48a6d05c8713b6fd5dac0e2e70963 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mikko Ylinen <mikko.ylinen@linux.intel.com> | ||
3 | Date: Wed, 2 Mar 2022 10:55:35 +0800 | ||
4 | Subject: [PATCH] ovmf: RefkitTestCA: TEST UEFI SecureBoot | ||
5 | |||
6 | This patch adds refkit-db.cer (via xxd -i) in OVMF's db | ||
7 | signature database when used with EnrollDefaultKeys EFI | ||
8 | application. It's used for testing purposes only. | ||
9 | |||
10 | Images signed with refkit-db keys are allowed to boot. | ||
11 | |||
12 | Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com> | ||
13 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
14 | --- | ||
15 | OvmfPkg/EnrollDefaultKeys/AuthData.c | 69 +++++++++++++++++++ | ||
16 | OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c | 3 + | ||
17 | OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.h | 2 + | ||
18 | 3 files changed, 74 insertions(+) | ||
19 | |||
20 | diff --git a/OvmfPkg/EnrollDefaultKeys/AuthData.c b/OvmfPkg/EnrollDefaultKeys/AuthData.c | ||
21 | index 53ee7f7003..127131cd05 100644 | ||
22 | --- a/OvmfPkg/EnrollDefaultKeys/AuthData.c | ||
23 | +++ b/OvmfPkg/EnrollDefaultKeys/AuthData.c | ||
24 | @@ -395,6 +395,75 @@ CONST UINT8 mMicrosoftUefiCa[] = { | ||
25 | |||
26 | CONST UINTN mSizeOfMicrosoftUefiCa = sizeof mMicrosoftUefiCa; | ||
27 | |||
28 | +CONST UINT8 mRefkitTestCA[] = { | ||
29 | + 0x30, 0x82, 0x02, 0xfb, 0x30, 0x82, 0x01, 0xe3, 0xa0, 0x03, 0x02, 0x01, | ||
30 | + 0x02, 0x02, 0x09, 0x00, 0xd4, 0xf6, 0x48, 0xc2, 0x68, 0x19, 0x91, 0xac, | ||
31 | + 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, | ||
32 | + 0x0b, 0x05, 0x00, 0x30, 0x14, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, | ||
33 | + 0x04, 0x03, 0x0c, 0x09, 0x72, 0x65, 0x66, 0x6b, 0x69, 0x74, 0x2d, 0x64, | ||
34 | + 0x62, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x37, 0x30, 0x34, 0x32, 0x30, 0x31, | ||
35 | + 0x32, 0x30, 0x36, 0x33, 0x32, 0x5a, 0x17, 0x0d, 0x31, 0x38, 0x30, 0x34, | ||
36 | + 0x32, 0x30, 0x31, 0x32, 0x30, 0x36, 0x33, 0x32, 0x5a, 0x30, 0x14, 0x31, | ||
37 | + 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x09, 0x72, 0x65, | ||
38 | + 0x66, 0x6b, 0x69, 0x74, 0x2d, 0x64, 0x62, 0x30, 0x82, 0x01, 0x22, 0x30, | ||
39 | + 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, | ||
40 | + 0x05, 0x00, 0x03, 0x82, 0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, | ||
41 | + 0x82, 0x01, 0x01, 0x00, 0xb4, 0x1c, 0x22, 0xa6, 0x22, 0x01, 0x57, 0xcd, | ||
42 | + 0xf1, 0x4f, 0xaf, 0x72, 0xe3, 0xd9, 0x01, 0x80, 0x50, 0x55, 0xef, 0x02, | ||
43 | + 0x5e, 0xeb, 0x99, 0x35, 0xcb, 0x7f, 0x2a, 0x79, 0xff, 0xb5, 0x3e, 0xec, | ||
44 | + 0x5d, 0x92, 0x06, 0x30, 0x20, 0xe7, 0x95, 0xad, 0xa4, 0x84, 0x2e, 0x3f, | ||
45 | + 0xfa, 0xd7, 0x46, 0xdd, 0x49, 0xa8, 0xe8, 0xe3, 0x79, 0x49, 0xf6, 0x8f, | ||
46 | + 0x0b, 0x1d, 0xfe, 0x63, 0xa8, 0xd1, 0x63, 0xa3, 0xd6, 0x0d, 0x4e, 0x6c, | ||
47 | + 0x66, 0x5c, 0xd6, 0x66, 0x26, 0xd1, 0x26, 0x98, 0xd4, 0x4f, 0x76, 0xc9, | ||
48 | + 0x65, 0x48, 0x58, 0x13, 0x08, 0x31, 0xbc, 0xe5, 0x47, 0x25, 0x65, 0x95, | ||
49 | + 0x39, 0x89, 0x5f, 0x02, 0xf1, 0xc5, 0x06, 0x17, 0x58, 0xca, 0x09, 0xfd, | ||
50 | + 0xf6, 0x1e, 0xc5, 0x97, 0xda, 0xa3, 0x4e, 0x1a, 0x48, 0xbe, 0xcf, 0x96, | ||
51 | + 0x27, 0x04, 0x4b, 0xb7, 0x6d, 0x67, 0xb6, 0x50, 0x18, 0x04, 0x73, 0x51, | ||
52 | + 0xd2, 0x6a, 0x2d, 0xdf, 0x3b, 0xab, 0xf2, 0x2d, 0x95, 0xd7, 0xa8, 0xb8, | ||
53 | + 0xa8, 0x30, 0xa1, 0xab, 0x8b, 0x92, 0x2b, 0x60, 0x3e, 0x3a, 0xe5, 0x86, | ||
54 | + 0x40, 0x71, 0xc1, 0x3f, 0x2d, 0x2e, 0x90, 0xe7, 0xd6, 0xec, 0xcc, 0xc2, | ||
55 | + 0x0b, 0x79, 0x83, 0x71, 0x6d, 0xf6, 0xa3, 0xa9, 0x4c, 0xcd, 0x46, 0x81, | ||
56 | + 0xdc, 0xef, 0xec, 0x51, 0xbe, 0x81, 0x2a, 0xf1, 0x78, 0x73, 0x41, 0xdb, | ||
57 | + 0x54, 0xce, 0x7c, 0xce, 0xa2, 0xe3, 0x90, 0x4f, 0x45, 0x1a, 0xf9, 0x3d, | ||
58 | + 0x88, 0xfc, 0x0e, 0xed, 0xd3, 0x69, 0x22, 0x4c, 0xfa, 0x0a, 0x69, 0xd1, | ||
59 | + 0x48, 0xc0, 0xaa, 0xa9, 0x3a, 0xb3, 0x8f, 0x10, 0x3a, 0x76, 0xa8, 0x0c, | ||
60 | + 0x7a, 0x3d, 0xd8, 0x79, 0xce, 0x1c, 0x96, 0x62, 0xf4, 0x06, 0xee, 0x47, | ||
61 | + 0xe8, 0xe0, 0x69, 0x91, 0xae, 0xea, 0x34, 0xcf, 0xda, 0xa8, 0xb4, 0x39, | ||
62 | + 0x5e, 0xf3, 0x7a, 0xd0, 0x88, 0x48, 0x47, 0x69, 0x02, 0x03, 0x01, 0x00, | ||
63 | + 0x01, 0xa3, 0x50, 0x30, 0x4e, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, | ||
64 | + 0x04, 0x16, 0x04, 0x14, 0x68, 0x60, 0x11, 0x25, 0x85, 0x14, 0x78, 0x1b, | ||
65 | + 0x1a, 0x9f, 0x46, 0x12, 0xe6, 0x21, 0xe4, 0xef, 0xfb, 0x3b, 0xaa, 0xdd, | ||
66 | + 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, | ||
67 | + 0x14, 0x68, 0x60, 0x11, 0x25, 0x85, 0x14, 0x78, 0x1b, 0x1a, 0x9f, 0x46, | ||
68 | + 0x12, 0xe6, 0x21, 0xe4, 0xef, 0xfb, 0x3b, 0xaa, 0xdd, 0x30, 0x0c, 0x06, | ||
69 | + 0x03, 0x55, 0x1d, 0x13, 0x04, 0x05, 0x30, 0x03, 0x01, 0x01, 0xff, 0x30, | ||
70 | + 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, | ||
71 | + 0x05, 0x00, 0x03, 0x82, 0x01, 0x01, 0x00, 0x8f, 0xd2, 0x84, 0x7c, 0x43, | ||
72 | + 0x47, 0xca, 0x6b, 0xfd, 0x87, 0x83, 0xd0, 0xef, 0x75, 0xd3, 0x20, 0x52, | ||
73 | + 0x73, 0x18, 0xaa, 0x32, 0x71, 0xfb, 0xa5, 0xf4, 0xc9, 0x11, 0xa3, 0x68, | ||
74 | + 0x4d, 0xb7, 0x9d, 0xe6, 0xd9, 0x46, 0x24, 0xdc, 0xc7, 0xc2, 0x3b, 0xf9, | ||
75 | + 0xb0, 0x98, 0xfc, 0xee, 0x34, 0x6e, 0x10, 0x9b, 0x3d, 0x44, 0x6e, 0x33, | ||
76 | + 0x09, 0x11, 0xb8, 0x29, 0xd6, 0x2d, 0x06, 0xcf, 0x67, 0x8f, 0x96, 0x85, | ||
77 | + 0x9d, 0x63, 0x72, 0xbf, 0x64, 0x5f, 0x0d, 0xe3, 0xc9, 0x63, 0x19, 0x71, | ||
78 | + 0xd4, 0x7d, 0x4c, 0x9c, 0x77, 0x46, 0xda, 0x20, 0x97, 0x6d, 0xbc, 0xdd, | ||
79 | + 0xc2, 0x1f, 0xf3, 0x40, 0x38, 0x1e, 0xe7, 0xcc, 0x55, 0x05, 0x72, 0xba, | ||
80 | + 0x24, 0x4f, 0xb3, 0x8a, 0x93, 0x0c, 0x30, 0x60, 0xda, 0x9f, 0x6f, 0x35, | ||
81 | + 0xf6, 0xfb, 0xb0, 0x1f, 0xb3, 0x00, 0xdd, 0xc4, 0xa6, 0xbc, 0xe2, 0x37, | ||
82 | + 0xc1, 0xa3, 0xef, 0xd9, 0xa1, 0x86, 0xf9, 0xeb, 0xa4, 0xa5, 0x45, 0x38, | ||
83 | + 0xff, 0x4e, 0x87, 0x4a, 0x41, 0xcf, 0x6e, 0x69, 0x7e, 0x97, 0xbe, 0x2d, | ||
84 | + 0x22, 0xbc, 0x8d, 0xa0, 0x1a, 0x21, 0x8f, 0x4b, 0x72, 0x90, 0x01, 0x5c, | ||
85 | + 0xba, 0xa5, 0x9c, 0x2d, 0xd7, 0x25, 0x24, 0xfc, 0xff, 0x5c, 0x58, 0x14, | ||
86 | + 0x46, 0x30, 0x09, 0x7c, 0x55, 0x64, 0x83, 0x0b, 0xb9, 0xdf, 0xcf, 0x25, | ||
87 | + 0xee, 0xec, 0xf7, 0xcb, 0xdb, 0xd1, 0x5b, 0x93, 0x93, 0xc8, 0x8a, 0x10, | ||
88 | + 0x46, 0xb8, 0xb0, 0x35, 0x1c, 0x6c, 0x0d, 0x8f, 0x03, 0x6a, 0x8f, 0x1b, | ||
89 | + 0x36, 0x68, 0xf3, 0x53, 0x89, 0x36, 0x5b, 0x21, 0x80, 0xde, 0xe3, 0x92, | ||
90 | + 0x52, 0x94, 0x97, 0x9d, 0x49, 0x89, 0x7d, 0x3e, 0xde, 0x29, 0x51, 0xba, | ||
91 | + 0x11, 0xf7, 0xba, 0x01, 0xf7, 0xab, 0xea, 0xc1, 0xa7, 0x2e, 0xa3, 0x4d, | ||
92 | + 0x65, 0xfd, 0x40, 0x71, 0xf1, 0xe2, 0x3f, 0x6c, 0x28, 0xcb, 0xd3 | ||
93 | +}; | ||
94 | + | ||
95 | +CONST UINTN mSizeOfRefkitTestCA = sizeof mRefkitTestCA; | ||
96 | + | ||
97 | // | ||
98 | // The Microsoft.UefiSecureBootLogo.Tests.OutOfBoxConfirmDBXisPresent test case | ||
99 | // of the Secure Boot Logo Test in the Microsoft Hardware Certification Kit | ||
100 | diff --git a/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c b/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c | ||
101 | index 094e4c821b..0a7eef54dc 100644 | ||
102 | --- a/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c | ||
103 | +++ b/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c | ||
104 | @@ -702,6 +702,9 @@ ShellAppMain ( | ||
105 | mMicrosoftUefiCa, | ||
106 | mSizeOfMicrosoftUefiCa, | ||
107 | &gMicrosoftVendorGuid, | ||
108 | + mRefkitTestCA, | ||
109 | + mSizeOfRefkitTestCA, | ||
110 | + &gEfiCallerIdGuid, | ||
111 | NULL | ||
112 | ); | ||
113 | } | ||
114 | diff --git a/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.h b/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.h | ||
115 | index 56da9c71d6..8de1dfe4e0 100644 | ||
116 | --- a/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.h | ||
117 | +++ b/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.h | ||
118 | @@ -133,4 +133,6 @@ extern CONST UINTN mSizeOfMicrosoftUefiCa; | ||
119 | extern CONST UINT8 mSha256OfDevNull[]; | ||
120 | extern CONST UINTN mSizeOfSha256OfDevNull; | ||
121 | |||
122 | +extern CONST UINT8 mRefkitTestCA[]; | ||
123 | +extern CONST UINTN mSizeOfRefkitTestCA; | ||
124 | #endif /* ENROLL_DEFAULT_KEYS_H_ */ | ||
125 | -- | ||
126 | 2.17.1 | ||
127 | |||
diff --git a/recipes-core/ovmf/ovmf-shell-image-enrollkeys.bb b/recipes-core/ovmf/ovmf-shell-image-enrollkeys.bb deleted file mode 100644 index ca3cfc15..00000000 --- a/recipes-core/ovmf/ovmf-shell-image-enrollkeys.bb +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | require recipes-core/ovmf/ovmf-shell-image.bb | ||
2 | |||
3 | WKS_SEARCH_PATH:append = ":${COREBASE}/meta/recipes-core/ovmf" | ||
4 | |||
5 | QB_DRIVE_TYPE = "/dev/vd" | ||
6 | |||
7 | do_image:append() { | ||
8 | cat > ${IMAGE_ROOTFS}/startup.nsh << EOF | ||
9 | EnrollDefaultKeys | ||
10 | reset | ||
11 | EOF | ||
12 | |||
13 | } | ||
diff --git a/recipes-core/ovmf/ovmf_%.bbappend b/recipes-core/ovmf/ovmf_%.bbappend deleted file mode 100644 index 34a9dd1b..00000000 --- a/recipes-core/ovmf/ovmf_%.bbappend +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | FILESEXTRAPATHS:prepend:intel-x86-common := "${THISDIR}/files:" | ||
2 | |||
3 | SRC_URI:append:intel-x86-common = " \ | ||
4 | file://0001-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch \ | ||
5 | " | ||
6 | PACKAGECONFIG:append:intel-x86-common = " secureboot" | ||
diff --git a/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend new file mode 100644 index 00000000..b5a5fdd4 --- /dev/null +++ b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend | |||
@@ -0,0 +1 @@ | |||
RDEPENDS:${PN} += "${@bb.utils.contains('ICXSDK', '1', ' intel-oneapi-dpcpp-cpp intel-oneapi-dpcpp-cpp-dev intel-oneapi-dpcpp-cpp-runtime intel-oneapi-dpcpp-cpp-runtime-dev ', '', d)}" | |||
diff --git a/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend b/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend new file mode 100644 index 00000000..608ea3d3 --- /dev/null +++ b/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend | |||
@@ -0,0 +1 @@ | |||
RRECOMMENDS:${PN}:append:intel-x86-common = "${@bb.utils.contains('ICXSDK', '1', ' intel-oneapi-dpcpp-cpp intel-oneapi-dpcpp-cpp-dev intel-oneapi-dpcpp-cpp-runtime intel-oneapi-dpcpp-cpp-runtime-dev ', '', d)}" | |||
diff --git a/recipes-devtools/slimboot/slimboot-tools_git.bb b/recipes-devtools/slimboot/slimboot-tools_git.bb index b65b182d..72b3ffe8 100644 --- a/recipes-devtools/slimboot/slimboot-tools_git.bb +++ b/recipes-devtools/slimboot/slimboot-tools_git.bb | |||
@@ -5,7 +5,7 @@ Operating Systems or Hypervisors." | |||
5 | HOMEPAGE = "https://slimbootloader.github.io/tools/index.html" | 5 | HOMEPAGE = "https://slimbootloader.github.io/tools/index.html" |
6 | 6 | ||
7 | SRC_URI = "git://github.com/slimbootloader/slimbootloader;protocol=https;branch=master" | 7 | SRC_URI = "git://github.com/slimbootloader/slimbootloader;protocol=https;branch=master" |
8 | SRCREV = "df5bd0bc2a522afcb8945a6797592b04838db753" | 8 | SRCREV = "a63818df94d3c9d8c04cdca5869ba7cde9fb5a38" |
9 | PV = "0.0.0+git${SRCPV}" | 9 | PV = "0.0.0+git${SRCPV}" |
10 | LICENSE = "BSD-2-Clause-Patent" | 10 | LICENSE = "BSD-2-Clause-Patent" |
11 | LIC_FILES_CHKSUM = "file://LICENSE;md5=ef7fba7be2819ac13aaf5d0f842ce5d9" | 11 | LIC_FILES_CHKSUM = "file://LICENSE;md5=ef7fba7be2819ac13aaf5d0f842ce5d9" |
diff --git a/recipes-graphics/gmmlib/gmmlib_22.1.2.bb b/recipes-graphics/gmmlib/gmmlib_22.7.1.bb index 0fd9c326..d61a2fa1 100644 --- a/recipes-graphics/gmmlib/gmmlib_22.1.2.bb +++ b/recipes-graphics/gmmlib/gmmlib_22.7.1.bb | |||
@@ -10,9 +10,7 @@ SRC_URI = " \ | |||
10 | git://github.com/intel/gmmlib.git;protocol=https;branch=master \ | 10 | git://github.com/intel/gmmlib.git;protocol=https;branch=master \ |
11 | " | 11 | " |
12 | 12 | ||
13 | SRCREV = "29152fc6d39f87983b176664f225d42af039f716" | 13 | SRCREV = "aa4e5d6c8f1d798b78ffd7ea85296fdd3a3946b2" |
14 | |||
15 | S = "${WORKDIR}/git" | ||
16 | 14 | ||
17 | COMPATIBLE_HOST:x86-x32 = "null" | 15 | COMPATIBLE_HOST:x86-x32 = "null" |
18 | 16 | ||
diff --git a/recipes-graphics/hdcp/hdcp/0001-main-fix-hdcpd-service-failure.patch b/recipes-graphics/hdcp/hdcp/0001-main-fix-hdcpd-service-failure.patch index f07d466f..6d32da43 100644 --- a/recipes-graphics/hdcp/hdcp/0001-main-fix-hdcpd-service-failure.patch +++ b/recipes-graphics/hdcp/hdcp/0001-main-fix-hdcpd-service-failure.patch | |||
@@ -9,7 +9,7 @@ exits, which causing hdcpd service failure. | |||
9 | Added wait function to block parent process | 9 | Added wait function to block parent process |
10 | until child process exits. | 10 | until child process exits. |
11 | 11 | ||
12 | Upstream-Status: Submitted[https://github.com/intel/hdcp/pull/17] | 12 | Upstream-Status: Submitted [https://github.com/intel/hdcp/pull/17] |
13 | 13 | ||
14 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | 14 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> |
15 | --- | 15 | --- |
diff --git a/recipes-graphics/hdcp/hdcp_21.2.0.bb b/recipes-graphics/hdcp/hdcp_21.2.0.bb index 8529b5ab..f45dea02 100644 --- a/recipes-graphics/hdcp/hdcp_21.2.0.bb +++ b/recipes-graphics/hdcp/hdcp_21.2.0.bb | |||
@@ -13,7 +13,6 @@ SRC_URI = "git://github.com/intel/hdcp.git;branch=master;protocol=https \ | |||
13 | file://0001-main-fix-hdcpd-service-failure.patch \ | 13 | file://0001-main-fix-hdcpd-service-failure.patch \ |
14 | " | 14 | " |
15 | SRCREV = "cacc352159c5bdaf1c21846cecdd1eb7b031e1d3" | 15 | SRCREV = "cacc352159c5bdaf1c21846cecdd1eb7b031e1d3" |
16 | S = "${WORKDIR}/git" | ||
17 | 16 | ||
18 | REQUIRED_DISTRO_FEATURES = "systemd" | 17 | REQUIRED_DISTRO_FEATURES = "systemd" |
19 | 18 | ||
diff --git a/recipes-graphics/libva/libva-intel-utils_2.14.0.bb b/recipes-graphics/libva/libva-intel-utils_2.22.0.bb index ae9eba3b..041ea1ed 100644 --- a/recipes-graphics/libva/libva-intel-utils_2.14.0.bb +++ b/recipes-graphics/libva/libva-intel-utils_2.22.0.bb | |||
@@ -14,9 +14,8 @@ SECTION = "x11" | |||
14 | LICENSE = "MIT" | 14 | LICENSE = "MIT" |
15 | LIC_FILES_CHKSUM = "file://COPYING;md5=b148fc8adf19dc9aec17cf9cd29a9a5e" | 15 | LIC_FILES_CHKSUM = "file://COPYING;md5=b148fc8adf19dc9aec17cf9cd29a9a5e" |
16 | 16 | ||
17 | SRC_URI = "git://github.com/intel/libva-utils.git;branch=v2.14-branch;protocol=https" | 17 | SRC_URI = "git://github.com/intel/libva-utils.git;branch=v2.22-branch;protocol=https" |
18 | SRCREV = "f478fe4f9b66a19ac7ebc952223025f8771b2aba" | 18 | SRCREV = "1a13ae13382b7b548f3a7e8035e1d7df66662c0a" |
19 | S = "${WORKDIR}/git" | ||
20 | 19 | ||
21 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))" | 20 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))" |
22 | 21 | ||
diff --git a/recipes-graphics/libva/libva-intel_2.14.0.bb b/recipes-graphics/libva/libva-intel_2.22.0.bb index a08ccb27..b6b1f6ed 100644 --- a/recipes-graphics/libva/libva-intel_2.14.0.bb +++ b/recipes-graphics/libva/libva-intel_2.22.0.bb | |||
@@ -17,10 +17,10 @@ SECTION = "x11" | |||
17 | LICENSE = "MIT" | 17 | LICENSE = "MIT" |
18 | LIC_FILES_CHKSUM = "file://COPYING;md5=2e48940f94acb0af582e5ef03537800f" | 18 | LIC_FILES_CHKSUM = "file://COPYING;md5=2e48940f94acb0af582e5ef03537800f" |
19 | 19 | ||
20 | SRC_URI = "https://github.com/intel/libva/releases/download/${PV}/libva-${PV}.tar.bz2" | 20 | SRC_URI = "git://github.com/intel/libva.git;protocol=https;branch=v2.22-branch \ |
21 | SRC_URI[sha256sum] = "511e9a74d1ccfb548bc192290603082c11074ac59b17aadfd5d56a3f93e58454" | 21 | " |
22 | 22 | ||
23 | S = "${WORKDIR}/libva-${PV}" | 23 | SRCREV = "217da1c28336d6a7e9c0c4cb8f1c303968a675f1" |
24 | 24 | ||
25 | UPSTREAM_CHECK_URI = "https://github.com/intel/libva/releases" | 25 | UPSTREAM_CHECK_URI = "https://github.com/intel/libva/releases" |
26 | 26 | ||
diff --git a/recipes-graphics/metrics-discovery/metrics-discovery/0001-md_internal.h-Replace-string.h-with-string-C-header-.patch b/recipes-graphics/metrics-discovery/metrics-discovery/0001-md_internal.h-Replace-string.h-with-string-C-header-.patch deleted file mode 100644 index d97c6543..00000000 --- a/recipes-graphics/metrics-discovery/metrics-discovery/0001-md_internal.h-Replace-string.h-with-string-C-header-.patch +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | From 8c11096a0e5cf980309692ae3e272108da5f2b4e Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 9 Oct 2019 11:36:56 -0700 | ||
4 | Subject: [PATCH] md_internal.h: Replace string.h with <string> C++ header API | ||
5 | |||
6 | This helps in compiling with libc++/Clang | ||
7 | Fixes | ||
8 | usr/include/c++/v1/type_traits:1561:38: error: implicit instantiation of undefined template 'std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >' | ||
9 | : public integral_constant<bool, __is_empty(_Tp)> {}; | ||
10 | ^ | ||
11 | |||
12 | Upstream-Status: Submitted [https://github.com/intel/metrics-discovery/pull/14] | ||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | instrumentation/metrics_discovery/common/md_internal.cpp | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/instrumentation/metrics_discovery/common/md_internal.cpp b/instrumentation/metrics_discovery/common/md_internal.cpp | ||
19 | index f9571ac..0767e81 100644 | ||
20 | --- a/instrumentation/metrics_discovery/common/md_internal.cpp | ||
21 | +++ b/instrumentation/metrics_discovery/common/md_internal.cpp | ||
22 | @@ -27,8 +27,8 @@ | ||
23 | \*****************************************************************************/ | ||
24 | #include "md_internal.h" | ||
25 | |||
26 | -#include <string.h> | ||
27 | #include <stdlib.h> | ||
28 | +#include <string> | ||
29 | #include <new> | ||
30 | #include <unordered_map> | ||
31 | |||
32 | -- | ||
33 | 2.23.0 | ||
34 | |||
diff --git a/recipes-graphics/metrics-discovery/metrics-discovery_1.5.108.bb b/recipes-graphics/metrics-discovery/metrics-discovery_1.13.178.bb index dd6dc1d5..decac761 100644 --- a/recipes-graphics/metrics-discovery/metrics-discovery_1.5.108.bb +++ b/recipes-graphics/metrics-discovery/metrics-discovery_1.13.178.bb | |||
@@ -2,15 +2,13 @@ SUMMARY = "Intel Metrics Discovery Application Programming Interface" | |||
2 | DESCRIPTION = "This software is a user mode library that provides access to \ | 2 | DESCRIPTION = "This software is a user mode library that provides access to \ |
3 | GPU performance data." | 3 | GPU performance data." |
4 | LICENSE = "MIT" | 4 | LICENSE = "MIT" |
5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=8c5c9ac8ffd04a5614befdf63fba6ba8" | 5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=195912d57508b573e068231099eba64c" |
6 | SECTION = "lib" | 6 | SECTION = "lib" |
7 | 7 | ||
8 | inherit pkgconfig cmake | 8 | inherit pkgconfig cmake |
9 | 9 | ||
10 | S = "${WORKDIR}/git" | 10 | SRCREV = "65ffef89cf79d704f618768bcd3d95f4dd6d875b" |
11 | SRCREV = "a495db4682b7318bc82b1cccfb17fafdf2e3a2ff" | ||
12 | SRC_URI = "git://github.com/intel/metrics-discovery.git;branch=master;protocol=https \ | 11 | SRC_URI = "git://github.com/intel/metrics-discovery.git;branch=master;protocol=https \ |
13 | file://0001-md_internal.h-Replace-string.h-with-string-C-header-.patch \ | ||
14 | " | 12 | " |
15 | 13 | ||
16 | EXTRA_OECMAKE += "-DMD_PLATFORM=linux" | 14 | EXTRA_OECMAKE += "-DMD_PLATFORM=linux" |
diff --git a/recipes-graphics/xorg-driver/xf86-video-ast_1.1.5.bb b/recipes-graphics/xorg-driver/xf86-video-ast_1.1.6.bb index 090efd62..d7e4eab4 100644 --- a/recipes-graphics/xorg-driver/xf86-video-ast_1.1.5.bb +++ b/recipes-graphics/xorg-driver/xf86-video-ast_1.1.6.bb | |||
@@ -7,6 +7,6 @@ DESCRIPTION = "ast is an Xorg driver for ASpeed Technologies video cards" | |||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=0b8c242f0218eea5caa949b7910a774b" | 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=0b8c242f0218eea5caa949b7910a774b" |
8 | 8 | ||
9 | DEPENDS += "libpciaccess" | 9 | DEPENDS += "libpciaccess" |
10 | XORG_DRIVER_COMPRESSOR = ".tar.gz" | ||
10 | 11 | ||
11 | SRC_URI[md5sum] = "4f85febe48d51e53624550a96fc9e9ee" | 12 | SRC_URI[sha256sum] = "eeff52178ce2916a0e07b531bb23c8b105826b6e6e6c5f7c90e33f757827a7c7" |
12 | SRC_URI[sha256sum] = "1edbbc55d47d3fd71dec99b15c2483e22738c642623a0fb86ef4a81a9067a2de" | ||
diff --git a/recipes-kernel/intel-ethernet/ixgbe_5.15.2.bb b/recipes-kernel/intel-ethernet/ixgbe_5.20.10.bb index b1280213..696c5c26 100644 --- a/recipes-kernel/intel-ethernet/ixgbe_5.15.2.bb +++ b/recipes-kernel/intel-ethernet/ixgbe_5.20.10.bb | |||
@@ -1,5 +1,5 @@ | |||
1 | SUMMARY="ixgbe kernel driver for Intel Magnolia Park 10GbE" | 1 | SUMMARY = "ixgbe kernel driver for Intel Magnolia Park 10GbE" |
2 | DESCRIPTION="The ixgbe driver supports 82598- and 82599-based \ | 2 | DESCRIPTION = "The ixgbe driver supports 82598- and 82599-based \ |
3 | PCI Express* 10 Gigabit Network Connections." | 3 | PCI Express* 10 Gigabit Network Connections." |
4 | 4 | ||
5 | HOMEPAGE = "https://sourceforge.net/projects/e1000/" | 5 | HOMEPAGE = "https://sourceforge.net/projects/e1000/" |
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://${WORKDIR}/${BP}/COPYING;md5=a216b4192dc6b777b6f0db56 | |||
10 | SRC_URI = "https://sourceforge.net/projects/e1000/files/ixgbe%20stable/${PV}/${BP}.tar.gz \ | 10 | SRC_URI = "https://sourceforge.net/projects/e1000/files/ixgbe%20stable/${PV}/${BP}.tar.gz \ |
11 | " | 11 | " |
12 | 12 | ||
13 | SRC_URI[sha256sum] = "ca31fa581d6ddabee706b01fc59a5bbb841291fc0a392183adc9a80796eb9d04" | 13 | SRC_URI[sha256sum] = "da7e7b62ffb85a820d7541623fbef5c4abef8d1df7ac0af3f1acc3b3d76c9822" |
14 | 14 | ||
15 | UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/e1000/files/ixgbe%20stable/" | 15 | UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/e1000/files/ixgbe%20stable/" |
16 | UPSTREAM_CHECK_REGEX = "ixgbe%20stable/(?P<pver>\d+(\.\d+)+)/" | 16 | UPSTREAM_CHECK_REGEX = "ixgbe%20stable/(?P<pver>\d+(\.\d+)+)/" |
@@ -19,7 +19,7 @@ CVE_PRODUCT = "linux:linux_kernel_ixgbe" | |||
19 | 19 | ||
20 | S = "${WORKDIR}/${BP}/src" | 20 | S = "${WORKDIR}/${BP}/src" |
21 | 21 | ||
22 | EXTRA_OEMAKE='KSRC="${STAGING_KERNEL_BUILDDIR}" KVER="${KERNEL_VERSION}" INSTALL_MOD_PATH="${D}"' | 22 | EXTRA_OEMAKE = ' KSRC="${STAGING_KERNEL_DIR}" KOBJ="${STAGING_KERNEL_BUILDDIR}" KVER="${KERNEL_VERSION}" INSTALL_MOD_PATH="${D}"' |
23 | 23 | ||
24 | KERNEL_MODULE_AUTOLOAD:append:intel-core2-32 = " ixgbe" | 24 | KERNEL_MODULE_AUTOLOAD:append:intel-core2-32 = " ixgbe" |
25 | KERNEL_MODULE_AUTOLOAD:append:intel-corei7-64 = " ixgbe" | 25 | KERNEL_MODULE_AUTOLOAD:append:intel-corei7-64 = " ixgbe" |
@@ -40,5 +40,4 @@ FILES:${PN}-script += "${sysconfdir}/network/set_irq_affinity" | |||
40 | 40 | ||
41 | EXCLUDE_FROM_WORLD = "1" | 41 | EXCLUDE_FROM_WORLD = "1" |
42 | 42 | ||
43 | # This was fixed in kernel v4.4 | 43 | CVE_STATUS[CVE-2015-1142857] = "fixed-version: Fixed from version 4.4-rc1" |
44 | CVE_CHECK_IGNORE += "CVE-2015-1142857" | ||
diff --git a/recipes-kernel/intel-ethernet/ixgbevf_4.15.1.bb b/recipes-kernel/intel-ethernet/ixgbevf_4.19.10.bb index 469195ab..92e25739 100644 --- a/recipes-kernel/intel-ethernet/ixgbevf_4.15.1.bb +++ b/recipes-kernel/intel-ethernet/ixgbevf_4.19.10.bb | |||
@@ -1,5 +1,5 @@ | |||
1 | SUMMARY="ixgbevf kernel driver for Intel Magnolia Park 10GbE" | 1 | SUMMARY = "ixgbevf kernel driver for Intel Magnolia Park 10GbE" |
2 | DESCRIPTION="This virtual function driver supports kernel versions 2.6.x and newer \ | 2 | DESCRIPTION = "This virtual function driver supports kernel versions 2.6.x and newer \ |
3 | This driver supports 82599, X540, X550, and X552-based virtual function devices \ | 3 | This driver supports 82599, X540, X550, and X552-based virtual function devices \ |
4 | that can only be activated on kernels that support SR-IOV. \ | 4 | that can only be activated on kernels that support SR-IOV. \ |
5 | SR-IOV requires the correct platform and OS support. \ | 5 | SR-IOV requires the correct platform and OS support. \ |
@@ -13,7 +13,7 @@ LIC_FILES_CHKSUM = "file://${WORKDIR}/${BP}/COPYING;md5=a216b4192dc6b777b6f0db56 | |||
13 | SRC_URI = "https://sourceforge.net/projects/e1000/files/ixgbevf%20stable/${PV}/${BP}.tar.gz \ | 13 | SRC_URI = "https://sourceforge.net/projects/e1000/files/ixgbevf%20stable/${PV}/${BP}.tar.gz \ |
14 | " | 14 | " |
15 | 15 | ||
16 | SRC_URI[sha256sum] = "851f595fe662ac08abe125843aadb1e7c45b3fcd4d6223583a033f84b821832e" | 16 | SRC_URI[sha256sum] = "73c6a27be324a48b069dbda0d1d07212a2214c71f54df57bca7177fc92b04881" |
17 | 17 | ||
18 | UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/e1000/files/ixgbevf%20stable/" | 18 | UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/e1000/files/ixgbevf%20stable/" |
19 | UPSTREAM_CHECK_REGEX = "ixgbevf%20stable/(?P<pver>\d+(\.\d+)+)/" | 19 | UPSTREAM_CHECK_REGEX = "ixgbevf%20stable/(?P<pver>\d+(\.\d+)+)/" |
@@ -22,7 +22,7 @@ CVE_PRODUCT = "linux:linux_kernel_ixgbe" | |||
22 | 22 | ||
23 | S = "${WORKDIR}/${BP}/src" | 23 | S = "${WORKDIR}/${BP}/src" |
24 | 24 | ||
25 | EXTRA_OEMAKE='KSRC="${STAGING_KERNEL_BUILDDIR}" KVER="${KERNEL_VERSION}" INSTALL_MOD_PATH="${D}"' | 25 | EXTRA_OEMAKE = 'KSRC="${STAGING_KERNEL_DIR}" KOBJ="${STAGING_KERNEL_BUILDDIR}" KVER="${KERNEL_VERSION}" INSTALL_MOD_PATH="${D}"' |
26 | 26 | ||
27 | KERNEL_MODULE_AUTOLOAD:append:intel-core2-32 = " ixgbevf" | 27 | KERNEL_MODULE_AUTOLOAD:append:intel-core2-32 = " ixgbevf" |
28 | KERNEL_MODULE_AUTOLOAD:append:intel-corei7-64 = " ixgbevf" | 28 | KERNEL_MODULE_AUTOLOAD:append:intel-corei7-64 = " ixgbevf" |
@@ -41,7 +41,6 @@ PACKAGES += "${PN}-script" | |||
41 | 41 | ||
42 | FILES:${PN}-script += "${sysconfdir}/network/set_irq_affinity" | 42 | FILES:${PN}-script += "${sysconfdir}/network/set_irq_affinity" |
43 | 43 | ||
44 | # This was fixed in kernel v4.4 | 44 | CVE_STATUS[CVE-2015-1142857] = "fixed-version: Fixed from version 4.4-rc1" |
45 | CVE_CHECK_IGNORE += "CVE-2015-1142857" | ||
46 | 45 | ||
47 | EXCLUDE_FROM_WORLD = "1" | 46 | EXCLUDE_FROM_WORLD = "1" |
diff --git a/recipes-kernel/iwlwifi/backport-iwlwifi_git.bb b/recipes-kernel/iwlwifi/backport-iwlwifi_git.bb index 7f2a9f5c..7aaf22c2 100644 --- a/recipes-kernel/iwlwifi/backport-iwlwifi_git.bb +++ b/recipes-kernel/iwlwifi/backport-iwlwifi_git.bb | |||
@@ -5,9 +5,9 @@ LICENSE = "GPL-2.0-only" | |||
5 | 5 | ||
6 | REQUIRED_DISTRO_FEATURES = "wifi" | 6 | REQUIRED_DISTRO_FEATURES = "wifi" |
7 | 7 | ||
8 | LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" | 8 | LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" |
9 | 9 | ||
10 | inherit module | 10 | inherit module features_check |
11 | 11 | ||
12 | # For some iwfwifi LinuxCore supported wireless chips, the best/latest | 12 | # For some iwfwifi LinuxCore supported wireless chips, the best/latest |
13 | # firmware blobs are found in the iwlwifi's linux-firmware.git fork. | 13 | # firmware blobs are found in the iwlwifi's linux-firmware.git fork. |
@@ -17,8 +17,8 @@ inherit module | |||
17 | # When updating this recipe, ensure that the proper firmware is included from | 17 | # When updating this recipe, ensure that the proper firmware is included from |
18 | # either the linux-firmware or iwlwifi-firmware repos. | 18 | # either the linux-firmware or iwlwifi-firmware repos. |
19 | 19 | ||
20 | PV = "45" | 20 | PV = "79" |
21 | SRCREV = "a75c1de6b3fa87885556c67619429cfa87cc048f" | 21 | SRCREV = "574631d89d736fd2c76b0e2ea489270c50903e52" |
22 | 22 | ||
23 | SRC_URI = " \ | 23 | SRC_URI = " \ |
24 | git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi;branch=release/core${PV} \ | 24 | git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi;branch=release/core${PV} \ |
@@ -34,7 +34,7 @@ do_configure() { | |||
34 | CC=gcc CFLAGS= LDFLAGS= make defconfig-iwlwifi-public KLIB_BUILD=${KBUILD_OUTPUT} | 34 | CC=gcc CFLAGS= LDFLAGS= make defconfig-iwlwifi-public KLIB_BUILD=${KBUILD_OUTPUT} |
35 | } | 35 | } |
36 | 36 | ||
37 | MODULES_INSTALL_TARGET="install" | 37 | MODULES_INSTALL_TARGET = "install" |
38 | 38 | ||
39 | do_install:append() { | 39 | do_install:append() { |
40 | ## install configs and service scripts | 40 | ## install configs and service scripts |
@@ -44,6 +44,8 @@ do_install:append() { | |||
44 | 44 | ||
45 | RDEPENDS:${PN} = "linux-firmware-iwlwifi" | 45 | RDEPENDS:${PN} = "linux-firmware-iwlwifi" |
46 | 46 | ||
47 | FILES:${PN} += "${sysconfdir}/modprobe.d/iwlwifi.conf" | ||
48 | |||
47 | KERNEL_MODULE_AUTOLOAD:append:core2-32-intel-common = " iwlwifi" | 49 | KERNEL_MODULE_AUTOLOAD:append:core2-32-intel-common = " iwlwifi" |
48 | KERNEL_MODULE_AUTOLOAD:append:corei7-64-intel-common = " iwlwifi" | 50 | KERNEL_MODULE_AUTOLOAD:append:corei7-64-intel-common = " iwlwifi" |
49 | 51 | ||
diff --git a/recipes-kernel/linux/linux-intel-dev.bb b/recipes-kernel/linux/linux-intel-dev.bb deleted file mode 100644 index b8256fcc..00000000 --- a/recipes-kernel/linux/linux-intel-dev.bb +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | require recipes-kernel/linux/linux-yocto.inc | ||
2 | require recipes-kernel/linux/meta-intel-compat-kernel.inc | ||
3 | |||
4 | FILESEXTRAPATHS:prepend := "${THISDIR}/linux-intel:" | ||
5 | |||
6 | SRC_URI = " \ | ||
7 | git://github.com/intel/mainline-tracking.git;protocol=https;name=machine;nobranch=1; \ | ||
8 | git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=${KMETA_BRANCH};destsuffix=${KMETA} \ | ||
9 | file://0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-.patch \ | ||
10 | " | ||
11 | |||
12 | KMETA = "kernel-meta" | ||
13 | KCONF_BSP_AUDIT_LEVEL = "2" | ||
14 | |||
15 | KMETA_BRANCH = "master" | ||
16 | |||
17 | LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" | ||
18 | |||
19 | DEPENDS += "elfutils-native openssl-native util-linux-native" | ||
20 | |||
21 | LINUX_VERSION ?= "5.12.0" | ||
22 | SRCREV_machine ?= "9f4ad9e425a1d3b6a34617b8ea226d56a119a717" | ||
23 | SRCREV_meta ?= "99570241ac88d6c7e32b6fccd83afce53816b275" | ||
24 | |||
25 | LINUX_VERSION_EXTENSION ?= "-mainline-tracking-${LINUX_KERNEL_TYPE}" | ||
26 | PV = "${LINUX_VERSION}+git${SRCPV}" | ||
27 | |||
28 | COMPATIBLE_MACHINE ?= "(intel-corei7-64)" | ||
29 | |||
30 | # Functionality flags | ||
31 | KERNEL_FEATURES:append = " ${KERNEL_EXTRA_FEATURES}" | ||
32 | KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/security/security.scc" | ||
diff --git a/recipes-kernel/linux/linux-intel-rt_5.15.bb b/recipes-kernel/linux/linux-intel-rt_5.15.bb deleted file mode 100644 index 73903a5c..00000000 --- a/recipes-kernel/linux/linux-intel-rt_5.15.bb +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | require linux-intel.inc | ||
2 | |||
3 | # Skip processing of this recipe if it is not explicitly specified as the | ||
4 | # PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying | ||
5 | # to build multiple virtual/kernel providers, e.g. as dependency of | ||
6 | # core-image-rt-sdk, core-image-rt. | ||
7 | python () { | ||
8 | if d.getVar("KERNEL_PACKAGE_NAME", True) == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-intel-rt": | ||
9 | raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-intel-rt to enable it") | ||
10 | } | ||
11 | |||
12 | LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" | ||
13 | SRC_URI:append = " file://0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-.patch \ | ||
14 | " | ||
15 | |||
16 | KBRANCH = "5.15/preempt-rt" | ||
17 | KMETA_BRANCH = "yocto-5.15" | ||
18 | |||
19 | DEPENDS += "elfutils-native openssl-native util-linux-native" | ||
20 | |||
21 | LINUX_VERSION ?= "5.15.43" | ||
22 | SRCREV_machine ?= "9800b6da3fbf306dd172f2848423e5cc4060b604" | ||
23 | SRCREV_meta ?= "ea948a0983d7b7820814e5bce4eda3079201bd95" | ||
24 | |||
25 | LINUX_KERNEL_TYPE = "preempt-rt" | ||
diff --git a/recipes-kernel/linux/linux-intel-rt_6.12.bb b/recipes-kernel/linux/linux-intel-rt_6.12.bb new file mode 100644 index 00000000..13b495d1 --- /dev/null +++ b/recipes-kernel/linux/linux-intel-rt_6.12.bb | |||
@@ -0,0 +1,35 @@ | |||
1 | require linux-intel.inc | ||
2 | |||
3 | SRC_URI:prepend = "git://github.com/intel/linux-intel-lts.git;protocol=https;name=machine;branch=${KBRANCH}; \ | ||
4 | " | ||
5 | SRC_URI:append = " file://0001-6.12-lib-build_OID_registry-fix-reproducibility-issues.patch \ | ||
6 | " | ||
7 | |||
8 | # Skip processing of this recipe if it is not explicitly specified as the | ||
9 | # PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying | ||
10 | # to build multiple virtual/kernel providers, e.g. as dependency of | ||
11 | # core-image-rt-sdk, core-image-rt. | ||
12 | python () { | ||
13 | if d.getVar("KERNEL_PACKAGE_NAME", True) == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-intel-rt": | ||
14 | raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-intel-rt to enable it") | ||
15 | } | ||
16 | |||
17 | KBRANCH = "6.12/linux" | ||
18 | KMETA_BRANCH = "yocto-6.12" | ||
19 | |||
20 | LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" | ||
21 | |||
22 | DEPENDS += "elfutils-native openssl-native util-linux-native" | ||
23 | |||
24 | LINUX_VERSION_EXTENSION ??= "-intel-pk-${LINUX_KERNEL_TYPE}" | ||
25 | |||
26 | LINUX_VERSION ?= "6.12.27" | ||
27 | SRCREV_machine ?= "9e2f92c31c6353101755c83670232c94e0c07ddc" | ||
28 | SRCREV_meta ?= "da71eb19ceab34a7a6ff4284f1580e043c870168" | ||
29 | |||
30 | LINUX_KERNEL_TYPE = "preempt-rt" | ||
31 | |||
32 | # Functionality flags | ||
33 | KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/security/security.scc" | ||
34 | |||
35 | UPSTREAM_CHECK_GITTAGREGEX = "^lts-(?P<pver>v6.12.(\d+)-linux-(\d+)T(\d+)Z)$" | ||
diff --git a/recipes-kernel/linux/linux-intel.inc b/recipes-kernel/linux/linux-intel.inc index 97daba5e..c698ae28 100644 --- a/recipes-kernel/linux/linux-intel.inc +++ b/recipes-kernel/linux/linux-intel.inc | |||
@@ -3,19 +3,19 @@ require recipes-kernel/linux/meta-intel-compat-kernel.inc | |||
3 | 3 | ||
4 | FILESEXTRAPATHS:prepend := "${THISDIR}/linux-intel:" | 4 | FILESEXTRAPATHS:prepend := "${THISDIR}/linux-intel:" |
5 | 5 | ||
6 | KERNEL_CONFIG_URI ?= "git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=${KMETA_BRANCH};destsuffix=${KMETA}" | 6 | KERNEL_CONFIG_URI ?= "git://git.yoctoproject.org/yocto-kernel-cache;protocol=https;type=kmeta;name=meta;branch=${KMETA_BRANCH};destsuffix=${KMETA}" |
7 | 7 | ||
8 | SRC_URI = " \ | 8 | SRC_URI = " \ |
9 | git://github.com/intel/linux-intel-lts.git;protocol=https;name=machine;branch=${KBRANCH}; \ | ||
10 | ${KERNEL_CONFIG_URI} \ | 9 | ${KERNEL_CONFIG_URI} \ |
10 | file://fix-perf-reproducibility.patch \ | ||
11 | file://0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-.patch \ | ||
12 | file://0002-mconf-fix-output-of-cflags-and-libraries.patch \ | ||
11 | " | 13 | " |
12 | 14 | ||
13 | LINUX_VERSION_EXTENSION ??= "-intel-pk-${LINUX_KERNEL_TYPE}" | ||
14 | |||
15 | PV = "${LINUX_VERSION}+git${SRCPV}" | 15 | PV = "${LINUX_VERSION}+git${SRCPV}" |
16 | 16 | ||
17 | KMETA = "kernel-meta" | 17 | KMETA = "kernel-meta" |
18 | KCONF_BSP_AUDIT_LEVEL = "2" | 18 | KCONF_BSP_AUDIT_LEVEL = "0" |
19 | 19 | ||
20 | COMPATIBLE_MACHINE ?= "(intel-corei7-64)" | 20 | COMPATIBLE_MACHINE ?= "(intel-corei7-64)" |
21 | 21 | ||
diff --git a/recipes-kernel/linux/linux-intel/0001-6.12-lib-build_OID_registry-fix-reproducibility-issues.patch b/recipes-kernel/linux/linux-intel/0001-6.12-lib-build_OID_registry-fix-reproducibility-issues.patch new file mode 100644 index 00000000..df2a4139 --- /dev/null +++ b/recipes-kernel/linux/linux-intel/0001-6.12-lib-build_OID_registry-fix-reproducibility-issues.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From 4881d0f985aab70c685bd63b56a2d6ad5e790abc Mon Sep 17 00:00:00 2001 | ||
2 | From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
3 | Date: Sun, 10 Jul 2022 22:56:53 -0400 | ||
4 | Subject: [PATCH] lib/build_OID_registry: fix reproducibility issues | ||
5 | |||
6 | The script build_OID_registry captures the full path of itself | ||
7 | in the generated data. This causes reproduciblity issues as the | ||
8 | path is captured and packaged. | ||
9 | |||
10 | We use the basename of the script instead, and that allows us | ||
11 | to be reprodicible, with slightly less information captured in | ||
12 | the output data (but the generating script can still easily | ||
13 | be found). | ||
14 | |||
15 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
16 | Upstream-Status: Inappropriate | ||
17 | |||
18 | Taken from linux-yocto, v5.15/standard/base. | ||
19 | |||
20 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
21 | --- | ||
22 | lib/build_OID_registry | 3 ++- | ||
23 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
24 | |||
25 | diff --git a/lib/build_OID_registry b/lib/build_OID_registry | ||
26 | index 8267e8d71338..755dd33a8b04 100755 | ||
27 | --- a/lib/build_OID_registry | ||
28 | +++ b/lib/build_OID_registry | ||
29 | @@ -9,6 +9,7 @@ | ||
30 | |||
31 | use strict; | ||
32 | use Cwd qw(abs_path); | ||
33 | +use File::Basename; | ||
34 | |||
35 | my @names = (); | ||
36 | my @oids = (); | ||
37 | @@ -40,7 +41,7 @@ open C_FILE, ">$ARGV[1]" or die; | ||
38 | print C_FILE "/*\n"; | ||
39 | my $scriptname = $0; | ||
40 | $scriptname =~ s#^\Q$abs_srctree/\E##; | ||
41 | -print C_FILE " * Automatically generated by ", $scriptname, ". Do not edit\n"; | ||
42 | +print C_FILE " * Automatically generated by ", basename $0, ". Do not edit\n"; | ||
43 | print C_FILE " */\n"; | ||
44 | |||
45 | # | ||
46 | -- | ||
47 | 2.34.1 | ||
48 | |||
diff --git a/recipes-kernel/linux/linux-intel/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-.patch b/recipes-kernel/linux/linux-intel/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-.patch index 3dc71ff2..a601e783 100644 --- a/recipes-kernel/linux/linux-intel/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-.patch +++ b/recipes-kernel/linux/linux-intel/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-.patch | |||
@@ -1,7 +1,8 @@ | |||
1 | From bebd63730a433ba62549a80114a9851328aa8897 Mon Sep 17 00:00:00 2001 | 1 | From 1811da09f42ca5e82282970e8ad014707bc94c82 Mon Sep 17 00:00:00 2001 |
2 | From: Bruce Ashfield <bruce.ashfield@windriver.com> | 2 | From: Bruce Ashfield <bruce.ashfield@windriver.com> |
3 | Date: Mon, 2 Jul 2018 23:10:28 -0400 | 3 | Date: Mon, 2 Jul 2018 23:10:28 -0400 |
4 | Subject: [PATCH] menuconfig,mconf-cfg: Allow specification of ncurses location | 4 | Subject: [PATCH 1/2] menuconfig,mconf-cfg: Allow specification of ncurses |
5 | location | ||
5 | 6 | ||
6 | In some cross build environments such as the Yocto Project build | 7 | In some cross build environments such as the Yocto Project build |
7 | environment it provides an ncurses library that is compiled | 8 | environment it provides an ncurses library that is compiled |
@@ -16,33 +17,36 @@ check-lxdialog.sh for environments such as the Yocto Project. Adding | |||
16 | a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing | 17 | a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing |
17 | compiling and linking against the right headers and libraries. | 18 | compiling and linking against the right headers and libraries. |
18 | 19 | ||
20 | Upstream-Status: Submitted | ||
21 | |||
19 | Signed-off-by: Jason Wessel <jason.wessel@windriver.com> | 22 | Signed-off-by: Jason Wessel <jason.wessel@windriver.com> |
20 | cc: Michal Marek <mmarek@suse.cz> | 23 | cc: Michal Marek <mmarek@suse.cz> |
21 | cc: linux-kbuild@vger.kernel.org | 24 | cc: linux-kbuild@vger.kernel.org |
22 | Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> | 25 | Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> |
26 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
23 | --- | 27 | --- |
24 | scripts/kconfig/mconf-cfg.sh | 8 ++++++++ | 28 | scripts/kconfig/mconf-cfg.sh | 8 ++++++++ |
25 | 1 file changed, 8 insertions(+) | 29 | 1 file changed, 8 insertions(+) |
26 | 30 | ||
27 | diff --git a/scripts/kconfig/mconf-cfg.sh b/scripts/kconfig/mconf-cfg.sh | 31 | diff --git a/scripts/kconfig/mconf-cfg.sh b/scripts/kconfig/mconf-cfg.sh |
28 | index c812872d7f9d..42d20819025c 100755 | 32 | index 1e61f50a5905..38cf8304bb31 100755 |
29 | --- a/scripts/kconfig/mconf-cfg.sh | 33 | --- a/scripts/kconfig/mconf-cfg.sh |
30 | +++ b/scripts/kconfig/mconf-cfg.sh | 34 | +++ b/scripts/kconfig/mconf-cfg.sh |
31 | @@ -4,6 +4,14 @@ | 35 | @@ -7,6 +7,14 @@ libs=$2 |
32 | PKG="ncursesw" | 36 | PKG="ncursesw" |
33 | PKG2="ncurses" | 37 | PKG2="ncurses" |
34 | 38 | ||
35 | +if [ "$CROSS_CURSES_LIB" != "" ]; then | 39 | +if [ "$CROSS_CURSES_LIB" != "" ]; then |
36 | + echo libs=\'$CROSS_CURSES_LIB\' | 40 | + echo libs=\'$CROSS_CURSES_LIB\' |
37 | + if [ x"$CROSS_CURSES_INC" != x ]; then | 41 | + if [ x"$CROSS_CURSES_INC" != x ]; then |
38 | + echo cflags=\'$CROSS_CURSES_INC\' | 42 | + echo cflags=\'$CROSS_CURSES_INC\' |
39 | + fi | 43 | + fi |
40 | + exit 0 | 44 | + exit 0 |
41 | +fi | 45 | +fi |
42 | + | 46 | + |
43 | if [ -n "$(command -v pkg-config)" ]; then | 47 | if [ -n "$(command -v ${HOSTPKG_CONFIG})" ]; then |
44 | if pkg-config --exists $PKG; then | 48 | if ${HOSTPKG_CONFIG} --exists $PKG; then |
45 | echo cflags=\"$(pkg-config --cflags $PKG)\" | 49 | ${HOSTPKG_CONFIG} --cflags ${PKG} > ${cflags} |
46 | -- | 50 | -- |
47 | 2.17.1 | 51 | 2.34.1 |
48 | 52 | ||
diff --git a/recipes-kernel/linux/linux-intel/0002-mconf-fix-output-of-cflags-and-libraries.patch b/recipes-kernel/linux/linux-intel/0002-mconf-fix-output-of-cflags-and-libraries.patch new file mode 100644 index 00000000..a96b68d9 --- /dev/null +++ b/recipes-kernel/linux/linux-intel/0002-mconf-fix-output-of-cflags-and-libraries.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From 1b53d82a8152843afcddd7f16b0c43b6b4f22895 Mon Sep 17 00:00:00 2001 | ||
2 | From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
3 | Date: Mon, 17 Jul 2023 17:17:55 -0400 | ||
4 | Subject: [PATCH 2/2] mconf: fix output of cflags and libraries | ||
5 | |||
6 | commit 3122c84409d578a5df8bcb1 [kconfig: refactor Makefile to reduce | ||
7 | process forks] changes the way that flags are detected. They are | ||
8 | no longer just echo'd and captured, they are written to a file and | ||
9 | later read. | ||
10 | |||
11 | We adjust our CROSS ncurses patch accordingly. | ||
12 | |||
13 | We'll eventually be able to drop this patch, but not quite yet. | ||
14 | |||
15 | Upstream-Status: Inappropriate [OE-Specific] | ||
16 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
17 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
18 | --- | ||
19 | scripts/kconfig/mconf-cfg.sh | 4 ++-- | ||
20 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
21 | |||
22 | diff --git a/scripts/kconfig/mconf-cfg.sh b/scripts/kconfig/mconf-cfg.sh | ||
23 | index 38cf8304bb31..a5ae56e08b07 100755 | ||
24 | --- a/scripts/kconfig/mconf-cfg.sh | ||
25 | +++ b/scripts/kconfig/mconf-cfg.sh | ||
26 | @@ -8,9 +8,9 @@ PKG="ncursesw" | ||
27 | PKG2="ncurses" | ||
28 | |||
29 | if [ "$CROSS_CURSES_LIB" != "" ]; then | ||
30 | - echo libs=\'$CROSS_CURSES_LIB\' | ||
31 | + echo $CROSS_CURSES_LIB > ${libs} | ||
32 | if [ x"$CROSS_CURSES_INC" != x ]; then | ||
33 | - echo cflags=\'$CROSS_CURSES_INC\' | ||
34 | + echo $CROSS_CURSES_INC > ${cflags} | ||
35 | fi | ||
36 | exit 0 | ||
37 | fi | ||
38 | -- | ||
39 | 2.34.1 | ||
40 | |||
diff --git a/recipes-kernel/linux/linux-intel/fix-perf-reproducibility.patch b/recipes-kernel/linux/linux-intel/fix-perf-reproducibility.patch new file mode 100644 index 00000000..1a98b1db --- /dev/null +++ b/recipes-kernel/linux/linux-intel/fix-perf-reproducibility.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From b8cd0e429bf75b673c438a8277d4bc74327df992 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tom Zanussi <tom.zanussi@intel.com> | ||
3 | Date: Tue, 3 Jul 2012 13:07:23 -0500 | ||
4 | Subject: perf: change --root to --prefix for python install | ||
5 | |||
6 | Otherwise we get the sysroot path appended to the build path, not what | ||
7 | we want. | ||
8 | |||
9 | Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> | ||
10 | |||
11 | Upstream-Status: Inappropriate | ||
12 | |||
13 | Taken from linux-yocto, v5.15/standard/base | ||
14 | https://git.yoctoproject.org/linux-yocto/commit?id=b8cd0e429bf75b673c438a8277d4bc74327df992&h=v5.15%2Fstandard%2Fbase | ||
15 | |||
16 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
17 | --- | ||
18 | tools/perf/Makefile.perf | 2 +- | ||
19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
20 | |||
21 | (limited to 'tools/perf/Makefile.perf') | ||
22 | |||
23 | diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf | ||
24 | index 8f738e11356d..ee945d8e3996 100644 | ||
25 | --- a/tools/perf/Makefile.perf | ||
26 | +++ b/tools/perf/Makefile.perf | ||
27 | @@ -1022,7 +1022,7 @@ install-bin: install-tools install-tests install-traceevent-plugins | ||
28 | install: install-bin try-install-man | ||
29 | |||
30 | install-python_ext: | ||
31 | - $(PYTHON_WORD) util/setup.py --quiet install --root='/$(DESTDIR_SQ)' | ||
32 | + $(PYTHON_WORD) util/setup.py --quiet install --prefix='$(DESTDIR_SQ)/usr' | ||
33 | |||
34 | # 'make install-doc' should call 'make -C Documentation install' | ||
35 | $(INSTALL_DOC_TARGETS): | ||
36 | -- | ||
37 | cgit | ||
38 | |||
39 | |||
diff --git a/recipes-kernel/linux/linux-intel_5.15.bb b/recipes-kernel/linux/linux-intel_5.15.bb deleted file mode 100644 index 6a63e9f9..00000000 --- a/recipes-kernel/linux/linux-intel_5.15.bb +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | require linux-intel.inc | ||
2 | |||
3 | KBRANCH = "5.15/linux" | ||
4 | KMETA_BRANCH = "yocto-5.15" | ||
5 | |||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" | ||
7 | |||
8 | SRC_URI:append = " file://0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-.patch \ | ||
9 | " | ||
10 | |||
11 | DEPENDS += "elfutils-native openssl-native util-linux-native" | ||
12 | |||
13 | LINUX_VERSION ?= "5.15.43" | ||
14 | SRCREV_machine ?= "1ec5959a8f6dbfbb47057317bc935924cd8d6977" | ||
15 | SRCREV_meta ?= "ea948a0983d7b7820814e5bce4eda3079201bd95" | ||
16 | |||
17 | # Functionality flags | ||
18 | KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/security/security.scc" | ||
diff --git a/recipes-kernel/linux/linux-intel_6.12.bb b/recipes-kernel/linux/linux-intel_6.12.bb new file mode 100644 index 00000000..32b0b2e4 --- /dev/null +++ b/recipes-kernel/linux/linux-intel_6.12.bb | |||
@@ -0,0 +1,25 @@ | |||
1 | require linux-intel.inc | ||
2 | |||
3 | SRC_URI:prepend = "git://github.com/intel/linux-intel-lts.git;protocol=https;name=machine;branch=${KBRANCH}; \ | ||
4 | " | ||
5 | SRC_URI:append = " file://0001-6.12-lib-build_OID_registry-fix-reproducibility-issues.patch \ | ||
6 | " | ||
7 | KBRANCH = "6.12/linux" | ||
8 | KMETA_BRANCH = "yocto-6.12" | ||
9 | |||
10 | LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" | ||
11 | |||
12 | DEPENDS += "elfutils-native openssl-native util-linux-native" | ||
13 | |||
14 | LINUX_VERSION_EXTENSION ??= "-intel-pk-${LINUX_KERNEL_TYPE}" | ||
15 | |||
16 | LINUX_VERSION ?= "6.12.27" | ||
17 | SRCREV_machine ?= "9e2f92c31c6353101755c83670232c94e0c07ddc" | ||
18 | SRCREV_meta ?= "da71eb19ceab34a7a6ff4284f1580e043c870168" | ||
19 | |||
20 | # Functionality flags | ||
21 | KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc \ | ||
22 | features/security/security.scc \ | ||
23 | features/intel-npu/intel-npu.scc" | ||
24 | |||
25 | UPSTREAM_CHECK_GITTAGREGEX = "^lts-(?P<pver>v6.12.(\d+)-linux-(\d+)T(\d+)Z)$" | ||
diff --git a/recipes-kernel/linux/linux-yocto-rt_5.%.bbappend b/recipes-kernel/linux/linux-yocto-rt_%.bbappend index daa7dd6b..daa7dd6b 100644 --- a/recipes-kernel/linux/linux-yocto-rt_5.%.bbappend +++ b/recipes-kernel/linux/linux-yocto-rt_%.bbappend | |||
diff --git a/recipes-kernel/linux/linux-yocto_%.bbappend b/recipes-kernel/linux/linux-yocto_%.bbappend index 7657b02f..9f3d43e3 100644 --- a/recipes-kernel/linux/linux-yocto_%.bbappend +++ b/recipes-kernel/linux/linux-yocto_%.bbappend | |||
@@ -1,3 +1,5 @@ | |||
1 | require meta-intel-compat-kernel.inc | ||
2 | |||
1 | # The kernel build is 64-bit regardless, so include both common overrides. | 3 | # The kernel build is 64-bit regardless, so include both common overrides. |
2 | # Without this, the kernel will be missing vars that make it buildable for the | 4 | # Without this, the kernel will be missing vars that make it buildable for the |
3 | # intel-corei7-64 machine. | 5 | # intel-corei7-64 machine. |
diff --git a/recipes-kernel/linux/linux-yocto_5.%.bbappend b/recipes-kernel/linux/linux-yocto_5.%.bbappend deleted file mode 100644 index daa7dd6b..00000000 --- a/recipes-kernel/linux/linux-yocto_5.%.bbappend +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | require meta-intel-compat-kernel.inc | ||
diff --git a/recipes-kernel/linux/meta-intel-compat-kernel.inc b/recipes-kernel/linux/meta-intel-compat-kernel.inc index 41582aa5..0c861e13 100644 --- a/recipes-kernel/linux/meta-intel-compat-kernel.inc +++ b/recipes-kernel/linux/meta-intel-compat-kernel.inc | |||
@@ -8,7 +8,7 @@ KERNEL_FEATURES:intel-x86-common = "${KERNEL_FEATURES_INTEL_COMMON}" | |||
8 | 8 | ||
9 | KMACHINE:corei7-64-intel-common = "intel-corei7-64" | 9 | KMACHINE:corei7-64-intel-common = "intel-corei7-64" |
10 | KMACHINE:core2-32-intel-common = "intel-core2-32" | 10 | KMACHINE:core2-32-intel-common = "intel-core2-32" |
11 | KMACHINE:skylake-64-intel-common = "intel-corei7-64" | 11 | KMACHINE:x86-64-v3-intel-common = "intel-corei7-64" |
12 | 12 | ||
13 | INTEL_COMMON_AUTOLOAD ?= " uio iwlwifi i915" | 13 | INTEL_COMMON_AUTOLOAD ?= " uio iwlwifi i915" |
14 | KERNEL_MODULE_AUTOLOAD:intel-x86-common = " ${INTEL_COMMON_AUTOLOAD}" | 14 | KERNEL_MODULE_AUTOLOAD:intel-x86-common = " ${INTEL_COMMON_AUTOLOAD}" |
diff --git a/recipes-multimedia/itt/itt_3.23.0.bb b/recipes-multimedia/itt/itt_3.26.1.bb index 83ff3142..27b967f5 100644 --- a/recipes-multimedia/itt/itt_3.23.0.bb +++ b/recipes-multimedia/itt/itt_3.26.1.bb | |||
@@ -9,8 +9,7 @@ LIC_FILES_CHKSUM = "file://LICENSES/BSD-3-Clause.txt;md5=c551872bcf41ce707df54c7 | |||
9 | " | 9 | " |
10 | 10 | ||
11 | SRC_URI = "git://github.com/intel/ittapi.git;protocol=https;branch=master" | 11 | SRC_URI = "git://github.com/intel/ittapi.git;protocol=https;branch=master" |
12 | SRCREV = "96a01335dbc560b9224f52f0cc25c28ca0f1b564" | 12 | SRCREV = "e535d565c88e4407f044719e2e9ec70c0b023d23" |
13 | S = "${WORKDIR}/git" | ||
14 | PE = "1" | 13 | PE = "1" |
15 | 14 | ||
16 | UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>(\d+(\.\d+)+))$" | 15 | UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>(\d+(\.\d+)+))$" |
@@ -28,12 +27,6 @@ do_install() { | |||
28 | cp -r ${S}/include/* ${D}${includedir}/ittnotify | 27 | cp -r ${S}/include/* ${D}${includedir}/ittnotify |
29 | cp -r ${S}/src/ittnotify/*.h ${D}${includedir}/ittnotify | 28 | cp -r ${S}/src/ittnotify/*.h ${D}${includedir}/ittnotify |
30 | rm -r ${D}${includedir}/ittnotify/fortran/win32 | 29 | rm -r ${D}${includedir}/ittnotify/fortran/win32 |
31 | if [ "${TARGET_ARCH}" = "x86_64" ]; then | ||
32 | rm -r ${D}${includedir}/ittnotify/fortran/posix/x86 | ||
33 | else | ||
34 | rm -r ${D}${includedir}/ittnotify/fortran/posix/x86_64 | ||
35 | fi | ||
36 | |||
37 | } | 30 | } |
38 | 31 | ||
39 | RDEPENDS:${PN}-dev:remove = "${PN} (= ${EXTENDPKGV})" | 32 | RDEPENDS:${PN}-dev:remove = "${PN} (= ${EXTENDPKGV})" |
diff --git a/recipes-multimedia/libva/files/0003-Force-ARGB-surface-to-tile4-for-ACM.patch b/recipes-multimedia/libva/files/0003-Force-ARGB-surface-to-tile4-for-ACM.patch new file mode 100644 index 00000000..ffb5b747 --- /dev/null +++ b/recipes-multimedia/libva/files/0003-Force-ARGB-surface-to-tile4-for-ACM.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From 6132115dd2f1db55a6a5371618247dfaa334a035 Mon Sep 17 00:00:00 2001 | ||
2 | From: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
3 | Date: Wed, 11 Oct 2023 15:36:21 +0800 | ||
4 | Subject: [PATCH 3/7] Force ARGB surface to tile4 for ACM | ||
5 | |||
6 | Upstream-Status: Submitted [https://github.com/intel/media-driver/pull/1728] | ||
7 | |||
8 | Signed-off-by: Soon, Thean Siew <thean.siew.soon@intel.com> | ||
9 | Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
10 | --- | ||
11 | media_driver/linux/common/ddi/media_libva_util.cpp | 10 ++++++++++ | ||
12 | 1 file changed, 10 insertions(+) | ||
13 | |||
14 | diff --git a/media_driver/linux/common/ddi/media_libva_util.cpp b/media_driver/linux/common/ddi/media_libva_util.cpp | ||
15 | index a4e12edfa..11634f66e 100755 | ||
16 | --- a/media_driver/linux/common/ddi/media_libva_util.cpp | ||
17 | +++ b/media_driver/linux/common/ddi/media_libva_util.cpp | ||
18 | @@ -521,6 +521,7 @@ VAStatus DdiMediaUtil_AllocateSurface( | ||
19 | gmmCustomParams.Flags.Gpu.UnifiedAuxSurface = 0; | ||
20 | } | ||
21 | } | ||
22 | + | ||
23 | break; | ||
24 | case TILING_X: | ||
25 | gmmCustomParams.Flags.Info.TiledX = true; | ||
26 | @@ -702,6 +703,15 @@ VAStatus DdiMediaUtil_AllocateSurface( | ||
27 | } | ||
28 | } | ||
29 | } | ||
30 | + // There's no VAAPI interface for modifier query yet. As a workaround, always allocate | ||
31 | + // RGB surface as tile4. | ||
32 | + if ((format == Media_Format_A8R8G8B8 || | ||
33 | + format == Media_Format_B10G10R10A2 | | ||
34 | + format == Media_Format_A8B8G8R8 || | ||
35 | + format == Media_Format_X8R8G8B8) && !MEDIA_IS_SKU(&mediaDrvCtx->SkuTable, FtrTileY)) | ||
36 | + { | ||
37 | + gmmParams.Flags.Info.Tile4 = true; | ||
38 | + } | ||
39 | break; | ||
40 | case TILING_X: | ||
41 | gmmParams.Flags.Info.TiledX = true; | ||
42 | -- | ||
43 | 2.43.0 | ||
44 | |||
diff --git a/recipes-multimedia/libva/files/0004-Fix-failed-4k-videowalll-test-case-and-color-corrupt.patch b/recipes-multimedia/libva/files/0004-Fix-failed-4k-videowalll-test-case-and-color-corrupt.patch new file mode 100644 index 00000000..49e3ff13 --- /dev/null +++ b/recipes-multimedia/libva/files/0004-Fix-failed-4k-videowalll-test-case-and-color-corrupt.patch | |||
@@ -0,0 +1,85 @@ | |||
1 | From a32b95e58fd3e34847e799b909e08dbe5c9dc692 Mon Sep 17 00:00:00 2001 | ||
2 | From: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
3 | Date: Fri, 2 Aug 2024 13:25:13 +0800 | ||
4 | Subject: [PATCH 4/7] Fix failed 4k videowalll test case and color corruption | ||
5 | of video composition in Gen12 platform | ||
6 | |||
7 | Fix failed 4k video wall test case from 16CH video only show | ||
8 | 1CH output and corruption observed on certain number of video | ||
9 | composition when doing sample_multi_transcode in legacy path. | ||
10 | |||
11 | platform: TGL/ADL/RPL | ||
12 | |||
13 | Upstream-Status: Submitted [https://github.com/intel/media-driver/pull/1839] | ||
14 | |||
15 | Signed-off-by: xupianch <xu.pian.chan@intel.com> | ||
16 | Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
17 | --- | ||
18 | .../common/vp/hal/vphal_render_composite.cpp | 9 ++++++++- | ||
19 | .../linux/common/vp/ddi/media_libva_vp.c | 18 +++++------------- | ||
20 | 2 files changed, 13 insertions(+), 14 deletions(-) | ||
21 | |||
22 | diff --git a/media_driver/agnostic/common/vp/hal/vphal_render_composite.cpp b/media_driver/agnostic/common/vp/hal/vphal_render_composite.cpp | ||
23 | index 169030209..cc7c241c1 100644 | ||
24 | --- a/media_driver/agnostic/common/vp/hal/vphal_render_composite.cpp | ||
25 | +++ b/media_driver/agnostic/common/vp/hal/vphal_render_composite.cpp | ||
26 | @@ -6784,6 +6784,13 @@ bool CompositeState::BuildFilter( | ||
27 | |||
28 | for (i = 0; (i < (int)pCompParams->uSourceCount) && (iMaxFilterSize > 0); i++) | ||
29 | { | ||
30 | + if (i > 0) | ||
31 | + { | ||
32 | + if (!RECT1_CONTAINS_RECT2(pCompParams->pSource[0]->rcDst, pCompParams->pSource[i]->rcDst)) | ||
33 | + { | ||
34 | + pFilter->forceToTargetColorSpace = true; | ||
35 | + } | ||
36 | + } | ||
37 | pSrc = pCompParams->pSource[i]; | ||
38 | |||
39 | //-------------------------------- | ||
40 | @@ -8154,4 +8161,4 @@ bool CompositeState::IsSamplerIDForY( | ||
41 | return true; | ||
42 | } | ||
43 | return false; | ||
44 | - } | ||
45 | \ No newline at end of file | ||
46 | + } | ||
47 | diff --git a/media_driver/linux/common/vp/ddi/media_libva_vp.c b/media_driver/linux/common/vp/ddi/media_libva_vp.c | ||
48 | index 48a452315..4f0fc2c48 100644 | ||
49 | --- a/media_driver/linux/common/vp/ddi/media_libva_vp.c | ||
50 | +++ b/media_driver/linux/common/vp/ddi/media_libva_vp.c | ||
51 | @@ -1148,7 +1148,7 @@ DdiVp_SetProcPipelineParams( | ||
52 | |||
53 | // Background Colorfill | ||
54 | // According to libva definition, if alpha in output background color is zero, then colorfill is not needed | ||
55 | - if ((pPipelineParam->output_background_color >> 24) != 0 || pVpHalTgtSurf->ColorSpace == CSpace_sRGB) | ||
56 | + if ((pPipelineParam->output_background_color >> 24) != 0) | ||
57 | { | ||
58 | if (pVpHalRenderParams->pColorFillParams == nullptr) | ||
59 | { | ||
60 | @@ -1157,18 +1157,10 @@ DdiVp_SetProcPipelineParams( | ||
61 | |||
62 | DDI_CHK_NULL(pVpHalRenderParams->pColorFillParams, "Null pColorFillParams.", VA_STATUS_ERROR_UNKNOWN); | ||
63 | |||
64 | - if (pVpHalTgtSurf->ColorSpace == CSpace_sRGB && (pPipelineParam->output_background_color >> 24) == 0) | ||
65 | - { | ||
66 | - // set color space for sRGB output | ||
67 | - pVpHalRenderParams->pColorFillParams->CSpace = CSpace_sRGB; | ||
68 | - } | ||
69 | - else | ||
70 | - { | ||
71 | - // set background colorfill option | ||
72 | - pVpHalRenderParams->pColorFillParams->Color = pPipelineParam->output_background_color; | ||
73 | - pVpHalRenderParams->pColorFillParams->bYCbCr = false; | ||
74 | - pVpHalRenderParams->pColorFillParams->CSpace = CSpace_sRGB; | ||
75 | - } | ||
76 | + // set background colorfill option | ||
77 | + pVpHalRenderParams->pColorFillParams->Color = pPipelineParam->output_background_color; | ||
78 | + pVpHalRenderParams->pColorFillParams->bYCbCr = false; | ||
79 | + pVpHalRenderParams->pColorFillParams->CSpace = CSpace_sRGB; | ||
80 | }else | ||
81 | { | ||
82 | MOS_FreeMemAndSetNull(pVpHalRenderParams->pColorFillParams); | ||
83 | -- | ||
84 | 2.43.0 | ||
85 | |||
diff --git a/recipes-multimedia/libva/files/c8457540aed1ab9424661087276fb788c0e3aabb.patch b/recipes-multimedia/libva/files/c8457540aed1ab9424661087276fb788c0e3aabb.patch deleted file mode 100644 index 046778b2..00000000 --- a/recipes-multimedia/libva/files/c8457540aed1ab9424661087276fb788c0e3aabb.patch +++ /dev/null | |||
@@ -1,109 +0,0 @@ | |||
1 | From c8457540aed1ab9424661087276fb788c0e3aabb Mon Sep 17 00:00:00 2001 | ||
2 | From: "Wang, Pingli" <pingli.wang@intel.com> | ||
3 | Date: Wed, 23 Mar 2022 20:14:04 +0800 | ||
4 | Subject: [PATCH] Fixes #1354 | ||
5 | |||
6 | Fixes #1354. It is to fix the compiling issue for gcc12.0.1. | ||
7 | [-Werror=address] [-Werror=dangling-pointer=][-Werror=alloc-size-larger-than=] | ||
8 | |||
9 | Signed-off-by: Wang, Pingli <pingli.wang@intel.com> | ||
10 | |||
11 | Upstream-Status: Backport | ||
12 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
13 | --- | ||
14 | .../agnostic/common/os/mos_utilities.h | 4 +-- | ||
15 | .../codec/hal/codechal_encoder_base.cpp | 2 +- | ||
16 | .../common/codec/ddi/media_ddi_decode_vp8.cpp | 25 ++++++++----------- | ||
17 | .../agnostic/common/os/mos_utilities_next.h | 4 +-- | ||
18 | 4 files changed, 16 insertions(+), 19 deletions(-) | ||
19 | |||
20 | diff --git a/media_common/agnostic/common/os/mos_utilities.h b/media_common/agnostic/common/os/mos_utilities.h | ||
21 | index 7c395816f..d41a3a065 100644 | ||
22 | --- a/media_common/agnostic/common/os/mos_utilities.h | ||
23 | +++ b/media_common/agnostic/common/os/mos_utilities.h | ||
24 | @@ -181,10 +181,10 @@ _Ty* MOS_NewUtil(_Types&&... _Args) | ||
25 | template<class _Ty, class... _Types> | ||
26 | _Ty *MOS_NewArrayUtil(const char *functionName, | ||
27 | const char *filename, | ||
28 | - int32_t line, int32_t numElements) | ||
29 | + int32_t line, size_t numElements) | ||
30 | #else | ||
31 | template<class _Ty, class... _Types> | ||
32 | -_Ty* MOS_NewArrayUtil(int32_t numElements) | ||
33 | +_Ty* MOS_NewArrayUtil(size_t numElements) | ||
34 | #endif | ||
35 | { | ||
36 | #if MOS_MESSAGES_ENABLED | ||
37 | diff --git a/media_driver/agnostic/common/codec/hal/codechal_encoder_base.cpp b/media_driver/agnostic/common/codec/hal/codechal_encoder_base.cpp | ||
38 | index 4bf869c60..e9b3575fd 100644 | ||
39 | --- a/media_driver/agnostic/common/codec/hal/codechal_encoder_base.cpp | ||
40 | +++ b/media_driver/agnostic/common/codec/hal/codechal_encoder_base.cpp | ||
41 | @@ -3891,6 +3891,7 @@ MOS_STATUS CodechalEncoderState::ReadCounterValue(uint16_t index, EncodeStatusRe | ||
42 | CODECHAL_ENCODE_FUNCTION_ENTER; | ||
43 | CODECHAL_ENCODE_CHK_NULL_RETURN(encodeStatusReport); | ||
44 | uint64_t *address2Counter = nullptr; | ||
45 | + uint32_t ctr[4] = { 0 }; | ||
46 | |||
47 | if (m_hwInterface->GetCpInterface()->IsHwCounterIncrement(m_osInterface)) | ||
48 | { | ||
49 | @@ -3923,7 +3924,6 @@ MOS_STATUS CodechalEncoderState::ReadCounterValue(uint16_t index, EncodeStatusRe | ||
50 | else | ||
51 | { | ||
52 | //Report driver generated counter which was submitted to HW by command | ||
53 | - uint32_t ctr[4] = { 0 }; | ||
54 | eStatus = m_hwInterface->GetCpInterface()->GetCounterValue(ctr); | ||
55 | if (MOS_STATUS_SUCCESS == eStatus) | ||
56 | { | ||
57 | diff --git a/media_driver/linux/common/codec/ddi/media_ddi_decode_vp8.cpp b/media_driver/linux/common/codec/ddi/media_ddi_decode_vp8.cpp | ||
58 | index 72891d584..fac4c415d 100644 | ||
59 | --- a/media_driver/linux/common/codec/ddi/media_ddi_decode_vp8.cpp | ||
60 | +++ b/media_driver/linux/common/codec/ddi/media_ddi_decode_vp8.cpp | ||
61 | @@ -235,20 +235,17 @@ VAStatus DdiDecodeVP8::ParsePicParams( | ||
62 | codecPicParams->ucUvModeProbs[0] = picParam->uv_mode_probs[0]; | ||
63 | codecPicParams->ucUvModeProbs[1] = picParam->uv_mode_probs[1]; | ||
64 | codecPicParams->ucUvModeProbs[2] = picParam->uv_mode_probs[2]; | ||
65 | - if (codecPicParams->ucMvUpdateProb[0] && picParam->mv_probs[0]) | ||
66 | - { | ||
67 | - MOS_SecureMemcpy(codecPicParams->ucMvUpdateProb[0], | ||
68 | - sizeof(codecPicParams->ucMvUpdateProb[0]), | ||
69 | - picParam->mv_probs[0], | ||
70 | - sizeof(codecPicParams->ucMvUpdateProb[0])); | ||
71 | - } | ||
72 | - if (codecPicParams->ucMvUpdateProb[1] && picParam->mv_probs[1]) | ||
73 | - { | ||
74 | - MOS_SecureMemcpy(codecPicParams->ucMvUpdateProb[1], | ||
75 | - sizeof(codecPicParams->ucMvUpdateProb[1]), | ||
76 | - picParam->mv_probs[1], | ||
77 | - sizeof(codecPicParams->ucMvUpdateProb[1])); | ||
78 | - } | ||
79 | + | ||
80 | + MOS_SecureMemcpy(codecPicParams->ucMvUpdateProb[0], | ||
81 | + sizeof(codecPicParams->ucMvUpdateProb[0]), | ||
82 | + picParam->mv_probs[0], | ||
83 | + sizeof(codecPicParams->ucMvUpdateProb[0])); | ||
84 | + | ||
85 | + MOS_SecureMemcpy(codecPicParams->ucMvUpdateProb[1], | ||
86 | + sizeof(codecPicParams->ucMvUpdateProb[1]), | ||
87 | + picParam->mv_probs[1], | ||
88 | + sizeof(codecPicParams->ucMvUpdateProb[1])); | ||
89 | + | ||
90 | codecPicParams->ucP0EntropyCount = (8 - picParam->bool_coder_ctx.count) & 0x7; //hardware needs used bits not remaining bits in bool decoder | ||
91 | codecPicParams->ucP0EntropyValue = picParam->bool_coder_ctx.value; | ||
92 | codecPicParams->uiP0EntropyRange = picParam->bool_coder_ctx.range; | ||
93 | diff --git a/media_softlet/agnostic/common/os/mos_utilities_next.h b/media_softlet/agnostic/common/os/mos_utilities_next.h | ||
94 | index 509f2de3d..b6069bbc8 100644 | ||
95 | --- a/media_softlet/agnostic/common/os/mos_utilities_next.h | ||
96 | +++ b/media_softlet/agnostic/common/os/mos_utilities_next.h | ||
97 | @@ -90,10 +90,10 @@ class MosUtilities | ||
98 | template<class _Ty, class... _Types> | ||
99 | static _Ty *MosNewArrayUtil(const char *functionName, | ||
100 | const char *filename, | ||
101 | - int32_t line, int32_t numElements) | ||
102 | + int32_t line, size_t numElements) | ||
103 | #else | ||
104 | template<class _Ty, class... _Types> | ||
105 | - static _Ty* MosNewArrayUtil(int32_t numElements) | ||
106 | + static _Ty* MosNewArrayUtil(size_t numElements) | ||
107 | #endif | ||
108 | { | ||
109 | #if (_DEBUG || _RELEASE_INTERNAL) | ||
diff --git a/recipes-multimedia/libva/intel-media-driver_22.3.1.bb b/recipes-multimedia/libva/intel-media-driver_25.1.4.bb index 4e64c1b6..d2ab0f43 100644 --- a/recipes-multimedia/libva/intel-media-driver_22.3.1.bb +++ b/recipes-multimedia/libva/intel-media-driver_25.1.4.bb | |||
@@ -19,11 +19,11 @@ REQUIRED_DISTRO_FEATURES = "opengl" | |||
19 | DEPENDS += "libva gmmlib" | 19 | DEPENDS += "libva gmmlib" |
20 | 20 | ||
21 | SRC_URI = "git://github.com/intel/media-driver.git;protocol=https;nobranch=1 \ | 21 | SRC_URI = "git://github.com/intel/media-driver.git;protocol=https;nobranch=1 \ |
22 | file://c8457540aed1ab9424661087276fb788c0e3aabb.patch \ | 22 | file://0003-Force-ARGB-surface-to-tile4-for-ACM.patch \ |
23 | file://0004-Fix-failed-4k-videowalll-test-case-and-color-corrupt.patch \ | ||
23 | " | 24 | " |
24 | 25 | ||
25 | SRCREV = "6547f46584633a7619440b39b34908e13c8c857d" | 26 | SRCREV = "14e2e7bcf1014186dbf1c099089c7c05cd880ae8" |
26 | S = "${WORKDIR}/git" | ||
27 | 27 | ||
28 | COMPATIBLE_HOST:x86-x32 = "null" | 28 | COMPATIBLE_HOST:x86-x32 = "null" |
29 | 29 | ||
diff --git a/recipes-multimedia/mediasdk/files/0001-FindITT.cmake-fix-detection-of-header-library.patch b/recipes-multimedia/mediasdk/files/0001-FindITT.cmake-fix-detection-of-header-library.patch deleted file mode 100644 index 87c4e82e..00000000 --- a/recipes-multimedia/mediasdk/files/0001-FindITT.cmake-fix-detection-of-header-library.patch +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | From be7cec47777bd35c44a59f2af73f12ce9c26d65c Mon Sep 17 00:00:00 2001 | ||
2 | From: Anuj Mittal <anuj.mittal@intel.com> | ||
3 | Date: Wed, 7 Oct 2020 09:33:06 +0800 | ||
4 | Subject: [PATCH] FindITT.cmake: fix detection of header/library | ||
5 | |||
6 | Use find_library to check for the library so distributions installing to | ||
7 | standard locations can also work in addition to custom paths specified | ||
8 | using CMAKE_ITT_HOME. | ||
9 | |||
10 | Also add ittnotify to PATH_SUFFIXES for header for cases when | ||
11 | ittnotify.h is installed in /usr/include/ittnotify for example. | ||
12 | |||
13 | Upstream-Status: Submitted | ||
14 | |||
15 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
16 | --- | ||
17 | builder/FindITT.cmake | 6 +++--- | ||
18 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
19 | |||
20 | diff --git a/builder/FindITT.cmake b/builder/FindITT.cmake | ||
21 | index ba2542c5..d96acf2e 100644 | ||
22 | --- a/builder/FindITT.cmake | ||
23 | +++ b/builder/FindITT.cmake | ||
24 | @@ -35,19 +35,19 @@ if( ENABLE_ITT ) | ||
25 | |||
26 | find_path( ITT_INCLUDE_DIRS ittnotify.h | ||
27 | PATHS ${CMAKE_ITT_HOME} ${CMAKE_VTUNE_HOME} | ||
28 | - PATH_SUFFIXES include ) | ||
29 | + PATH_SUFFIXES include ittnotify) | ||
30 | |||
31 | # Unfortunately SEAPI and VTune uses different names for itt library: | ||
32 | # * SEAPI uses libittnotify${arch}.a | ||
33 | # * VTune uses libittnotify.a | ||
34 | # We are trying to check both giving preference to SEAPI name. | ||
35 | - find_path( ITT_LIBRARY_DIRS libittnotify${arch}.a | ||
36 | + find_library( ITT_LIBRARY_DIRS ittnotify${arch} | ||
37 | PATHS ${CMAKE_ITT_HOME} ${CMAKE_VTUNE_HOME} | ||
38 | PATH_SUFFIXES lib64 ) | ||
39 | if( NOT ITT_LIBRARY_DIRS MATCHES NOTFOUND ) | ||
40 | set( ITT_LIBRARIES "ittnotify${arch}" ) | ||
41 | else() | ||
42 | - find_path( ITT_LIBRARY_DIRS libittnotify.a | ||
43 | + find_library( ITT_LIBRARY_DIRS ittnotify | ||
44 | PATHS ${CMAKE_ITT_HOME} ${CMAKE_VTUNE_HOME} | ||
45 | PATH_SUFFIXES lib64 ) | ||
46 | if( NOT ITT_LIBRARY_PATH MATCHES NOTFOUND ) | ||
47 | -- | ||
48 | 2.26.2 | ||
49 | |||
diff --git a/recipes-multimedia/mediasdk/intel-mediasdk_22.3.0.bb b/recipes-multimedia/mediasdk/intel-mediasdk_22.3.0.bb deleted file mode 100644 index 099d489a..00000000 --- a/recipes-multimedia/mediasdk/intel-mediasdk_22.3.0.bb +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | SUMMARY = "Intel(R) Media SDK for hardware accelerated media processing" | ||
2 | DESCRIPTION = "Intel(R) Media SDK provides an API to access hardware-accelerated \ | ||
3 | video decode, encode and filtering on Intel® platforms with integrated graphics." | ||
4 | |||
5 | HOMEPAGE = "https://github.com/Intel-Media-SDK/MediaSDK" | ||
6 | BUGTRACKER = "https://github.com/Intel-Media-SDK/MediaSDK/issues" | ||
7 | |||
8 | LICENSE = "MIT" | ||
9 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3cb331af679cd8f968bf799a9c55b46e" | ||
10 | |||
11 | CVE_DETAILS = "intel:media_sdk" | ||
12 | |||
13 | # Only for 64 bit until media-driver issues aren't fixed | ||
14 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
15 | COMPATIBLE_HOST:x86-x32 = "null" | ||
16 | |||
17 | inherit features_check | ||
18 | REQUIRED_DISTRO_FEATURES = "opengl" | ||
19 | |||
20 | DEPENDS += "libdrm libva intel-media-driver" | ||
21 | |||
22 | PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "dri3", "", d)} \ | ||
23 | ${@bb.utils.contains("DISTRO_FEATURES", "wayland", "wayland", "", d)} \ | ||
24 | samples \ | ||
25 | itt \ | ||
26 | " | ||
27 | |||
28 | PACKAGECONFIG[dri3] = "-DENABLE_X11_DRI3=ON, -DENABLE_X11_DRI3=OFF" | ||
29 | PACKAGECONFIG[itt] = "-DENABLE_ITT=ON, -DENABLE_ITT=OFF, itt" | ||
30 | PACKAGECONFIG[opencl] = "-DENABLE_OPENCL=ON, -DENABLE_OPENCL=OFF, ocl-icd opencl-clhpp opencl-headers" | ||
31 | PACKAGECONFIG[samples] = "-DBUILD_SAMPLES=ON, -DBUILD_SAMPLES=OFF" | ||
32 | PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND=ON, -DENABLE_WAYLAND=OFF, wayland wayland-native" | ||
33 | |||
34 | SRC_URI = "git://github.com/Intel-Media-SDK/MediaSDK.git;protocol=https;nobranch=1;lfs=0 \ | ||
35 | file://0001-FindITT.cmake-fix-detection-of-header-library.patch \ | ||
36 | " | ||
37 | |||
38 | SRCREV = "f577d724de6cf8d040a113d337d4433b0f7478e2" | ||
39 | S = "${WORKDIR}/git" | ||
40 | |||
41 | UPSTREAM_CHECK_GITTAGREGEX = "^intel-mediasdk-(?P<pver>(\d+(\.\d+)+))$" | ||
42 | |||
43 | inherit cmake pkgconfig | ||
44 | |||
45 | EXTRA_OECMAKE += "-DMFX_INCLUDE=${S}/api/include" | ||
46 | |||
47 | do_install:append() { | ||
48 | mv ${D}${datadir}/mfx/samples ${D}${libdir}/mfx/samples | ||
49 | } | ||
50 | |||
51 | PACKAGE_BEFORE_PN = " ${PN}-samples" | ||
52 | |||
53 | FILES:${PN} += " \ | ||
54 | ${libdir}/mfx \ | ||
55 | ${datadir}/mfx/plugins.cfg \ | ||
56 | " | ||
57 | |||
58 | FILES:${PN}-samples = "${libdir}/mfx/samples" | ||
59 | |||
60 | INSANE_SKIP:${PN}-samples += "staticdev" | ||
diff --git a/recipes-multimedia/onevpl/onevpl/0001-Fix-basename-build-issue-with-musl_libc.patch b/recipes-multimedia/onevpl/onevpl/0001-Fix-basename-build-issue-with-musl_libc.patch deleted file mode 100644 index 14453279..00000000 --- a/recipes-multimedia/onevpl/onevpl/0001-Fix-basename-build-issue-with-musl_libc.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | From 72ceb46b43a7a74d20ced961aaff9366ccce53a9 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Yew, Chang Ching" <chang.ching.yew@intel.com> | ||
3 | Date: Mon, 24 Jan 2022 20:49:50 +0800 | ||
4 | Subject: [PATCH 1/5] Fix basename() build issue with musl_libc | ||
5 | |||
6 | Upstream-Status: Submitted | ||
7 | innersource PR #264 | ||
8 | |||
9 | Signed-off-by: Yew, Chang Ching <chang.ching.yew@intel.com> | ||
10 | --- | ||
11 | tools/legacy/sample_common/src/vaapi_utils.cpp | 3 ++- | ||
12 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/tools/legacy/sample_common/src/vaapi_utils.cpp b/tools/legacy/sample_common/src/vaapi_utils.cpp | ||
15 | index 86193d17..db71d413 100644 | ||
16 | --- a/tools/legacy/sample_common/src/vaapi_utils.cpp | ||
17 | +++ b/tools/legacy/sample_common/src/vaapi_utils.cpp | ||
18 | @@ -7,6 +7,7 @@ | ||
19 | #ifdef LIBVA_SUPPORT | ||
20 | |||
21 | #include "vaapi_utils.h" | ||
22 | + #include <libgen.h> | ||
23 | #include <dlfcn.h> | ||
24 | #include <stdexcept> | ||
25 | |||
26 | @@ -24,7 +25,7 @@ namespace MfxLoader { | ||
27 | |||
28 | SimpleLoader::SimpleLoader(const char* name) { | ||
29 | dlerror(); | ||
30 | - so_handle = dlopen(name, RTLD_GLOBAL | RTLD_NOW); | ||
31 | + so_handle = dlopen(basename((char *)name), RTLD_GLOBAL | RTLD_NOW); | ||
32 | if (NULL == so_handle) { | ||
33 | std::cerr << dlerror() << std::endl; | ||
34 | throw std::runtime_error("Can't load library"); | ||
35 | -- | ||
36 | 2.34.1 | ||
37 | |||
diff --git a/recipes-multimedia/onevpl/onevpl/0001-sample_common-Fix-missing-UYUV-fourcc-enc-input.patch b/recipes-multimedia/onevpl/onevpl/0001-sample_common-Fix-missing-UYUV-fourcc-enc-input.patch deleted file mode 100644 index 70e15a30..00000000 --- a/recipes-multimedia/onevpl/onevpl/0001-sample_common-Fix-missing-UYUV-fourcc-enc-input.patch +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | From ff5325a437e625d2007568a71d7f403f16d4c367 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Yew, Chang Ching" <chang.ching.yew@intel.com> | ||
3 | Date: Thu, 10 Mar 2022 13:06:28 +0800 | ||
4 | Subject: [PATCH] sample_common: Fix missing UYUV fourcc enc input | ||
5 | |||
6 | Fix regression with commit ae3e355 | ||
7 | |||
8 | Upstream-Status: Submitted | ||
9 | innersource PR #383 | ||
10 | |||
11 | Signed-off-by: Yew, Chang Ching <chang.ching.yew@intel.com> | ||
12 | --- | ||
13 | tools/legacy/sample_common/src/sample_utils.cpp | 12 ++++++------ | ||
14 | 1 file changed, 6 insertions(+), 6 deletions(-) | ||
15 | |||
16 | diff --git a/tools/legacy/sample_common/src/sample_utils.cpp b/tools/legacy/sample_common/src/sample_utils.cpp | ||
17 | index 0437dbdb..a8e25631 100644 | ||
18 | --- a/tools/legacy/sample_common/src/sample_utils.cpp | ||
19 | +++ b/tools/legacy/sample_common/src/sample_utils.cpp | ||
20 | @@ -114,12 +114,12 @@ mfxStatus CSmplYUVReader::Init(std::list<msdk_string> inputs, | ||
21 | |||
22 | if (MFX_FOURCC_NV12 != ColorFormat && MFX_FOURCC_YV12 != ColorFormat && | ||
23 | MFX_FOURCC_I420 != ColorFormat && MFX_FOURCC_YUY2 != ColorFormat && | ||
24 | - MFX_FOURCC_RGB4 != ColorFormat && MFX_FOURCC_BGR4 != ColorFormat && | ||
25 | - MFX_FOURCC_P010 != ColorFormat && MFX_FOURCC_P210 != ColorFormat && | ||
26 | - MFX_FOURCC_AYUV != ColorFormat && MFX_FOURCC_A2RGB10 != ColorFormat && | ||
27 | - MFX_FOURCC_Y210 != ColorFormat && MFX_FOURCC_Y410 != ColorFormat && | ||
28 | - MFX_FOURCC_P016 != ColorFormat && MFX_FOURCC_Y216 != ColorFormat && | ||
29 | - MFX_FOURCC_I010 != ColorFormat) { | ||
30 | + MFX_FOURCC_UYVY != ColorFormat && MFX_FOURCC_RGB4 != ColorFormat && | ||
31 | + MFX_FOURCC_BGR4 != ColorFormat && MFX_FOURCC_P010 != ColorFormat && | ||
32 | + MFX_FOURCC_P210 != ColorFormat && MFX_FOURCC_AYUV != ColorFormat && | ||
33 | + MFX_FOURCC_A2RGB10 != ColorFormat && MFX_FOURCC_Y210 != ColorFormat && | ||
34 | + MFX_FOURCC_Y410 != ColorFormat && MFX_FOURCC_P016 != ColorFormat && | ||
35 | + MFX_FOURCC_Y216 != ColorFormat && MFX_FOURCC_I010 != ColorFormat) { | ||
36 | return MFX_ERR_UNSUPPORTED; | ||
37 | } | ||
38 | |||
39 | -- | ||
40 | 2.17.1 | ||
41 | |||
diff --git a/recipes-multimedia/onevpl/onevpl/0001-sample_common-Fix-regression-of-missing-mutex-init.patch b/recipes-multimedia/onevpl/onevpl/0001-sample_common-Fix-regression-of-missing-mutex-init.patch deleted file mode 100644 index eaf49405..00000000 --- a/recipes-multimedia/onevpl/onevpl/0001-sample_common-Fix-regression-of-missing-mutex-init.patch +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | From f6f9d62817d58909fe9eafa555b1638f165dc746 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Yew, Chang Ching" <chang.ching.yew@intel.com> | ||
3 | Date: Wed, 2 Mar 2022 07:56:57 +0800 | ||
4 | Subject: [PATCH] sample_common: Fix regression of missing mutex init | ||
5 | |||
6 | Upstream-Status: Submitted | ||
7 | innersource PR #377 | ||
8 | |||
9 | Signed-off-by: Yew, Chang Ching <chang.ching.yew@intel.com> | ||
10 | --- | ||
11 | tools/legacy/sample_common/src/vm/thread_linux.cpp | 14 ++++++++++++++ | ||
12 | 1 file changed, 14 insertions(+) | ||
13 | |||
14 | diff --git a/tools/legacy/sample_common/src/vm/thread_linux.cpp b/tools/legacy/sample_common/src/vm/thread_linux.cpp | ||
15 | index 819d811f..c17ce5bf 100644 | ||
16 | --- a/tools/legacy/sample_common/src/vm/thread_linux.cpp | ||
17 | +++ b/tools/legacy/sample_common/src/vm/thread_linux.cpp | ||
18 | @@ -22,6 +22,13 @@ MSDKSemaphore::MSDKSemaphore(mfxStatus& sts, mfxU32 count) : msdkSemaphoreHandle | ||
19 | // If pthread_cond_init reports an error m_semaphore was not allocated | ||
20 | throw std::bad_alloc(); | ||
21 | } | ||
22 | + res = pthread_mutex_init(&m_mutex, NULL); | ||
23 | + if (res) { | ||
24 | + if (!pthread_cond_destroy(&m_semaphore)) { | ||
25 | + // do nothing | ||
26 | + } | ||
27 | + throw std::bad_alloc(); | ||
28 | + } | ||
29 | } | ||
30 | |||
31 | MSDKSemaphore::~MSDKSemaphore(void) { | ||
32 | @@ -97,6 +104,13 @@ MSDKEvent::MSDKEvent(mfxStatus& sts, bool manual, bool state) : msdkEventHandle( | ||
33 | //non-zero means something is wrong, throw bad_alloc | ||
34 | throw std::bad_alloc(); | ||
35 | } | ||
36 | + res = pthread_mutex_init(&m_mutex, NULL); | ||
37 | + if (res) { | ||
38 | + if (!pthread_cond_destroy(&m_event)) { | ||
39 | + // do nothing | ||
40 | + } | ||
41 | + throw std::bad_alloc(); | ||
42 | + } | ||
43 | } | ||
44 | |||
45 | MSDKEvent::~MSDKEvent(void) { | ||
46 | -- | ||
47 | 2.17.1 | ||
48 | |||
diff --git a/recipes-multimedia/onevpl/onevpl/0001-samples-Addin-wayland-scanner-auto-generate-on-cmake.patch b/recipes-multimedia/onevpl/onevpl/0001-samples-Addin-wayland-scanner-auto-generate-on-cmake.patch deleted file mode 100644 index 351c707d..00000000 --- a/recipes-multimedia/onevpl/onevpl/0001-samples-Addin-wayland-scanner-auto-generate-on-cmake.patch +++ /dev/null | |||
@@ -1,88 +0,0 @@ | |||
1 | From 7f428b8d0ca95b43b70663c27b525c5d6f7bf28d Mon Sep 17 00:00:00 2001 | ||
2 | From: "Ung, Teng En" <teng.en.ung@intel.com> | ||
3 | Date: Tue, 25 Jan 2022 16:36:19 +0800 | ||
4 | Subject: [PATCH 1/3] samples: Addin wayland-scanner auto generate on cmake. | ||
5 | |||
6 | Upstream-Status: Submitted | ||
7 | innersource PR #269 | ||
8 | --- | ||
9 | tools/legacy/sample_common/CMakeLists.txt | 22 +++++++++++++++++++ | ||
10 | tools/legacy/sample_misc/wayland/CMakeLists.txt | 29 +++++++++++++++++++++++++ | ||
11 | 2 files changed, 51 insertions(+) | ||
12 | |||
13 | diff --git a/tools/legacy/sample_common/CMakeLists.txt b/tools/legacy/sample_common/CMakeLists.txt | ||
14 | index 24245cd..030ffee 100644 | ||
15 | --- a/tools/legacy/sample_common/CMakeLists.txt | ||
16 | +++ b/tools/legacy/sample_common/CMakeLists.txt | ||
17 | @@ -103,6 +103,28 @@ if(CMAKE_SYSTEM_NAME MATCHES Linux) | ||
18 | target_include_directories( | ||
19 | sample_common | ||
20 | PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../sample_misc/wayland/include) | ||
21 | + | ||
22 | + find_program(WAYLAND_SCANNER_BIN "wayland-scanner") | ||
23 | + pkg_check_modules(PKG_WAYLAND_PROTCOLS "wayland-protocols>=1.15") | ||
24 | + | ||
25 | + if(WAYLAND_SCANNER_BIN AND PKG_WAYLAND_PROTCOLS_FOUND) | ||
26 | + pkg_get_variable(WAYLAND_PROTOCOLS_PATH wayland-protocols pkgdatadir) | ||
27 | + if(WAYLAND_PROTOCOLS_PATH) | ||
28 | + find_file( | ||
29 | + WAYLAND_LINUX_DMABUF_XML_PATH linux-dmabuf-unstable-v1.xml | ||
30 | + PATHS ${WAYLAND_PROTOCOLS_PATH}/unstable/linux-dmabuf | ||
31 | + NO_DEFAULT_PATH) | ||
32 | + endif() | ||
33 | + endif() | ||
34 | + | ||
35 | + if(WAYLAND_LINUX_DMABUF_XML_PATH) | ||
36 | + target_compile_definitions( | ||
37 | + sample_common PUBLIC WAYLAND_LINUX_DMABUF_SUPPORT) | ||
38 | + target_include_directories( | ||
39 | + sample_common | ||
40 | + PUBLIC ${CMAKE_BINARY_DIR}/tools/legacy/sample_misc/wayland) | ||
41 | + endif() | ||
42 | + | ||
43 | else() | ||
44 | message( | ||
45 | WARNING | ||
46 | diff --git a/tools/legacy/sample_misc/wayland/CMakeLists.txt b/tools/legacy/sample_misc/wayland/CMakeLists.txt | ||
47 | index cf91987..a2dffbb 100644 | ||
48 | --- a/tools/legacy/sample_misc/wayland/CMakeLists.txt | ||
49 | +++ b/tools/legacy/sample_misc/wayland/CMakeLists.txt | ||
50 | @@ -20,6 +20,35 @@ target_sources( | ||
51 | ${CMAKE_CURRENT_SOURCE_DIR}/src/listener_wayland.cpp | ||
52 | ${CMAKE_CURRENT_SOURCE_DIR}/src/wayland-drm-protocol.c) | ||
53 | |||
54 | +if(WAYLAND_SCANNER_BIN AND PKG_WAYLAND_PROTCOLS_FOUND AND WAYLAND_LINUX_DMABUF_XML_PATH) | ||
55 | + execute_process( | ||
56 | + COMMAND "${WAYLAND_SCANNER_BIN_PATH}\/${WAYLAND_SCANNER_BIN}" | ||
57 | + "client-header" "${WAYLAND_LINUX_DMABUF_XML_PATH}" | ||
58 | + "tools/legacy/sample_misc/wayland/linux-dmabuf-unstable-v1.h" | ||
59 | + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" | ||
60 | + RESULT_VARIABLE WAYLAND_SCANNER_RESULT) | ||
61 | + if (WAYLAND_SCANNER_RESULT) | ||
62 | + message(FATAL_ERROR "Failed to generate linux-dmabuf-unstable-v1.h") | ||
63 | + endif() | ||
64 | + | ||
65 | + execute_process( | ||
66 | + COMMAND "${WAYLAND_SCANNER_BIN_PATH}\/${WAYLAND_SCANNER_BIN}" | ||
67 | + "private-code" "${WAYLAND_LINUX_DMABUF_XML_PATH}" | ||
68 | + "tools/legacy/sample_misc/wayland/linux-dmabuf-unstable-v1.c" | ||
69 | + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" | ||
70 | + RESULT_VARIABLE WAYLAND_SCANNER_RESULT) | ||
71 | + if (WAYLAND_SCANNER_RESULT) | ||
72 | + message(FATAL_ERROR "Failed to generate linux-dmabuf-unstable-v1.c") | ||
73 | + endif() | ||
74 | + | ||
75 | + target_include_directories( | ||
76 | + vpl_wayland PRIVATE ${CMAKE_BINARY_DIR}/tools/legacy/sample_misc/wayland) | ||
77 | + target_sources( | ||
78 | + vpl_wayland | ||
79 | + PRIVATE ${CMAKE_BINARY_DIR}/tools/legacy/sample_misc/wayland/linux-dmabuf-unstable-v1.c) | ||
80 | +endif() | ||
81 | + | ||
82 | + | ||
83 | target_link_libraries(vpl_wayland PRIVATE sample_common wayland-client va drm | ||
84 | drm_intel) | ||
85 | |||
86 | -- | ||
87 | 2.7.4 | ||
88 | |||
diff --git a/recipes-multimedia/onevpl/onevpl/0002-sample_misc-Addin-basic-wayland-dmabuf-support.patch b/recipes-multimedia/onevpl/onevpl/0002-sample_misc-Addin-basic-wayland-dmabuf-support.patch deleted file mode 100644 index d8a55352..00000000 --- a/recipes-multimedia/onevpl/onevpl/0002-sample_misc-Addin-basic-wayland-dmabuf-support.patch +++ /dev/null | |||
@@ -1,90 +0,0 @@ | |||
1 | From 047b7865a69e26c9091b22dceceae1b609a3efbc Mon Sep 17 00:00:00 2001 | ||
2 | From: "Ung, Teng En" <teng.en.ung@intel.com> | ||
3 | Date: Fri, 8 Oct 2021 14:19:40 +0000 | ||
4 | Subject: [PATCH 2/3] sample_misc: Addin basic wayland dmabuf support. | ||
5 | |||
6 | Upstream-Status: Submitted | ||
7 | innersource PR #269 | ||
8 | |||
9 | --- | ||
10 | tools/legacy/sample_misc/wayland/include/class_wayland.h | 16 ++++++++++++++++ | ||
11 | tools/legacy/sample_misc/wayland/src/class_wayland.cpp | 8 ++++++++ | ||
12 | 2 files changed, 24 insertions(+) | ||
13 | |||
14 | diff --git a/tools/legacy/sample_misc/wayland/include/class_wayland.h b/tools/legacy/sample_misc/wayland/include/class_wayland.h | ||
15 | index 29f724f..753b8b1 100644 | ||
16 | --- a/tools/legacy/sample_misc/wayland/include/class_wayland.h | ||
17 | +++ b/tools/legacy/sample_misc/wayland/include/class_wayland.h | ||
18 | @@ -19,6 +19,9 @@ extern "C" { | ||
19 | #include "sample_defs.h" | ||
20 | #include "vpl/mfxstructures.h" | ||
21 | #include "wayland-drm-client-protocol.h" | ||
22 | +#if defined(WAYLAND_LINUX_DMABUF_SUPPORT) | ||
23 | + #include "linux-dmabuf-unstable-v1.h" | ||
24 | +#endif | ||
25 | |||
26 | typedef struct buffer wld_buffer; | ||
27 | |||
28 | @@ -80,6 +83,11 @@ public: | ||
29 | struct wl_drm* GetDrm() { | ||
30 | return m_drm; | ||
31 | } | ||
32 | +#if defined(WAYLAND_LINUX_DMABUF_SUPPORT) | ||
33 | + struct zwp_linux_dmabuf_v1* GetDMABuf() { | ||
34 | + return m_dmabuf; | ||
35 | + } | ||
36 | +#endif | ||
37 | struct wl_shm* GetShm() { | ||
38 | return m_shm; | ||
39 | }; | ||
40 | @@ -107,6 +115,11 @@ public: | ||
41 | void SetDrm(struct wl_drm* drm) { | ||
42 | m_drm = drm; | ||
43 | } | ||
44 | +#if defined(WAYLAND_LINUX_DMABUF_SUPPORT) | ||
45 | + void SetDMABuf(struct zwp_linux_dmabuf_v1* dmabuf) { | ||
46 | + m_dmabuf = dmabuf; | ||
47 | + } | ||
48 | +#endif | ||
49 | void DrmHandleDevice(const char* device); | ||
50 | void DrmHandleAuthenticated(); | ||
51 | void RegistryGlobal(struct wl_registry* registry, | ||
52 | @@ -134,6 +147,9 @@ private: | ||
53 | struct wl_compositor* m_compositor; | ||
54 | struct wl_shell* m_shell; | ||
55 | struct wl_drm* m_drm; | ||
56 | +#if defined(WAYLAND_LINUX_DMABUF_SUPPORT) | ||
57 | + struct zwp_linux_dmabuf_v1* m_dmabuf; | ||
58 | +#endif | ||
59 | struct wl_shm* m_shm; | ||
60 | struct wl_shm_pool* m_pool; | ||
61 | struct wl_surface* m_surface; | ||
62 | diff --git a/tools/legacy/sample_misc/wayland/src/class_wayland.cpp b/tools/legacy/sample_misc/wayland/src/class_wayland.cpp | ||
63 | index c5e3359..7eac204 100644 | ||
64 | --- a/tools/legacy/sample_misc/wayland/src/class_wayland.cpp | ||
65 | +++ b/tools/legacy/sample_misc/wayland/src/class_wayland.cpp | ||
66 | @@ -37,6 +37,9 @@ Wayland::Wayland() | ||
67 | m_compositor(NULL), | ||
68 | m_shell(NULL), | ||
69 | m_drm(NULL), | ||
70 | +#if defined(WAYLAND_LINUX_DMABUF_SUPPORT) | ||
71 | + m_dmabuf(NULL), | ||
72 | +#endif | ||
73 | m_shm(NULL), | ||
74 | m_pool(NULL), | ||
75 | m_surface(NULL), | ||
76 | @@ -347,6 +350,11 @@ void Wayland::RegistryGlobal(struct wl_registry* registry, | ||
77 | m_drm = static_cast<wl_drm*>(wl_registry_bind(registry, name, &wl_drm_interface, 2)); | ||
78 | wl_drm_add_listener(m_drm, &drm_listener, this); | ||
79 | } | ||
80 | +#if defined(WAYLAND_LINUX_DMABUF_SUPPORT) | ||
81 | + else if(0 == strcmp(interface, "zwp_linux_dmabuf_v1")) | ||
82 | + m_dmabuf = static_cast<zwp_linux_dmabuf_v1*>( | ||
83 | + wl_registry_bind(registry, name, &zwp_linux_dmabuf_v1_interface, version)); | ||
84 | +#endif | ||
85 | } | ||
86 | |||
87 | void Wayland::DrmHandleDevice(const char* name) { | ||
88 | -- | ||
89 | 2.7.4 | ||
90 | |||
diff --git a/recipes-multimedia/onevpl/onevpl/0003-sample_misc-use-wayland-dmabuf-to-render-nv12.patch b/recipes-multimedia/onevpl/onevpl/0003-sample_misc-use-wayland-dmabuf-to-render-nv12.patch deleted file mode 100644 index 50ed3ca7..00000000 --- a/recipes-multimedia/onevpl/onevpl/0003-sample_misc-use-wayland-dmabuf-to-render-nv12.patch +++ /dev/null | |||
@@ -1,94 +0,0 @@ | |||
1 | From e2b5041b272e0cb8b3c4c9d332b0bbc3dda05e69 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Ung, Teng En" <teng.en.ung@intel.com> | ||
3 | Date: Fri, 8 Oct 2021 14:38:45 +0000 | ||
4 | Subject: [PATCH 3/3] sample_misc: use wayland dmabuf to render nv12 | ||
5 | |||
6 | Upstream-Status: Submitted | ||
7 | innersource PR #269 | ||
8 | |||
9 | --- | ||
10 | .../sample_misc/wayland/src/class_wayland.cpp | 60 +++++++++++++++++----- | ||
11 | 1 file changed, 47 insertions(+), 13 deletions(-) | ||
12 | |||
13 | diff --git a/tools/legacy/sample_misc/wayland/src/class_wayland.cpp b/tools/legacy/sample_misc/wayland/src/class_wayland.cpp | ||
14 | index 7eac204..68fcea4 100644 | ||
15 | --- a/tools/legacy/sample_misc/wayland/src/class_wayland.cpp | ||
16 | +++ b/tools/legacy/sample_misc/wayland/src/class_wayland.cpp | ||
17 | @@ -13,6 +13,7 @@ | ||
18 | #include <iostream> | ||
19 | extern "C" { | ||
20 | #include <drm.h> | ||
21 | +#include <drm_fourcc.h> | ||
22 | #include <intel_bufmgr.h> | ||
23 | #include <xf86drm.h> | ||
24 | } | ||
25 | @@ -292,20 +293,53 @@ struct wl_buffer* Wayland::CreatePrimeBuffer(uint32_t name, | ||
26 | int32_t offsets[3], | ||
27 | int32_t pitches[3]) { | ||
28 | struct wl_buffer* buffer = NULL; | ||
29 | - if (NULL == m_drm) | ||
30 | - return NULL; | ||
31 | |||
32 | - buffer = wl_drm_create_prime_buffer(m_drm, | ||
33 | - name, | ||
34 | - width, | ||
35 | - height, | ||
36 | - format, | ||
37 | - offsets[0], | ||
38 | - pitches[0], | ||
39 | - offsets[1], | ||
40 | - pitches[1], | ||
41 | - offsets[2], | ||
42 | - pitches[2]); | ||
43 | +#if defined(WAYLAND_LINUX_DMABUF_SUPPORT) | ||
44 | + if (format == WL_DRM_FORMAT_NV12) { | ||
45 | + if(NULL == m_dmabuf) | ||
46 | + return NULL; | ||
47 | + | ||
48 | + struct zwp_linux_buffer_params_v1 *dmabuf_params = NULL; | ||
49 | + int i = 0; | ||
50 | + uint64_t modifier = I915_FORMAT_MOD_Y_TILED; | ||
51 | + | ||
52 | + dmabuf_params = zwp_linux_dmabuf_v1_create_params(m_dmabuf); | ||
53 | + for(i = 0; i < 2; i++) { | ||
54 | + zwp_linux_buffer_params_v1_add(dmabuf_params, | ||
55 | + name, | ||
56 | + i, | ||
57 | + offsets[i], | ||
58 | + pitches[i], | ||
59 | + modifier >> 32, | ||
60 | + modifier & 0xffffffff); | ||
61 | + } | ||
62 | + | ||
63 | + buffer = zwp_linux_buffer_params_v1_create_immed(dmabuf_params, | ||
64 | + width, | ||
65 | + height, | ||
66 | + format, | ||
67 | + 0); | ||
68 | + | ||
69 | + zwp_linux_buffer_params_v1_destroy(dmabuf_params); | ||
70 | + } else | ||
71 | +#endif | ||
72 | + { | ||
73 | + if(NULL == m_drm) | ||
74 | + return NULL; | ||
75 | + | ||
76 | + buffer = wl_drm_create_prime_buffer(m_drm, | ||
77 | + name, | ||
78 | + width, | ||
79 | + height, | ||
80 | + format, | ||
81 | + offsets[0], | ||
82 | + pitches[0], | ||
83 | + offsets[1], | ||
84 | + pitches[1], | ||
85 | + offsets[2], | ||
86 | + pitches[2]); | ||
87 | + } | ||
88 | + | ||
89 | return buffer; | ||
90 | } | ||
91 | |||
92 | -- | ||
93 | 2.7.4 | ||
94 | |||
diff --git a/recipes-multimedia/onevpl/onevpl_2022.0.3.bb b/recipes-multimedia/onevpl/onevpl_2022.0.3.bb deleted file mode 100644 index 66be720f..00000000 --- a/recipes-multimedia/onevpl/onevpl_2022.0.3.bb +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | SUMMARY = "oneAPI Video Processing Library" | ||
2 | DESCRIPTION = "The oneAPI Video Processing Library (oneVPL) provides \ | ||
3 | a single video processing API for encode, decode, and video processing \ | ||
4 | that works across a wide range of accelerators." | ||
5 | |||
6 | HOMEPAGE = "https://github.com/oneapi-src/oneVPL" | ||
7 | LICENSE = "MIT" | ||
8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=c18ea6bb4786a26bf4eee88a7424a408 \ | ||
9 | file://third-party-programs.txt;md5=43ed11c52f754dafaa62e2cfdd2bac13" | ||
10 | |||
11 | SRC_URI = "git://github.com/oneapi-src/oneVPL.git;protocol=https;branch=master \ | ||
12 | file://0001-Fix-basename-build-issue-with-musl_libc.patch \ | ||
13 | file://0001-samples-Addin-wayland-scanner-auto-generate-on-cmake.patch \ | ||
14 | file://0002-sample_misc-Addin-basic-wayland-dmabuf-support.patch \ | ||
15 | file://0003-sample_misc-use-wayland-dmabuf-to-render-nv12.patch \ | ||
16 | file://0001-sample_common-Fix-regression-of-missing-mutex-init.patch \ | ||
17 | file://0001-sample_common-Fix-missing-UYUV-fourcc-enc-input.patch \ | ||
18 | " | ||
19 | SRCREV = "efc259f8b7ee5c334bca1a904a503186038bbbdd" | ||
20 | S = "${WORKDIR}/git" | ||
21 | |||
22 | inherit cmake | ||
23 | DEPENDS += "libva pkgconfig-native" | ||
24 | |||
25 | PACKAGECONFIG ??= "tools" | ||
26 | PACKAGECONFIG[tools] = "-DBUILD_TOOLS=ON, -DBUILD_TOOLS=OFF, wayland wayland-native wayland-protocols" | ||
27 | |||
28 | do_install:append() { | ||
29 | mkdir -p ${D}${datadir}/oneVPL/samples | ||
30 | mv ${D}${bindir}/sample_* ${D}${datadir}/oneVPL/samples | ||
31 | } | ||
32 | |||
33 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
34 | |||
35 | PACKAGES += "${PN}-examples" | ||
36 | |||
37 | FILES:${PN}-examples = "${datadir}/oneVPL/examples \ | ||
38 | " | ||
39 | |||
40 | FILES_SOLIBSDEV = "" | ||
41 | FILES:${PN}-dev += "${libdir}/libvpl.so" | ||
42 | |||
43 | FILES:${PN} += "${datadir} \ | ||
44 | ${libdir}/oneVPL/libvpl_wayland.so \ | ||
45 | " | ||
diff --git a/recipes-multimedia/vpl/files/0001-Add-cstdint-header-to-resolve-build-issue-with-gcc-1.patch b/recipes-multimedia/vpl/files/0001-Add-cstdint-header-to-resolve-build-issue-with-gcc-1.patch new file mode 100644 index 00000000..3158aef6 --- /dev/null +++ b/recipes-multimedia/vpl/files/0001-Add-cstdint-header-to-resolve-build-issue-with-gcc-1.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From a0fe1b898ba446fdd45ff7fdad18d442140df090 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yogesh Tyagi <yogesh.tyagi@intel.com> | ||
3 | Date: Sun, 11 May 2025 17:21:17 +0530 | ||
4 | Subject: [PATCH] Add cstdint header to resolve build issue with gcc-15 | ||
5 | |||
6 | Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com> | ||
7 | |||
8 | Upstream-Status: Submitted [https://github.com/intel/libvpl-tools/pull/7] | ||
9 | --- | ||
10 | tools/legacy/sample_vpp/src/sample_vpp_frc_adv.cpp | 3 ++- | ||
11 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/tools/legacy/sample_vpp/src/sample_vpp_frc_adv.cpp b/tools/legacy/sample_vpp/src/sample_vpp_frc_adv.cpp | ||
14 | index 29d4a99..91baf8b 100644 | ||
15 | --- a/tools/legacy/sample_vpp/src/sample_vpp_frc_adv.cpp | ||
16 | +++ b/tools/legacy/sample_vpp/src/sample_vpp_frc_adv.cpp | ||
17 | @@ -5,6 +5,7 @@ | ||
18 | ############################################################################*/ | ||
19 | |||
20 | #include "sample_vpp_frc_adv.h" | ||
21 | +#include <cstdint> | ||
22 | #include <math.h> | ||
23 | #include <algorithm> | ||
24 | #include "vm/strings_defs.h" | ||
25 | @@ -179,4 +180,4 @@ mfxU64 FRCAdvancedChecker::GetExpectedPTS(mfxU32 frameNumber, mfxU64 timeOffset, | ||
26 | |||
27 | } // mfxU64 FRCAdvancedChecker::GetExpectedPTS( mfxU32 frameNumber, mfxU64 timeOffset, mfxU64 timeJump ) | ||
28 | |||
29 | -/* EOF */ | ||
30 | \ No newline at end of file | ||
31 | +/* EOF */ | ||
32 | -- | ||
33 | 2.43.0 | ||
34 | |||
diff --git a/recipes-multimedia/vpl/files/0001-Update-vpl-inspect-to-remove-ReportedStats.patch b/recipes-multimedia/vpl/files/0001-Update-vpl-inspect-to-remove-ReportedStats.patch new file mode 100644 index 00000000..8ccd7e46 --- /dev/null +++ b/recipes-multimedia/vpl/files/0001-Update-vpl-inspect-to-remove-ReportedStats.patch | |||
@@ -0,0 +1,73 @@ | |||
1 | From 39ec70e27cb6887d6b9e6abc231d1052f02c4d9b Mon Sep 17 00:00:00 2001 | ||
2 | From: "Yuan, Jenny" <jenny.yuan@intel.com> | ||
3 | Date: Thu, 13 Feb 2025 11:54:46 -0800 | ||
4 | Subject: [PATCH] Update vpl-inspect to remove ReportedStats | ||
5 | |||
6 | Since experimental API mfxEncoderDescription::encoder::ReportedStats is | ||
7 | going to be removed, update vpl-inspect to remove ReportedStats field | ||
8 | report. | ||
9 | |||
10 | Upstream-Status: Backport [https://github.com/intel/libvpl-tools/commit/39ec70e27cb6887d6b9e6abc231d1052f02c4d9b] | ||
11 | --- | ||
12 | tools/cli/vpl-inspect/src/vpl-inspect.cpp | 38 ----------------------- | ||
13 | 1 file changed, 38 deletions(-) | ||
14 | |||
15 | diff --git a/tools/cli/vpl-inspect/src/vpl-inspect.cpp b/tools/cli/vpl-inspect/src/vpl-inspect.cpp | ||
16 | index e872316..b6e302f 100644 | ||
17 | --- a/tools/cli/vpl-inspect/src/vpl-inspect.cpp | ||
18 | +++ b/tools/cli/vpl-inspect/src/vpl-inspect.cpp | ||
19 | @@ -113,22 +113,6 @@ const char *_print_MediaAdapterType(mfxMediaAdapterType type) { | ||
20 | return "<unknown media adapter type>"; | ||
21 | } | ||
22 | |||
23 | -#ifdef ONEVPL_EXPERIMENTAL | ||
24 | -const char *_print_EncodeStatsType(mfxU16 type) { | ||
25 | - switch (type) { | ||
26 | - STRING_OPTION(MFX_ENCODESTATS_LEVEL_BLK); | ||
27 | - STRING_OPTION(MFX_ENCODESTATS_LEVEL_SLICE); | ||
28 | - STRING_OPTION(MFX_ENCODESTATS_LEVEL_TILE); | ||
29 | - STRING_OPTION(MFX_ENCODESTATS_LEVEL_FRAME); | ||
30 | - | ||
31 | - default: | ||
32 | - break; | ||
33 | - } | ||
34 | - | ||
35 | - return "<unknown encode stats type>"; | ||
36 | -} | ||
37 | -#endif | ||
38 | - | ||
39 | #ifdef ONEVPL_EXPERIMENTAL | ||
40 | const char *_print_SurfaceType(mfxSurfaceType type) { | ||
41 | switch (type) { | ||
42 | @@ -549,28 +533,6 @@ int main(int argc, char *argv[]) { | ||
43 | "", | ||
44 | enc->Codecs[codec].BiDirectionalPrediction); | ||
45 | |||
46 | -#ifdef ONEVPL_EXPERIMENTAL | ||
47 | - // Once ReportedStats is moved out of experimental API the struct version of mfxEncoderDescription should | ||
48 | - // be updated, and that can be used to know whether this field is valid. | ||
49 | - // For now, just check implementation API version. | ||
50 | - mfxVersion reqApiVersionReportedStats = {}; | ||
51 | - reqApiVersionReportedStats.Major = 2; | ||
52 | - reqApiVersionReportedStats.Minor = 7; | ||
53 | - if (idesc->ApiVersion.Version >= reqApiVersionReportedStats.Version) { | ||
54 | - mfxU16 reportedStats = enc->Codecs[codec].ReportedStats; | ||
55 | - if (reportedStats) { | ||
56 | - for (mfxU16 statMask = 1; statMask != 0; statMask <<= 1) { | ||
57 | - if (reportedStats & statMask) { | ||
58 | - const char *statStr = _print_EncodeStatsType(statMask); | ||
59 | - printf("%4sReportedStats: %s\n", "", statStr); | ||
60 | - } | ||
61 | - } | ||
62 | - } | ||
63 | - else { | ||
64 | - printf("%4sReportedStats: 0\n", ""); | ||
65 | - } | ||
66 | - } | ||
67 | -#endif | ||
68 | for (int profile = 0; profile < enc->Codecs[codec].NumProfiles; profile++) { | ||
69 | printf("%6sProfile: %s\n", | ||
70 | "", | ||
71 | -- | ||
72 | 2.43.0 | ||
73 | |||
diff --git a/recipes-multimedia/vpl/files/0001-vpl.pc.in-dont-pass-pcfiledir-to-cflags.patch b/recipes-multimedia/vpl/files/0001-vpl.pc.in-dont-pass-pcfiledir-to-cflags.patch new file mode 100644 index 00000000..f9a568a7 --- /dev/null +++ b/recipes-multimedia/vpl/files/0001-vpl.pc.in-dont-pass-pcfiledir-to-cflags.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | From ff715f4c543ddabc5c90160d0ae5c5598e8e1289 Mon Sep 17 00:00:00 2001 | ||
2 | From: Markus Volk <f_l_k@t-online.de> | ||
3 | Date: Thu, 15 Jun 2023 13:43:32 +0200 | ||
4 | Subject: [PATCH] vpl.pc.in: dont pass pcfiledir to cflags | ||
5 | |||
6 | Signed-off-by: Markus Volk <f_l_k@t-online.de> | ||
7 | |||
8 | Upstream-Status: Inappropriate [oe specific] | ||
9 | --- | ||
10 | libvpl/pkgconfig/vpl.pc.in | 4 ++-- | ||
11 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
12 | |||
13 | diff --git a/libvpl/pkgconfig/vpl.pc.in b/libvpl/pkgconfig/vpl.pc.in | ||
14 | index aa9b158..b4e85ff 100644 | ||
15 | --- a/libvpl/pkgconfig/vpl.pc.in | ||
16 | +++ b/libvpl/pkgconfig/vpl.pc.in | ||
17 | @@ -7,6 +7,6 @@ Description: Accelerated video decode, encode, and frame processing capabilities | ||
18 | Version: @API_VERSION_MAJOR@.@API_VERSION_MINOR@ | ||
19 | URL: https://github.com/intel/libvpl | ||
20 | |||
21 | -Libs: -L${libdir} -l@OUTPUT_NAME@ @VPL_PKGCONFIG_DEPENDENT_LIBS@ | ||
22 | +Libs: -L@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -l@OUTPUT_NAME@ @VPL_PKGCONFIG_DEPENDENT_LIBS@ | ||
23 | Libs.private: @VPL_PKGCONFIG_PRIVATE_LIBS@ | ||
24 | -Cflags: -I${includedir} -I${includedir}/vpl | ||
25 | +Cflags: -I@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@ -I@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@/vpl | ||
diff --git a/recipes-multimedia/vpl/libvpl-tools_1.3.0.bb b/recipes-multimedia/vpl/libvpl-tools_1.3.0.bb new file mode 100644 index 00000000..9154eb62 --- /dev/null +++ b/recipes-multimedia/vpl/libvpl-tools_1.3.0.bb | |||
@@ -0,0 +1,43 @@ | |||
1 | SUMMARY = "Intel Video Processing Library Tools" | ||
2 | DESCRIPTION = "Intel Video Processing Library (VPL) Tools provides \ | ||
3 | access to hardware accelerated video decode, encode and video processing \ | ||
4 | capabilities on Intel® GPUs use cases." | ||
5 | |||
6 | HOMEPAGE = "https://github.com/intel/libvpl-tools" | ||
7 | LICENSE = "MIT" | ||
8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=c18ea6bb4786a26bf4eee88a7424a408 \ | ||
9 | file://third-party-programs.txt;md5=ddf05049184e74942f45b0ca4cc69b8a" | ||
10 | |||
11 | SRC_URI = "git://github.com/intel/libvpl-tools.git;protocol=https;branch=main \ | ||
12 | file://0001-Update-vpl-inspect-to-remove-ReportedStats.patch \ | ||
13 | file://0001-Add-cstdint-header-to-resolve-build-issue-with-gcc-1.patch \ | ||
14 | " | ||
15 | |||
16 | SRCREV = "82eab13ecec99f34e0f1d5dac490611b604406c9" | ||
17 | |||
18 | inherit cmake | ||
19 | DEPENDS += "libva libvpl pkgconfig-native" | ||
20 | |||
21 | PACKAGECONFIG ??= "tools" | ||
22 | PACKAGECONFIG[tools] = "-DENABLE_WAYLAND=ON, -DENABLE_WAYLAND=OFF, wayland wayland-native wayland-protocols" | ||
23 | |||
24 | do_install:append() { | ||
25 | mkdir -p ${D}${datadir}/VPL/samples | ||
26 | mv ${D}${bindir}/sample_* ${D}${datadir}/VPL/samples | ||
27 | mv ${D}${bindir}/metrics_monitor ${D}${datadir}/VPL/samples | ||
28 | } | ||
29 | |||
30 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
31 | |||
32 | FILES_SOLIBSDEV = "" | ||
33 | |||
34 | FILES:${PN} += " ${datadir}/VPL/samples \ | ||
35 | ${libdir}/libcttmetrics.so \ | ||
36 | ${libdir}/vpl-tools/libvpl_wayland.* \ | ||
37 | " | ||
38 | |||
39 | FILES:${PN}-dev += "${libdir}/vpl-tools/libvpl_wayland.so \ | ||
40 | " | ||
41 | |||
42 | FILES:${PN}-doc += " ${datadir}/vpl-tools \ | ||
43 | " | ||
diff --git a/recipes-multimedia/vpl/libvpl_2.14.0.bb b/recipes-multimedia/vpl/libvpl_2.14.0.bb new file mode 100644 index 00000000..3c35a892 --- /dev/null +++ b/recipes-multimedia/vpl/libvpl_2.14.0.bb | |||
@@ -0,0 +1,43 @@ | |||
1 | SUMMARY = "Intel Video Processing Library" | ||
2 | DESCRIPTION = "Intel Video Processing Library (VPL) provides \ | ||
3 | a single video processing API for encode, decode, and video processing \ | ||
4 | that works across a wide range of accelerators." | ||
5 | |||
6 | HOMEPAGE = "https://github.com/intel/libvpl" | ||
7 | LICENSE = "MIT" | ||
8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=c18ea6bb4786a26bf4eee88a7424a408 \ | ||
9 | file://third-party-programs.txt;md5=ddf05049184e74942f45b0ca4cc69b8a" | ||
10 | |||
11 | SRC_URI = "git://github.com/intel/libvpl.git;protocol=https;branch=main \ | ||
12 | file://0001-vpl.pc.in-dont-pass-pcfiledir-to-cflags.patch \ | ||
13 | " | ||
14 | SRCREV = "025d43d086a3e663184cb49febe86152bf05409f" | ||
15 | |||
16 | inherit cmake | ||
17 | DEPENDS += "libva pkgconfig-native" | ||
18 | |||
19 | PACKAGECONFIG ??= "tools" | ||
20 | PACKAGECONFIG[tools] = "-DBUILD_TOOLS=ON, -DBUILD_TOOLS=OFF, wayland wayland-native wayland-protocols" | ||
21 | |||
22 | EXTRA_OECMAKE = "-DBUILD_EXAMPLES=ON" | ||
23 | |||
24 | do_install:append() { | ||
25 | mkdir -p ${D}${datadir}/VPL/samples | ||
26 | mv ${D}${bindir}/hello-* ${D}${datadir}/VPL/samples | ||
27 | } | ||
28 | |||
29 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
30 | |||
31 | PACKAGES =+ "${PN}-examples" | ||
32 | |||
33 | RREPLACES:${PN} = "onevpl" | ||
34 | RCONFLICTS:${PN} = "onevpl" | ||
35 | |||
36 | FILES:${PN}-examples = "${datadir}/vpl \ | ||
37 | " | ||
38 | |||
39 | FILES_SOLIBSDEV = "" | ||
40 | FILES:${PN}-dev += "${libdir}/libvpl.so" | ||
41 | |||
42 | FILES:${PN} += " ${datadir}/VPL/samples \ | ||
43 | " | ||
diff --git a/recipes-multimedia/onevpl/onevpl-intel-gpu_22.3.2.bb b/recipes-multimedia/vpl/vpl-gpu-rt_25.1.4.bb index 88b9aa37..0a0e6972 100644 --- a/recipes-multimedia/onevpl/onevpl-intel-gpu_22.3.2.bb +++ b/recipes-multimedia/vpl/vpl-gpu-rt_25.1.4.bb | |||
@@ -2,8 +2,8 @@ SUMMARY = "Intel(R) oneVPL runtime for Intel GPU accelerated media processing" | |||
2 | DESCRIPTION = "Intel(R) oneVPL runtime provides an runtime to access hardware-accelerated \ | 2 | DESCRIPTION = "Intel(R) oneVPL runtime provides an runtime to access hardware-accelerated \ |
3 | video decode, encode and filtering on Intel® graphics." | 3 | video decode, encode and filtering on Intel® graphics." |
4 | 4 | ||
5 | HOMEPAGE = "https://github.com/oneapi-src/oneVPL-intel-gpu" | 5 | HOMEPAGE = "https://github.com/intel/vpl-gpu-rt" |
6 | BUGTRACKER = "https://github.com/oneapi-src/oneVPL-intel-gpu/issues" | 6 | BUGTRACKER = "https://github.com/intel/vpl-gpu-rt/issues" |
7 | 7 | ||
8 | LICENSE = "MIT" | 8 | LICENSE = "MIT" |
9 | LIC_FILES_CHKSUM = "file://LICENSE;md5=eb8cb45b9b57dbaa9fcc9adc4230202b" | 9 | LIC_FILES_CHKSUM = "file://LICENSE;md5=eb8cb45b9b57dbaa9fcc9adc4230202b" |
@@ -14,16 +14,19 @@ PE = "1" | |||
14 | COMPATIBLE_HOST = '(x86_64).*-linux' | 14 | COMPATIBLE_HOST = '(x86_64).*-linux' |
15 | COMPATIBLE_HOST:x86-x32 = "null" | 15 | COMPATIBLE_HOST:x86-x32 = "null" |
16 | 16 | ||
17 | DEPENDS += "libdrm libva intel-media-driver onevpl pkgconfig-native" | 17 | DEPENDS += "libdrm libva intel-media-driver libvpl pkgconfig-native" |
18 | RDEPENDS:${PN} += "intel-media-driver" | ||
18 | 19 | ||
19 | SRC_URI = "git://github.com/oneapi-src/oneVPL-intel-gpu.git;protocol=https;branch=intel-onevpl-22.3;lfs=0 \ | 20 | SRC_URI = "git://github.com/intel/vpl-gpu-rt.git;protocol=https;nobranch=1;lfs=0 \ |
20 | " | 21 | " |
21 | 22 | ||
22 | SRCREV = "0f7e5f41160bb5a48e24f7cec2ced1ef9dd9c5be" | 23 | SRCREV = "c65990e456acf901597a76b22407232679152547" |
23 | S = "${WORKDIR}/git" | ||
24 | 24 | ||
25 | FILES:${PN} += " \ | 25 | FILES:${PN} += " \ |
26 | ${libdir}/libmfx-gen/enctools.so \ | 26 | ${libdir}/libmfx-gen/enctools.so \ |
27 | " | 27 | " |
28 | 28 | ||
29 | inherit cmake | 29 | inherit cmake |
30 | |||
31 | RREPLACES:${PN} = "onevpl-intel-gpu" | ||
32 | RCONFLICTS:${PN} = "onevpl-intel-gpu" | ||
diff --git a/recipes-oneapi/crypto/intel-crypto-mb/0001-crypto-mb-Make-sure-libs-are-installed-correctly.patch b/recipes-oneapi/crypto/intel-crypto-mb/0001-crypto-mb-Make-sure-libs-are-installed-correctly.patch new file mode 100644 index 00000000..c47c8de5 --- /dev/null +++ b/recipes-oneapi/crypto/intel-crypto-mb/0001-crypto-mb-Make-sure-libs-are-installed-correctly.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From 3b7b4eca54aa8d851e37f60c74e4a027fa7b21f2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Anuj Mittal <anuj.mittal@intel.com> | ||
3 | Date: Wed, 14 Jun 2023 13:18:45 +0800 | ||
4 | Subject: [PATCH] crypto-mb: Make sure libs are installed correctly | ||
5 | |||
6 | Dont assume that "lib" is always the correct destination. This fixes | ||
7 | multilib builds when libdir != /usr/lib. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
12 | --- | ||
13 | sources/ippcp/crypto_mb/src/CMakeLists.txt | 6 +++--- | ||
14 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
15 | |||
16 | diff --git a/sources/ippcp/crypto_mb/src/CMakeLists.txt b/sources/ippcp/crypto_mb/src/CMakeLists.txt | ||
17 | index c9cad06..31f52bd 100644 | ||
18 | --- a/sources/ippcp/crypto_mb/src/CMakeLists.txt | ||
19 | +++ b/sources/ippcp/crypto_mb/src/CMakeLists.txt | ||
20 | @@ -123,8 +123,8 @@ endif(DYNAMIC_LIB OR MB_STANDALONE) | ||
21 | # Installation of the shared library | ||
22 | if (MB_STANDALONE) # standalone crypto_mb's cmake run | ||
23 | install(TARGETS ${MB_DYN_LIB_TARGET} | ||
24 | - LIBRARY DESTINATION "lib" | ||
25 | - RUNTIME DESTINATION "lib" | ||
26 | + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
27 | + RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
28 | PUBLIC_HEADER DESTINATION "include/crypto_mb") | ||
29 | elseif (DYNAMIC_LIB) # build from ippcp's cmake | ||
30 | install(TARGETS ${MB_DYN_LIB_TARGET} | ||
31 | @@ -154,7 +154,7 @@ endif() | ||
32 | # Static lib installation | ||
33 | if(MB_STANDALONE) | ||
34 | install(TARGETS ${MB_STATIC_LIB_TARGET} | ||
35 | - ARCHIVE DESTINATION "lib" | ||
36 | + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
37 | PUBLIC_HEADER DESTINATION "include/crypto_mb") | ||
38 | else() | ||
39 | install(TARGETS ${MB_STATIC_LIB_TARGET} | ||
40 | -- | ||
41 | 2.37.3 | ||
42 | |||
diff --git a/recipes-oneapi/crypto/intel-crypto-mb_2021.12.1.bb b/recipes-oneapi/crypto/intel-crypto-mb_2021.12.1.bb new file mode 100644 index 00000000..2b3fcca7 --- /dev/null +++ b/recipes-oneapi/crypto/intel-crypto-mb_2021.12.1.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | SUMMARY = "Crypto Multi-buffer Library" | ||
2 | DESCRIPTION = "Intel® Integrated Performance Primitives (Intel® IPP) Cryptography \ | ||
3 | is a secure, fast and lightweight library of building blocks for cryptography, \ | ||
4 | highly-optimized for various Intel® CPUs." | ||
5 | HOMEPAGE = "https://github.com/intel/ipp-crypto" | ||
6 | |||
7 | LICENSE = "Apache-2.0" | ||
8 | |||
9 | LIC_FILES_CHKSUM = "file://../../../LICENSE;md5=d94a5b4dbbc5c6a0c2ce95ab337df6c4" | ||
10 | |||
11 | IPP_BRANCH = "ipp-crypto_${@'_'.join(d.getVar('PV').rsplit('.')[-3:])}" | ||
12 | |||
13 | SRC_URI = "git://github.com/intel/ipp-crypto;protocol=https;branch=${IPP_BRANCH} \ | ||
14 | file://0001-CMakeLists.txt-exclude-host-system-headers.patch;striplevel=4 \ | ||
15 | file://0002-cmake-exclude-Yocto-build-flags.patch;striplevel=4 \ | ||
16 | file://0001-crypto-mb-Make-sure-libs-are-installed-correctly.patch;striplevel=4 \ | ||
17 | " | ||
18 | SRCREV = "7d6ac349507258f49d00909df33d5dea4ff77f39" | ||
19 | |||
20 | S = "${UNPACKDIR}/${PN}-${PV}/sources/ippcp/crypto_mb" | ||
21 | |||
22 | DEPENDS = "openssl" | ||
23 | |||
24 | inherit cmake pkgconfig | ||
25 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
26 | |||
27 | EXTRA_OECMAKE += " -DARCH=intel64" | ||
28 | EXTRA_OECMAKE += " -DTOOLCHAIN_OPTIONS='${TOOLCHAIN_OPTIONS}'" | ||
diff --git a/recipes-oneapi/crypto/intel-crypto-mb_git.bb b/recipes-oneapi/crypto/intel-crypto-mb_git.bb deleted file mode 100644 index 0be7b17c..00000000 --- a/recipes-oneapi/crypto/intel-crypto-mb_git.bb +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | SUMMARY = "Crypto Multi-buffer Library" | ||
2 | DESCRIPTION = "Intel® Integrated Performance Primitives (Intel® IPP) Cryptography \ | ||
3 | is a secure, fast and lightweight library of building blocks for cryptography, \ | ||
4 | highly-optimized for various Intel® CPUs." | ||
5 | HOMEPAGE = "https://github.com/intel/ipp-crypto" | ||
6 | |||
7 | LICENSE = "Apache-2.0" | ||
8 | |||
9 | LIC_FILES_CHKSUM = "file://../../../LICENSE;md5=e787af283468feca985d6b865d27d95b" | ||
10 | |||
11 | SRC_URI = " \ | ||
12 | git://github.com/intel/ipp-crypto;protocol=https;branch=develop \ | ||
13 | file://0001-CMakeLists.txt-exclude-host-system-headers.patch;striplevel=4 \ | ||
14 | file://0002-cmake-exclude-Yocto-build-flags.patch;striplevel=4 \ | ||
15 | " | ||
16 | SRCREV = "46944bd18e6dbad491ef9b9a3404303ef7680c09" | ||
17 | |||
18 | S = "${WORKDIR}/git/sources/ippcp/crypto_mb" | ||
19 | PV = "2021.5+git${SRCPV}" | ||
20 | |||
21 | DEPENDS = "openssl" | ||
22 | |||
23 | inherit cmake pkgconfig | ||
24 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
25 | |||
26 | EXTRA_OECMAKE += " -DARCH=intel64" | ||
27 | EXTRA_OECMAKE += " -DTOOLCHAIN_OPTIONS='${TOOLCHAIN_OPTIONS}'" | ||
diff --git a/recipes-oneapi/onedpl/onedpl_2021.6.1.bb b/recipes-oneapi/onedpl/onedpl_2022.8.0.bb index eb8fccc8..9e2547a1 100644 --- a/recipes-oneapi/onedpl/onedpl_2021.6.1.bb +++ b/recipes-oneapi/onedpl/onedpl_2022.8.0.bb | |||
@@ -6,14 +6,12 @@ performance parallel applications." | |||
6 | HOMEPAGE = "https://github.com/oneapi-src/oneDPL" | 6 | HOMEPAGE = "https://github.com/oneapi-src/oneDPL" |
7 | 7 | ||
8 | LICENSE = "Apache-2.0-with-LLVM-exception" | 8 | LICENSE = "Apache-2.0-with-LLVM-exception" |
9 | LIC_FILES_CHKSUM = "file://licensing/LICENSE.txt;md5=2e982d844baa4df1c80de75470e0c5cb \ | 9 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2e982d844baa4df1c80de75470e0c5cb \ |
10 | file://licensing/third-party-programs.txt;md5=74cbe473c3521af32a92f662c44aa6bd" | 10 | file://third-party-programs.txt;md5=409cd5c825a23043b6bb347861d34b35" |
11 | 11 | ||
12 | S = "${WORKDIR}/git" | 12 | SRC_URI = "git://github.com/uxlfoundation/oneDPL.git;protocol=https;branch=release/2022.8.0 \ |
13 | |||
14 | SRC_URI = "git://github.com/oneapi-src/oneDPL.git;protocol=https;branch=release/2021.6 \ | ||
15 | " | 13 | " |
16 | SRCREV = "bfa2cd2fc07ea105a07d4772276e8c15f7530cd4" | 14 | SRCREV = "89d8d8befd4da2cb52f3724f668d17d7e39d42cf" |
17 | 15 | ||
18 | do_compile[noexec] = "1" | 16 | do_compile[noexec] = "1" |
19 | do_configure[noexec] = "1" | 17 | do_configure[noexec] = "1" |
diff --git a/recipes-oneapi/setup-oneapi-env/setup-intel-oneapi-env_2022.0.1-3633.bb b/recipes-oneapi/setup-oneapi-env/setup-intel-oneapi-env_2023.0.0-25370.bb index 81653384..f66ffeea 100644 --- a/recipes-oneapi/setup-oneapi-env/setup-intel-oneapi-env_2022.0.1-3633.bb +++ b/recipes-oneapi/setup-oneapi-env/setup-intel-oneapi-env_2023.0.0-25370.bb | |||
@@ -9,7 +9,7 @@ SRC_URI = "file://intel-oneapi-runtime.conf" | |||
9 | 9 | ||
10 | do_install() { | 10 | do_install() { |
11 | mkdir -p ${D}${sysconfdir}/ld.so.conf.d/ | 11 | mkdir -p ${D}${sysconfdir}/ld.so.conf.d/ |
12 | install -m 644 ${WORKDIR}/intel-oneapi-runtime.conf ${D}${sysconfdir}/ld.so.conf.d/ | 12 | install -m 644 ${UNPACKDIR}/intel-oneapi-runtime.conf ${D}${sysconfdir}/ld.so.conf.d/ |
13 | } | 13 | } |
14 | 14 | ||
15 | pkg_postinst_ontarget:${PN}() { | 15 | pkg_postinst_ontarget:${PN}() { |
@@ -17,3 +17,4 @@ if [ x"$D" = "x" ]; then | |||
17 | if [ -x /sbin/ldconfig ]; then /sbin/ldconfig ; fi | 17 | if [ -x /sbin/ldconfig ]; then /sbin/ldconfig ; fi |
18 | fi | 18 | fi |
19 | } | 19 | } |
20 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/recipes-rt/images/core-image-rt-sdk.bb b/recipes-rt/images/core-image-rt-sdk.bb index 920c4cee..1270283e 100644 --- a/recipes-rt/images/core-image-rt-sdk.bb +++ b/recipes-rt/images/core-image-rt-sdk.bb | |||
@@ -13,7 +13,7 @@ tools for real-time use. It includes the full meta-toolchain, development \ | |||
13 | headers and libraries to form a standalone SDK." | 13 | headers and libraries to form a standalone SDK." |
14 | DEPENDS += "linux-intel-rt" | 14 | DEPENDS += "linux-intel-rt" |
15 | 15 | ||
16 | IMAGE_FEATURES += "dev-pkgs tools-sdk tools-debug eclipse-debug tools-profile tools-testapps debug-tweaks" | 16 | IMAGE_FEATURES += "dev-pkgs tools-sdk tools-debug eclipse-debug tools-profile tools-testapps" |
17 | 17 | ||
18 | IMAGE_INSTALL += "rt-tests hwlatdetect kernel-dev" | 18 | IMAGE_INSTALL += "rt-tests hwlatdetect kernel-dev" |
19 | 19 | ||
diff --git a/recipes-selftest/images/files/incorrect.crt b/recipes-selftest/images/files/incorrect.crt deleted file mode 100644 index 3a2411ab..00000000 --- a/recipes-selftest/images/files/incorrect.crt +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | -----BEGIN CERTIFICATE----- | ||
2 | MIIDCTCCAfGgAwIBAgIJAIYXAHv3cQNjMA0GCSqGSIb3DQEBCwUAMBsxGTAXBgNV | ||
3 | BAMMEFRlc3QgWW9jdG8gdGhpbmcwHhcNMTcwMTI1MjI1MjI3WhcNMTgwMTI1MjI1 | ||
4 | MjI3WjAbMRkwFwYDVQQDDBBUZXN0IFlvY3RvIHRoaW5nMIIBIjANBgkqhkiG9w0B | ||
5 | AQEFAAOCAQ8AMIIBCgKCAQEAukI2ioMeL8qaXxMtryonAT51w+Zre0wB8bDBPuXD | ||
6 | SwDVXNWfiKKTfCVEkLEUnsUEd7jiKswCT5orTwCD7aQK0mTrkAWEi8hEI3MkNoeh | ||
7 | T51gkuTfv7A/HgPkhhlU4UQqipI6XoLf7o7PUV33ZfB43//iKY2kLBdsFvs4ALWE | ||
8 | 31hLOkCFb+nqMnfZxq7DgvBwIdxJdLQvaskpDMfkna+zE3QWqkH5v55atW8Bunwk | ||
9 | /6q5kqNhyrjZb4i0BqJ5AHFUEQzlDcjpyFVUtR14r0IxjBFMHZXrx4uLe7KvGf/4 | ||
10 | GqpqeFOPqxMsfC5ILJJ7nvwFViqftGgtWg/12bKMTB5saQIDAQABo1AwTjAdBgNV | ||
11 | HQ4EFgQURA8KbgpiGfS2+7MT0H5AvpxeYLowHwYDVR0jBBgwFoAURA8KbgpiGfS2 | ||
12 | +7MT0H5AvpxeYLowDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAK9n+ | ||
13 | 9T+hlM2kEpsUgtyihEJbGHzbw+Pj11b0ICntCVuPKewtBMveYp8lejrQwMFNGRMt | ||
14 | ZQe1LFb9HcLeM3MLUz9Lm4BJIjkey3Jfq1AskROYk/bJnFIJIx6P3U9gBa20P46X | ||
15 | LH3g6yub1HR7KZC9nfBsak3FPoJR/SYTJs0HsMeL4878+2IbETA4BL0kbKW48FFW | ||
16 | jF4f6don0eiaF8b4KkfbWKrCaEm+LMxbyBEQ6fIb1cmGY8A9A5houjmgi6YWSkoi | ||
17 | SLpOC9TZ2R51fO9rRsv7XwLK0V9o9YaEYPBg6V/TeJl5nxAZBeVTKVTQbBGZY+l2 | ||
18 | nzN0pKsl7RXLf3SRYA== | ||
19 | -----END CERTIFICATE----- | ||
diff --git a/recipes-selftest/images/files/incorrect.key b/recipes-selftest/images/files/incorrect.key deleted file mode 100644 index d05475b6..00000000 --- a/recipes-selftest/images/files/incorrect.key +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | -----BEGIN RSA PRIVATE KEY----- | ||
2 | MIIEowIBAAKCAQEAukI2ioMeL8qaXxMtryonAT51w+Zre0wB8bDBPuXDSwDVXNWf | ||
3 | iKKTfCVEkLEUnsUEd7jiKswCT5orTwCD7aQK0mTrkAWEi8hEI3MkNoehT51gkuTf | ||
4 | v7A/HgPkhhlU4UQqipI6XoLf7o7PUV33ZfB43//iKY2kLBdsFvs4ALWE31hLOkCF | ||
5 | b+nqMnfZxq7DgvBwIdxJdLQvaskpDMfkna+zE3QWqkH5v55atW8Bunwk/6q5kqNh | ||
6 | yrjZb4i0BqJ5AHFUEQzlDcjpyFVUtR14r0IxjBFMHZXrx4uLe7KvGf/4GqpqeFOP | ||
7 | qxMsfC5ILJJ7nvwFViqftGgtWg/12bKMTB5saQIDAQABAoIBAQCEtAox86s9N6d2 | ||
8 | 164z3998Zmj3UyL+7K9x6JI2YvMabBSYGOeaLOLRj6fjQxdC63H8brBM958p4di7 | ||
9 | Z82XMco4Dok6yoOeJ+hMLYv+gfGvTJxy7DhyVXsSwok99axg9vUsV3TYw3wSdpNF | ||
10 | EKLkcUldpu0W2ADBHUr4sLI85xctHH3Kt0sNDzhgADFa5rDYACXTKHtFOhEqBIwN | ||
11 | FmbuRQirnErUkI3Pczgl2Xy1MlaozH9CB+bLAb5q2FYu4DKgjl4UorC+w2HV41KH | ||
12 | XoL7L36XXqLRHBfEAwOWb8yro+TK8T7gW7aagTI1wgsbbQkjQmOHxclmJACdMOiJ | ||
13 | DjPeR0GBAoGBAO7i2eaEoKa9QlKokN+93uOJD/F6DBi6jF0vGOqWlF8AVTj3kGL3 | ||
14 | X8fY/avrSlg7hKZWdei+Q5PyZViKxqmHjq781ZisKck52Tqz4s7ylqRXSgStinZr | ||
15 | UqrkShCqZ3g1W91gIeVPQz0/b+gBskoHzQ5WQHfV5v9S1PaxjzcYtCrRAoGBAMea | ||
16 | LcA2jjuEjqxa5v5fh8ygcHasJMRKJxW1OCKiQ94DjjzPsdVqZ1sJZChLW/N3nxe7 | ||
17 | wHlNJmsGbJ2w1zD5+qkkPjLq5Q4B5KAd62NNrWaEHFdEc/PPkn4xP7Zkfuu5K+m2 | ||
18 | 7z/MF4ibvVh9PvD3HY8FWKEtkqB4rfD8AoUOVd4ZAoGAXxXAsfa8k2Hl0kzyTXyg | ||
19 | CWV3CSERS46FbFngyw9gw2e4hFJWEG5ym3ONlS60iuY16JelmxyQfYUQPewPI0+n | ||
20 | xZMx2fE9OLFj+++6KbF5sLRl6/K/mF8jqo3vxS5uvPRQOo+XLlUcaHalrm1ub/Um | ||
21 | 87v1MT3dEmgACKmoXb/hhuECgYAZluiapePiOYJZEmZe4jx0vXTtofAswhz0qYEC | ||
22 | 3663vdj0buQrqjKJ91BB4jdtpT5eOpHYe02blv1B0jQkcUfze1QGDxtCineXF37g | ||
23 | Aktiwzkm7v22mjv7tbCnX4buDZVVp0BQ+4dg2iaSO6xgFC5T8amFMGSF8jLKnGRu | ||
24 | ToIvsQKBgADBTse2vnI85NRsYq48ztQuIU2zlGXIAcoPSvGb8Vhty/joc0jWcI5P | ||
25 | raGXBARbuVlcEapK3mDRfO0CQjDaTPK4EYYJwGp8k33Hkkcbgs4kfm308jRsclMr | ||
26 | YeMwQsYyOv45x4iPCwrqZEhpPDvACBi7DB6QvZ0++vJbobTt1jyi | ||
27 | -----END RSA PRIVATE KEY----- | ||
diff --git a/recipes-selftest/images/files/refkit-db.crt b/recipes-selftest/images/files/refkit-db.crt deleted file mode 100644 index 22ad6a89..00000000 --- a/recipes-selftest/images/files/refkit-db.crt +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | -----BEGIN CERTIFICATE----- | ||
2 | MIIC+zCCAeOgAwIBAgIJANT2SMJoGZGsMA0GCSqGSIb3DQEBCwUAMBQxEjAQBgNV | ||
3 | BAMMCXJlZmtpdC1kYjAeFw0xNzA0MjAxMjA2MzJaFw0xODA0MjAxMjA2MzJaMBQx | ||
4 | EjAQBgNVBAMMCXJlZmtpdC1kYjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC | ||
5 | ggEBALQcIqYiAVfN8U+vcuPZAYBQVe8CXuuZNct/Knn/tT7sXZIGMCDnla2khC4/ | ||
6 | +tdG3Umo6ON5SfaPCx3+Y6jRY6PWDU5sZlzWZibRJpjUT3bJZUhYEwgxvOVHJWWV | ||
7 | OYlfAvHFBhdYygn99h7Fl9qjThpIvs+WJwRLt21ntlAYBHNR0mot3zur8i2V16i4 | ||
8 | qDChq4uSK2A+OuWGQHHBPy0ukOfW7MzCC3mDcW32o6lMzUaB3O/sUb6BKvF4c0Hb | ||
9 | VM58zqLjkE9FGvk9iPwO7dNpIkz6CmnRSMCqqTqzjxA6dqgMej3Yec4clmL0Bu5H | ||
10 | 6OBpka7qNM/aqLQ5XvN60IhIR2kCAwEAAaNQME4wHQYDVR0OBBYEFGhgESWFFHgb | ||
11 | Gp9GEuYh5O/7O6rdMB8GA1UdIwQYMBaAFGhgESWFFHgbGp9GEuYh5O/7O6rdMAwG | ||
12 | A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAI/ShHxDR8pr/YeD0O910yBS | ||
13 | cxiqMnH7pfTJEaNoTbed5tlGJNzHwjv5sJj87jRuEJs9RG4zCRG4KdYtBs9nj5aF | ||
14 | nWNyv2RfDePJYxlx1H1MnHdG2iCXbbzdwh/zQDge58xVBXK6JE+zipMMMGDan281 | ||
15 | 9vuwH7MA3cSmvOI3waPv2aGG+eukpUU4/06HSkHPbml+l74tIryNoBohj0tykAFc | ||
16 | uqWcLdclJPz/XFgURjAJfFVkgwu5388l7uz3y9vRW5OTyIoQRriwNRxsDY8Dao8b | ||
17 | NmjzU4k2WyGA3uOSUpSXnUmJfT7eKVG6Efe6Afer6sGnLqNNZf1AcfHiP2woy9M= | ||
18 | -----END CERTIFICATE----- | ||
diff --git a/recipes-selftest/images/files/refkit-db.key b/recipes-selftest/images/files/refkit-db.key deleted file mode 100644 index 4b54587e..00000000 --- a/recipes-selftest/images/files/refkit-db.key +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | -----BEGIN PRIVATE KEY----- | ||
2 | MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC0HCKmIgFXzfFP | ||
3 | r3Lj2QGAUFXvAl7rmTXLfyp5/7U+7F2SBjAg55WtpIQuP/rXRt1JqOjjeUn2jwsd | ||
4 | /mOo0WOj1g1ObGZc1mYm0SaY1E92yWVIWBMIMbzlRyVllTmJXwLxxQYXWMoJ/fYe | ||
5 | xZfao04aSL7PlicES7dtZ7ZQGARzUdJqLd87q/ItldeouKgwoauLkitgPjrlhkBx | ||
6 | wT8tLpDn1uzMwgt5g3Ft9qOpTM1Ggdzv7FG+gSrxeHNB21TOfM6i45BPRRr5PYj8 | ||
7 | Du3TaSJM+gpp0UjAqqk6s48QOnaoDHo92HnOHJZi9AbuR+jgaZGu6jTP2qi0OV7z | ||
8 | etCISEdpAgMBAAECggEAbtXplKbUgL4hQ9JKN2Cxhc7qMv0YgI92BVaqQw1S8ffu | ||
9 | 1Q+tynH5MDRPi06gBJ59SvkA6AsZsvrv8nM7zQWd9ZKh+aLHk1X04upOgDoW9JiX | ||
10 | FV/txlslTUrs/ohIMfsgCrweNXvUSTXZobIi8s8QHyipE4HpXMFjjZYHIV7GTlgA | ||
11 | PRgGu3NygbWfR8hcx5JtzVz/jka7FFFSbk/pMr0TeJHXP55VfqWLeeSBQmWwooj2 | ||
12 | QcRfqMXgLKgu6uEggaP5HMcfTuWgWNhbke/596CgsUtQ5Gg64Q6v7cKcPy0/lgn1 | ||
13 | PnvfT9uhgEFDLNFkSBxV3ImrNYo73Nqmbp3w5tK9SQKBgQDs/HW7pNnB0LD51qok | ||
14 | pkX0SBvyKxDT1QuU4z0FY9GT7OKOg8Xa0ZGyErt+ZbyFiyUGF5Axc3rJ3DyGslgu | ||
15 | 5O+AqcpCQOlOyovGQ6ST9x/gEeVcRnZn1MV4vMxwaOSXtY7u0IGyaDlFn1QWHWCN | ||
16 | imv8OR6YuhivwBIXGzJ16oEqDwKBgQDCj3ls7tlPrLvUQIh8gfjCoInU8fRAqtAe | ||
17 | Ab/OximLsKQPKLDma6xd+X2Fk8Dowdb88GNT99x3VZjHqVJM9URDkiOGKAXA/rBp | ||
18 | jAXhnQwahT8YCzOUHqDYNMMQrXHvbiHqLodGrrO2WjYNmH69prQAk8WYAIwl+hdx | ||
19 | BS70LGLPBwKBgQDU9RinAkBcFjiyieBjBreeCJ50Q5bfhHbf2EOhcE2IbDo6bteB | ||
20 | Bwmxx3uM3cdHCf6/NrVweqFAfBQ3xlPP8BH4wJrsZoBBOWnZRDfEbzHJnMtK3FbS | ||
21 | fzTkhmQAL4Ibgh9rIxspQtcUZVSees+k4VqgUIPaIoDEjgizktEJfS2MqQKBgQDA | ||
22 | rOFtVaRz2PYyHq6LzxMRe3bEIdDn8cEk1kqjdW9TXV07feqiZmNOtXLvRAG4/63u | ||
23 | 1Akp8L6ul2Az6qUMfaBa4nC3vQ7lr9P40qhIZATGhsqS/xTXTPWw55999qZsnL6N | ||
24 | cgKZpw1mOzRohmqNWnfMUotOGsywF1n7nUyAlyxLJQKBgElTaNTFYF3MbGfhl1He | ||
25 | fnDXlf8OCOK1i5oIzMLqverb2UN/qp6p0b3SAtcw5cUXcaPlajHrfYgacF/0Qyua | ||
26 | Cerey9GLEdJ7saDWhz0GyJ8yyEXy8CVs0svVaLPWI0s2B7/obzP9+gTb/WE9qZqu | ||
27 | bNoVEpJ/wZhk+IL4+KPmqphu | ||
28 | -----END PRIVATE KEY----- | ||
diff --git a/recipes-selftest/images/secureboot-selftest-image-signed.bb b/recipes-selftest/images/secureboot-selftest-image-signed.bb deleted file mode 100644 index 3ce11f32..00000000 --- a/recipes-selftest/images/secureboot-selftest-image-signed.bb +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | require secureboot-selftest-image-unsigned.bb | ||
2 | |||
3 | IMAGE_FEATURES += "secureboot" | ||
4 | |||
5 | SECURE_BOOT_SIGNING_KEY ?= "${THISDIR}/files/refkit-db.key" | ||
6 | SECURE_BOOT_SIGNING_CERT ?= "${THISDIR}/files/refkit-db.crt" | ||
diff --git a/recipes-selftest/images/secureboot-selftest-image-unsigned.bb b/recipes-selftest/images/secureboot-selftest-image-unsigned.bb deleted file mode 100644 index d0fa6405..00000000 --- a/recipes-selftest/images/secureboot-selftest-image-unsigned.bb +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | require recipes-core/images/core-image-minimal.bb | ||
2 | |||
3 | DEPENDS:remove = "grub-efi" | ||
4 | |||
5 | inherit uefi-comboapp | ||
6 | |||
7 | WKS_FILE = "generic-bootdisk.wks.in" | ||
8 | |||
9 | do_uefiapp_deploy:append() { | ||
10 | for i in ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.boot*.efi; do | ||
11 | target=`basename $i` | ||
12 | target=`echo $target | sed -e 's/${IMAGE_LINK_NAME}.//'` | ||
13 | |||
14 | cat > ${IMAGE_ROOTFS}/boot/startup.nsh << EOF | ||
15 | $target | ||
16 | reset | ||
17 | EOF | ||
18 | break | ||
19 | done | ||
20 | } | ||
diff --git a/recipes-support/isa-l/isa-l_2.30.0.bb b/recipes-support/isa-l/isa-l_2.31.1.bb index 3a4cea14..93178942 100644 --- a/recipes-support/isa-l/isa-l_2.30.0.bb +++ b/recipes-support/isa-l/isa-l_2.31.1.bb | |||
@@ -2,16 +2,17 @@ SUMMARY = "Intelligent Storage Acceleration Library" | |||
2 | DESCRIPTION = "ISA-L is a collection of optimized low-level functions \ | 2 | DESCRIPTION = "ISA-L is a collection of optimized low-level functions \ |
3 | targeting storage applications." | 3 | targeting storage applications." |
4 | LICENSE = "BSD-3-Clause" | 4 | LICENSE = "BSD-3-Clause" |
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e6c7d82ad7dd512687b0991a159a1ca9" | 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=2476688d0948d4a3f7c69473a603540d" |
6 | SECTION = "lib" | 6 | SECTION = "lib" |
7 | 7 | ||
8 | inherit autotools pkgconfig | 8 | inherit autotools pkgconfig |
9 | 9 | ||
10 | S = "${WORKDIR}/git" | 10 | SRCREV = "c387163fcbca62701d646149564c550c78a4f985" |
11 | SRCREV = "2df39cf5f1b9ccaa2973f6ef273857e4dc46f0cf" | ||
12 | SRC_URI = "git://github.com/intel/isa-l.git;branch=master;protocol=https" | 11 | SRC_URI = "git://github.com/intel/isa-l.git;branch=master;protocol=https" |
13 | 12 | ||
14 | DEPENDS = "nasm-native" | 13 | DEPENDS = "nasm-native" |
15 | AS[unexport] = "1" | 14 | AS[unexport] = "1" |
16 | 15 | ||
16 | TARGET_CC_ARCH += "${LDFLAGS}" | ||
17 | |||
17 | COMPATIBLE_HOST = '(x86_64).*-linux' | 18 | COMPATIBLE_HOST = '(x86_64).*-linux' |
diff --git a/recipes-support/jhi/jhi_1.41.bb b/recipes-support/jhi/jhi_1.41.bb deleted file mode 100644 index bbb30a6d..00000000 --- a/recipes-support/jhi/jhi_1.41.bb +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | SUMMARY = "Intel Dynamic Application Loader (DAL) Host Interface" | ||
2 | DESCRIPTION = "A daemon and libraries which allow user space applications \ | ||
3 | to install Java applets on DAL FW and communicate with them" | ||
4 | LICENSE = "Apache-2.0" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=833126f14614a3276708a4d7c9734645" | ||
6 | |||
7 | SRC_URI = "git://github.com/intel/dynamic-application-loader-host-interface.git;protocol=https;branch=master" | ||
8 | |||
9 | inherit cmake useradd systemd pkgconfig update-rc.d | ||
10 | |||
11 | SRCREV = "4c9ef52bcd55fa03b30ac323e553a05be858d41e" | ||
12 | |||
13 | S = "${WORKDIR}/git" | ||
14 | |||
15 | DEPENDS += "util-linux libxml2" | ||
16 | DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" | ||
17 | RDEPENDS:${PN} += "bash" | ||
18 | |||
19 | USERADD_PACKAGES = "${PN}" | ||
20 | USERADD_PARAM:${PN} = "--system --no-create-home --shell /bin/false -g mei jhi" | ||
21 | |||
22 | GROUPADD_PARAM:${PN} = "-g 880 mei" | ||
23 | |||
24 | COMPATIBLE_HOST:libc-musl = 'null' | ||
25 | |||
26 | SYSTEMD_SERVICE:${PN} = "jhi.service" | ||
27 | |||
28 | INITSCRIPT_PACKAGES = "${PN}" | ||
29 | INITSCRIPT_NAME:${PN} = "${PN}" | ||
30 | INITSCRIPT_PARAMS:${PN} = "defaults" | ||
31 | |||
32 | # systemd is the default so they are installed when sysvinit is not selected as INIT_SYSTEM | ||
33 | EXTRA_OECMAKE = "-DCMAKE_SKIP_RPATH=ON \ | ||
34 | -DINIT_SYSTEM=${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'SysVinit', 'systemd', d)} \ | ||
35 | -DAPPLETS_DIR=${libdir}/dal/applets \ | ||
36 | -DAPP_REPO_DIR=${localstatedir}/cache/dal/applet_repository \ | ||
37 | " | ||
38 | |||
39 | do_install:append () { | ||
40 | install -d ${D}${localstatedir}/cache/dal/applet_repository | ||
41 | |||
42 | chown -R jhi ${D}${localstatedir}/cache/dal/applet_repository | ||
43 | chgrp -R mei ${D}${localstatedir}/cache/dal/applet_repository | ||
44 | |||
45 | install -d ${D}${bindir} | ||
46 | install -m 755 ${B}/bin_linux/smoketest ${D}${bindir} | ||
47 | install -m 755 ${B}/bin_linux/bist ${D}${bindir} | ||
48 | |||
49 | install -d ${D}${libdir}/dal/applets | ||
50 | cp -r ${S}/test/smoketest/applets/* ${D}${libdir}/dal/applets/ | ||
51 | } | ||
52 | |||
53 | PACKAGES += "${PN}-test" | ||
54 | |||
55 | FILES:${PN}-dev = "" | ||
56 | |||
57 | FILES:${PN} = "\ | ||
58 | ${sbindir} \ | ||
59 | ${sysconfdir} \ | ||
60 | ${libdir}/lib*${SOLIBSDEV} \ | ||
61 | ${libdir}/dal/applets/SpoolerApplet.dalp \ | ||
62 | ${nonarch_libdir}/tmpfiles.d \ | ||
63 | ${systemd_system_unitdir} \ | ||
64 | ${localstatedir}/cache/dal/applet_repository \ | ||
65 | " | ||
66 | |||
67 | FILES:${PN}-test = "\ | ||
68 | ${bindir} \ | ||
69 | ${libdir}/dal/applets \ | ||
70 | " | ||
71 | |||
72 | UPSTREAM_CHECK_COMMITS = "1" | ||
diff --git a/recipes-support/libipt/libipt_2.0.5.bb b/recipes-support/libipt/libipt_2.1.2.bb index c1f67c1d..7806cf6b 100644 --- a/recipes-support/libipt/libipt_2.0.5.bb +++ b/recipes-support/libipt/libipt_2.1.2.bb | |||
@@ -5,19 +5,18 @@ library or it can be partially or fully integrated into your tool." | |||
5 | HOMEPAGE = "https://github.com/intel/libipt" | 5 | HOMEPAGE = "https://github.com/intel/libipt" |
6 | 6 | ||
7 | LICENSE = "BSD-3-Clause" | 7 | LICENSE = "BSD-3-Clause" |
8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=bc005f06a45e41cdefcb8f5aceb1f5c9" | 8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=491799fd9431e57ad52cb0ef3497afce" |
9 | 9 | ||
10 | inherit pkgconfig cmake | 10 | inherit pkgconfig cmake |
11 | 11 | ||
12 | S = "${WORKDIR}/git" | 12 | SRC_URI = "git://github.com/intel/libipt.git;protocol=https;branch=stable/v2.1" |
13 | 13 | ||
14 | SRC_URI = "git://github.com/intel/libipt.git;protocol=https;branch=stable/v2.0" | 14 | SRCREV = "ffc548e5fbc2fa3e9795d4593f861e1df99cf906" |
15 | |||
16 | SRCREV = "e315d53984ebe0e40dbb71b213bcf2cba42496f4" | ||
17 | 15 | ||
18 | EXTRA_OECMAKE += " \ | 16 | EXTRA_OECMAKE += " \ |
19 | -DPTDUMP=ON \ | 17 | -DPTDUMP=ON \ |
20 | -DPTTC=ON \ | 18 | -DPTTC=ON \ |
19 | -DPTSEG=ON \ | ||
21 | -DCMAKE_SKIP_RPATH=ON \ | 20 | -DCMAKE_SKIP_RPATH=ON \ |
22 | " | 21 | " |
23 | 22 | ||
@@ -26,7 +25,7 @@ do_install:append() { | |||
26 | install -d ${D}${bindir}/libipt/tests | 25 | install -d ${D}${bindir}/libipt/tests |
27 | 26 | ||
28 | cp -r ${B}/bin/* ${D}${bindir}/libipt/ | 27 | cp -r ${B}/bin/* ${D}${bindir}/libipt/ |
29 | cp -r ${WORKDIR}/git/test/src/* ${D}${bindir}/libipt/tests | 28 | cp -r ${S}/test/src/* ${D}${bindir}/libipt/tests |
30 | } | 29 | } |
31 | 30 | ||
32 | FILES:${PN}-test = "${bindir}" | 31 | FILES:${PN}-test = "${bindir}" |
diff --git a/recipes-support/sbsigntool/sbsigntool-native_git.bb b/recipes-support/sbsigntool/sbsigntool-native_git.bb deleted file mode 100644 index a45a3dea..00000000 --- a/recipes-support/sbsigntool/sbsigntool-native_git.bb +++ /dev/null | |||
@@ -1,84 +0,0 @@ | |||
1 | DESCRIPTION = "Utility for signing and verifying files for UEFI Secure Boot" | ||
2 | LICENSE = "GPL-3.0-only & LGPL-2.1-only & LGPL-3.0-only & MIT" | ||
3 | |||
4 | # sbsigntool statically links to libccan.a which is built with modules | ||
5 | # passed to "create-ccan-tree" (and their dependencies). Therefore, | ||
6 | # we also keep track of all the ccan module licenses. | ||
7 | LIC_FILES_CHKSUM = "file://LICENSE.GPLv3;md5=9eef91148a9b14ec7f9df333daebc746 \ | ||
8 | file://COPYING;md5=a7710ac18adec371b84a9594ed04fd20 \ | ||
9 | file://lib/ccan.git/ccan/endian/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ | ||
10 | file://lib/ccan.git/ccan/htable/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ | ||
11 | file://lib/ccan.git/ccan/list/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ | ||
12 | file://lib/ccan.git/ccan/read_write_all/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ | ||
13 | file://lib/ccan.git/ccan/talloc/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ | ||
14 | file://lib/ccan.git/ccan/typesafe_cb/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ | ||
15 | file://lib/ccan.git/ccan/failtest/LICENSE;md5=6a6a8e020838b23406c81b19c1d46df6 \ | ||
16 | file://lib/ccan.git/ccan/tlist/LICENSE;md5=6a6a8e020838b23406c81b19c1d46df6 \ | ||
17 | file://lib/ccan.git/ccan/time/LICENSE;md5=838c366f69b72c5df05c96dff79b35f2 \ | ||
18 | " | ||
19 | |||
20 | # The original upstream is git://kernel.ubuntu.com/jk/sbsigntool but it has | ||
21 | # not been maintained and many patches have been backported in this repo. | ||
22 | SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/jejb/sbsigntools.git;protocol=https;name=sbsigntools;branch=master \ | ||
23 | git://github.com/rustyrussell/ccan.git;protocol=https;destsuffix=git/lib/ccan.git;name=ccan;branch=master \ | ||
24 | file://0001-configure-Fixup-build-dependencies-for-cross-compili.patch \ | ||
25 | file://0002-fix-openssl-3-0.patch \ | ||
26 | " | ||
27 | |||
28 | SRCREV_sbsigntools ?= "f12484869c9590682ac3253d583bf59b890bb826" | ||
29 | SRCREV_ccan ?= "b1f28e17227f2320d07fe052a8a48942fe17caa5" | ||
30 | SRCREV_FORMAT = "sbsigntools_ccan" | ||
31 | |||
32 | DEPENDS = "binutils-native gnu-efi-native help2man-native openssl-native util-linux-native" | ||
33 | |||
34 | PV = "0.9.4-git${SRCPV}" | ||
35 | |||
36 | S = "${WORKDIR}/git" | ||
37 | |||
38 | inherit autotools pkgconfig | ||
39 | inherit native | ||
40 | |||
41 | do_configure:prepend() { | ||
42 | cd ${S} | ||
43 | |||
44 | sed -i s#RECIPE_SYSROOT#${RECIPE_SYSROOT_NATIVE}#g configure.ac | ||
45 | |||
46 | if [ ! -e lib/ccan ]; then | ||
47 | |||
48 | # Use empty SCOREDIR because 'make scores' is not run. | ||
49 | # The default setting depends on (non-whitelisted) host tools. | ||
50 | sed -i -e 's#^\(SCOREDIR=\).*#\1#' lib/ccan.git/Makefile | ||
51 | |||
52 | lib/ccan.git/tools/create-ccan-tree \ | ||
53 | --build-type=automake lib/ccan \ | ||
54 | talloc read_write_all build_assert array_size endian | ||
55 | fi | ||
56 | |||
57 | # Create generatable docs from git | ||
58 | ( | ||
59 | echo "Authors of sbsigntool:" | ||
60 | echo | ||
61 | git log --format='%an' | sort -u | sed 's,^,\t,' | ||
62 | ) > AUTHORS | ||
63 | |||
64 | # Generate simple ChangeLog | ||
65 | git log --date=short --format='%ad %t %an <%ae>%n%n * %s%n' > ChangeLog | ||
66 | |||
67 | cd ${B} | ||
68 | } | ||
69 | |||
70 | def efi_arch(d): | ||
71 | import re | ||
72 | harch = d.getVar("HOST_ARCH") | ||
73 | if re.match("i[3456789]86", harch): | ||
74 | return "ia32" | ||
75 | return harch | ||
76 | |||
77 | EXTRA_OEMAKE = "\ | ||
78 | INCLUDES+='-I${S}/lib/ccan.git/ \ | ||
79 | -I${STAGING_INCDIR_NATIVE}/efi \ | ||
80 | -I${STAGING_INCDIR_NATIVE} \ | ||
81 | -I${STAGING_INCDIR_NATIVE}/efi/${@efi_arch(d)}' \ | ||
82 | " | ||
83 | |||
84 | CFLAGS:append = " -Wno-error" | ||
diff --git a/recipes-support/sbsigntool/sbsigntool/0001-configure-Fixup-build-dependencies-for-cross-compili.patch b/recipes-support/sbsigntool/sbsigntool/0001-configure-Fixup-build-dependencies-for-cross-compili.patch deleted file mode 100644 index ef686511..00000000 --- a/recipes-support/sbsigntool/sbsigntool/0001-configure-Fixup-build-dependencies-for-cross-compili.patch +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | From c3533b8da1e1425801d2fc0bcd231e13d593f16b Mon Sep 17 00:00:00 2001 | ||
2 | From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> | ||
3 | Date: Tue, 19 Feb 2019 20:07:45 +0800 | ||
4 | Subject: [PATCH] configure: Fixup build dependencies for cross-compiling | ||
5 | |||
6 | When cross-compiling, custom header files and libraries need to be | ||
7 | specified. sbsign assumes that all the dependencies are located | ||
8 | under /usr/include and /usr/lib. | ||
9 | |||
10 | Prepend these paths with a placeholder that can be replaced with the | ||
11 | actual paths once they are resolved. | ||
12 | |||
13 | Upstream status: inappropriate [OE specific] | ||
14 | |||
15 | Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> | ||
16 | |||
17 | Taken from : | ||
18 | https://github.com/intel/luv-yocto/tree/master/meta-luv/recipes-devtools/sbsigntool/sbsigntool | ||
19 | |||
20 | Corrected typo error and ported to version 0.9.2 | ||
21 | |||
22 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
23 | --- | ||
24 | configure.ac | 7 +++++-- | ||
25 | 1 file changed, 5 insertions(+), 2 deletions(-) | ||
26 | |||
27 | diff --git a/configure.ac b/configure.ac | ||
28 | index 1459e91..3e34c8d 100644 | ||
29 | --- a/configure.ac | ||
30 | +++ b/configure.ac | ||
31 | @@ -70,7 +70,10 @@ AM_CONDITIONAL(TEST_BINARY_FORMAT, [ test "$EFI_ARCH" = "arm" -o "$EFI_ARCH" = " | ||
32 | ## | ||
33 | # no consistent view of where gnu-efi should dump the efi stuff, so find it | ||
34 | ## | ||
35 | -for path in /lib /lib64 /usr/lib /usr/lib64 /usr/lib32 /lib/efi /lib64/efi /usr/lib/efi /usr/lib64/efi /usr/lib/gnuefi /usr/lib64/gnuefi ; do | ||
36 | +for path in RECIPE_SYSROOT/lib RECIPE_SYSROOT/lib64 RECIPE_SYSROOT/usr/lib \ | ||
37 | + RECIPE_SYSROOT/usr/lib64 RECIPE_SYSROOT/usr/lib32 \ | ||
38 | + RECIPE_SYSROOT/lib/efi RECIPE_SYSROOT/lib64/efi \ | ||
39 | + RECIPE_SYSROOT/usr/lib/efi RECIPE_SYSROOT/usr/lib64/efi; do | ||
40 | if test -e $path/crt0-efi-$EFI_ARCH.o; then | ||
41 | CRTPATH=$path | ||
42 | fi | ||
43 | @@ -79,7 +82,7 @@ if test -z "$CRTPATH"; then | ||
44 | AC_MSG_ERROR([cannot find the gnu-efi crt path]) | ||
45 | fi | ||
46 | |||
47 | -EFI_CPPFLAGS="-I/usr/include/efi -I/usr/include/efi/$EFI_ARCH \ | ||
48 | +EFI_CPPFLAGS="-IRECIPE_SYSROOT/usr/include/efi -IRECIPE_SYSROOT/usr/include/efi/$EFI_ARCH \ | ||
49 | -DEFI_FUNCTION_WRAPPER" | ||
50 | CPPFLAGS_save="$CPPFLAGS" | ||
51 | CPPFLAGS="$CPPFLAGS $EFI_CPPFLAGS" | ||
52 | -- | ||
53 | 2.7.4 | ||
54 | |||
diff --git a/recipes-support/sbsigntool/sbsigntool/0002-fix-openssl-3-0.patch b/recipes-support/sbsigntool/sbsigntool/0002-fix-openssl-3-0.patch deleted file mode 100644 index 8a277947..00000000 --- a/recipes-support/sbsigntool/sbsigntool/0002-fix-openssl-3-0.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | Use ASN1_ITEM_rptr() instead of taking the address of IDC_PEID_it. | ||
2 | |||
3 | openssl-3.0 changed the type of TYPE_it from `const ASN1_ITEM TYPE_it` to | ||
4 | `const ASN1_ITEM *TYPE_it(void)`. This was previously hidden behind | ||
5 | OPENSSL_EXPORT_VAR_AS_FUNCTION but in 3.0 only the function version is | ||
6 | available. This change should have been transparent to the application, but | ||
7 | only if the `ASN1_ITEM_rptr()` macro is used. | ||
8 | |||
9 | This change passes `make check` with both openssl 1.1 and 3.0. | ||
10 | |||
11 | Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com> | ||
12 | Upstream-status: Submited [https://groups.io/g/sbsigntools/topic/patch_fix_openssl_3_0_issue/85903418] | ||
13 | --- | ||
14 | src/idc.c | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/src/idc.c b/src/idc.c | ||
18 | index 6d87bd4..0a82218 100644 | ||
19 | --- a/src/idc.c | ||
20 | +++ b/src/idc.c | ||
21 | @@ -189,7 +189,7 @@ int IDC_set(PKCS7 *p7, PKCS7_SIGNER_INFO *si, struct image *image) | ||
22 | |||
23 | idc->data->type = OBJ_nid2obj(peid_nid); | ||
24 | idc->data->value = ASN1_TYPE_new(); | ||
25 | - type_set_sequence(image, idc->data->value, peid, &IDC_PEID_it); | ||
26 | + type_set_sequence(image, idc->data->value, peid, ASN1_ITEM_rptr(IDC_PEID)); | ||
27 | |||
28 | idc->digest->alg->parameter = ASN1_TYPE_new(); | ||
29 | idc->digest->alg->algorithm = OBJ_nid2obj(NID_sha256); | ||
30 | -- | ||
31 | 2.25.1 | ||
32 | |||