Commit Graph

198 Commits

Author SHA1 Message Date
Artur Harasimiuk e9be9b64c6 clang-tidy configuration cleanup
Define single .clang-tidy configuration with all used checks and use
NOLINT to selectively silence tool. That way cleanup should be easier.
third_part/ has its own configuration that disables clang-tidy for this
folder.

Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2022-05-11 14:02:04 +02:00
Krystian Chmielewski e007ba499f feat(zebin): add support for build options section
This change:
* Adds support for build options section in zebinary - using
build options in binary when rebuilding.
* Appends "-cl-intel-allow-zebin" flag to build options when zebin is
used.

Resolves: NEO-6916

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-04-27 11:26:42 +02:00
Kamil Kopryk 7f08a9d993 Remove adjustHwInfoForIgc helper
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
Related-To: NEO-6738
2022-04-20 10:04:36 +02:00
Krystian Chmielewski 01a719cf33 Allow for zebin rebuild when IR is present
This commits adds rebuilding zebin binary.
If zebin is built for different device and has SPIRV, then new ze binary
will be built using SPIRV.

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-04-12 08:05:25 +02:00
Compute-Runtime-Validation 64d3f95410 Revert "Allow for zebin rebuild when IR is present"
This reverts commit 2ae3f3e521.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-04-06 23:17:22 +02:00
Krystian Chmielewski 2ae3f3e521 Allow for zebin rebuild when IR is present
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-04-05 10:25:06 +02:00
Kamil Kopryk 038d1d54fa Correct xe_hpc tests
Related-To: NEO-6631


Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-03-09 09:21:30 +01:00
Krystian Chmielewski 0ccce5a6d7 Zebin: set kernel barriers based on ext funcs
This change allows for modifying kernel's barrier count
based on called external functions metadata passed
via zeInfo section in zebin.

Added parsing external functions metadata.
Added resolving external functions call graph.
Added updating kernel barriers based on called external functions.
Added support for L0 dynamic link.

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-03-04 14:21:50 +01:00
Lukasz Jobczyk 090bfb9642 Reuse kernel allocation
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2022-02-28 19:26:19 +01:00
Kacper Nowak b62675290f Refactor source level debugger notification in OCL. [2/2]
Refactor source level debugger notification about debug data in OCL
(build/link path).
- Share common code
- Remove unnecessary function(s)
- Zebin-related ULTs refactor

Related-To: NEO-6644
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-02-17 21:40:05 +01:00
Kacper Nowak cd9cc53159 Correct setting usesStringMap flag in printf
This commit fixes setting usesStringMap flag for printf, taking into
account using indirect functions in legacy (non-zebinary) path. It also
adds new field to kernelDescriptor, specifying the binary type
(legacy/zebin).

Related-To: NEO-6604
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-02-15 15:39:10 +01:00
Compute-Runtime-Validation c5c3e865f0 Revert "Fail build program on PVC with stateful accesses"
This reverts commit 9466113cef.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-02-14 18:55:14 +01:00
Kamil Kopryk 9466113cef Fail build program on PVC with stateful accesses
Related-To: NEO-6075

After this change driver will fail clBuildProgram/zeModuleCreate api calls
whenever stateful access is discovered on PVC.
This is required since in this case allocation greater than 4GB
will not work.
If user still wants to use stateful addressing mode,
-cl-opt-smaller-than-4GB-buffers-only / -ze-opt-smaller-than-4GB-buffers-only
build option should be passed as build option, but then user can not use
bufers greater than 4GB.


Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-02-14 13:44:22 +01:00
Kacper Nowak 741ee49c9a Refactor source level debugger notification in OCL. [1/n]
Refactor source level debugger notification in OCL path - in build()
cl_program method. It fixes confusing debug data creation (mixed
legacy/zebin path) and thus incorrect kernel notification about debug
data.

Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
Related-To: NEO-6644
2022-02-10 17:47:05 +01:00
Kacper Nowak 1390af6efe Make usesStringMap flag independent of implicit args requirements
This commits removes part of condition requiring requiresImplicitArgs
flag set in kernel descriptor in order to set usesStringMap flag.

Related-To: NEO-6604
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-02-09 09:51:01 +01:00
Krystian Chmielewski d49c5d6185 OCL: Set target device product family
In OCL product family of target device is not set
which leads to a fail on validating target device in
ZEBin path.
This change adds function that sets all
necessary fields based on provided hardware info.

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-02-08 16:49:28 +01:00
Bartosz Dunajski 4b0d986876 Move AllocationType enum out of GraphicsAllocation class
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-02-04 17:49:09 +01:00
Bartosz Dunajski 52c6973e89 Rename blitBuffer method
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-02-03 15:02:55 +01:00
Kacper Nowak 306775f7f1 Refactor debugData and debugDataSize in OCL.
This commits moves debugData and debugDataSize to buildInfos vector (per
root device).
- debug data is now stored per device instead of per cl_program
- added creation of debug data (incl. debug zebin) and its returning in
clGetProgramInfo (CL_PROGRAM_DEBUG_INFO_INTEL).

Related-To: NEO-6463

Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-01-28 14:03:21 +01:00
Katarzyna Cencelewska 11fe5f33f5 Remove unused subgroupKernelInfoArray
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
2022-01-19 15:39:37 +01:00
Katarzyna Cencelewska 5ca6d1047c Remove device enqueue part 9
- remove parentKernelInfoArray

Related-To: NEO-6559
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
2022-01-19 13:54:54 +01:00
Katarzyna Cencelewska 20f17f775e Remove device enqueue part 8
- remove hasDeviceEnqueue

Related-To: NEO-6559
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
2022-01-19 11:16:35 +01:00
Katarzyna Cencelewska 97765cd39f Remove device enqueue part 7
- mainly remove BlockKernelManager and ReflectionSurfaceHelper

Related-To: NEO-6559
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
2022-01-19 10:41:57 +01:00
Kacper Nowak fc224202d6 Create debug zebin in OCL
This commit adds debug zebin creation in OCL.
- Added returning debug zebin in build/linking paths in OCL if
corresponding device binary format was detected.
- Refactored getZebinSegments() method - added common ctor for both
L0/OCL paths

Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-01-17 14:27:23 +01:00
Katarzyna Cencelewska 59683ec491 Remove device enqueue part 6
- isParentKernel, peekParentKernel, parentKernel
- structs: AUBParentKernelFixture, MockParentKernel,
ParentKernelCommandQueueFixture

Related-To: NEO-6559
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
2022-01-17 13:56:29 +01:00
Kamil Kopryk 0a4554ab23 Simplify internal options initialization
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
Related-To: NEO-6075
2022-01-13 11:03:04 +01:00
Patryk Wrobel 3599e7aeda Add warning when device binary had to be recompiled
Introduced a new warning, which is printed to build log, when the
binary needs to be recompiled. Added a new flag -Wno-recompiled-from-ir
to allow suppression of that message. Removed a bug related to memcpy_s
from ModuleBuildLogImp::getString() and aligned it with specification.

Related-To: NEO-5819
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
2021-12-23 16:13:59 +01:00
Bartosz Dunajski c13889c31b Fix printf allocation access mode
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>

Use BCS if CPU access for local memory allocation is not allowed
2021-12-15 12:14:46 +01:00
Compute-Runtime-Validation b7cee61bde Revert "Fail build program in shared system USM + stateful access case"
This reverts commit 0ad8afc0b3.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2021-12-07 01:00:59 +01:00
Kamil Kopryk 0ad8afc0b3 Fail build program in shared system USM + stateful access case
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
Related-To: NEO-6075

After this change driver will fail clBuildProgram/zeModuleCreate api calls
whenever stateful access is discovered and device has shared system usm caps
enabled.This is required since in this case allocation greater than 4GB
will not work.
If user still wants to use stateful addressing mode,
-cl-opt-smaller-than-4GB-buffers-only / -ze-opt-smaller-than-4GB-buffers-only
build option should be passed as build option, but then user can not use
buffers greater than 4GB.
2021-12-06 15:10:16 +01:00
Mateusz Hoppe b11d7cd7b0 Add debug key for compiler internal options injection
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2021-11-23 15:41:11 +01:00
Mateusz Jablonski 75a5aed81d Refactor patching implicit args relocation
Related-To: NEO-5081
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-11-15 17:09:36 +01:00
Krystian Chmielewski 06eaef0352 Zebin: Use strings section for printf
Resolves: NEO-6143

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2021-11-07 19:10:47 +01:00
Compute-Runtime-Validation faea7915c2 Revert "Fail build program in shared system USM + statefull access case OCL"
This reverts commit 9dabc2db0c.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2021-11-05 20:31:47 +01:00
Kamil Kopryk 9dabc2db0c Fail build program in shared system USM + statefull access case OCL
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
Related-To: NEO-6075
2021-11-05 14:55:05 +01:00
Mateusz Jablonski 21ef249961 Move ocl extensions logic to shared
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-11-04 17:38:15 +01:00
Filip Hazubski 28b37aea72 Correct handling unique_ptr in functions
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2021-10-21 18:17:14 +02:00
Mateusz Jablonski b1df167632 Move enable_product.inl to shared
extract api agnostic validators to shared
remove not needed opencl includes from neo shared


Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-10-12 22:02:16 +02:00
Bartosz Dunajski 5856c283c5 Remove HardwareCapabilities struct
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-10-12 07:25:06 +02:00
Bartosz Dunajski e096bf881e Fix assigning SubDevices to Program
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-10-06 15:31:22 +02:00
Zbigniew Zdanowicz 068832d178 Move kernel_info_from_patchtokens to shared directory
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2021-10-05 11:50:28 +02:00
Zbigniew Zdanowicz 25c71a6c13 Move kernel info to shared directory
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2021-09-29 23:49:49 +02:00
Rafal Maziejuk 82f27e882d Refactor Gen12LP helpers
Signed-off-by: Rafal Maziejuk <rafal.maziejuk@intel.com>
Related-To: NEO-4541
2021-09-27 14:07:37 +02:00
Artur Harasimiuk a63b9b1273 move common files to shared/
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2021-09-27 11:10:20 +02:00
Mateusz Jablonski 34ad95ae12 Handle printf output when implicit args are required
Related-To: NEO-5081
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-09-23 13:49:40 +02:00
Mateusz Jablonski 64b2fd5b19 Create printf handler if kernel has implicit args in OCL
Related-To: NEO-5081
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-09-20 10:58:41 +02:00
Mateusz Jablonski 0a83d610c1 Move heap_info.h to shared
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-09-16 14:16:07 +02:00
Kamil Kopryk 9ccf43e441 Correct branch_dir_suffix in cmake
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
Related-To: NEO-6245
2021-09-14 16:00:20 +02:00
Mateusz Jablonski 0d1c8be447 Handle implicit arg relocation in L0 module
Related-To: NEO-5081
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-09-14 08:57:10 +02:00
Mateusz Jablonski e193589582 Add implicit args support for OCL
Related-To: NEO-5081

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-09-13 10:54:19 +02:00