Commit Graph

78 Commits

Author SHA1 Message Date
Kacper Nowak efba242570 fix(zebin): Extend oneDNN WA for whole application context
When a dummy kernel "kernel void_(){}" is passed in sources - specific
for workloads with ngen backend - enforce fallback to CTNI for the whole
application context (mark the context as non-zebinary).

Related-To: NEO-7772
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2023-03-07 14:21:57 +01:00
Krystian Chmielewski 58d3f892a9 refactor(zebin): move files to seperate directory
* Moved zebin related files to zebin directory.
* Moved zebin related code to Zebin namespace.
* Separated zeInfo from zebin elf.
* Seperated zeInfo decoding from zebin decoder.
* Refactored populateKernelPayloadArgument function.

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2023-03-03 21:48:19 +01:00
Mateusz Hoppe 0b7817eecf feature: Experimental OCL debugging
- notify module create/destroy

Related-To: NEO-7075

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2023-03-02 15:59:15 +01:00
Kacper Nowak d2a2656caa fix(zebin): Enforce fallback to CTNI on TGL/ICL for nGEN dummy kernel
For TGL and ICL platforms - if on clCreateProgramWithSource()
call we detect a nGen dummy kernel usage - enforce fallback to the
patchtokens format (only for this kernel).
- corrected naming
- minor ULTs refactor (less dependencies).
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2023-01-13 14:36:56 +01:00
Warchulski, Jaroslaw d793f37dd8 Cleanup includes 20
Cleaned up files:
opencl/source/cl_device/cl_device.h
opencl/source/helpers/properties_helper.h
opencl/source/program/program.h
shared/source/device_binary_format/debug_zebin.h
shared/source/device_binary_format/elf/zebin_elf.h
shared/source/program/program_info.h
shared/source/utilities/heap_allocator.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-03 14:42:08 +01:00
Warchulski, Jaroslaw 0eac749fcc Cleanup includes 19
Cleaned up files:
opencl/source/api/cl_types.h
shared/source/compiler_interface/external_functions.h
shared/source/compiler_interface/linker.h
shared/source/device_binary_format/elf/elf.h
shared/source/helpers/preamble.h
shared/source/memory_manager/definitions/storage_info.h
shared/source/memory_manager/memory_manager.h
shared/source/memory_manager/os_agnostic_memory_manager.h
shared/source/program/program_info.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-03 11:02:05 +01:00
Warchulski, Jaroslaw a2fe929f0c Cleanup includes 18
Cleaned up files:
shared/source/command_stream/command_stream_receiver_hw.h
shared/source/compiler_interface/compiler_interface.h
shared/source/direct_submission/direct_submission_hw.h
shared/source/helpers/dirty_state_helpers.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-02 13:28:29 +01:00
Kacper Nowak a262bffeb4 feat(ocl): Generate minimal set of args info
Provide minimalistic arg info metada when provided native binary is missing
kernels_misc_info section.
- For args passed by value and by pointer (-images/samplers), do not
specify type name - instead, return an opaque* type name with size.
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-12-29 20:11:39 +01:00
Kamil Kopryk a97a2839aa fix(zebin): disable zebin when vme extension is enabled in source code
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-12-29 12:09:46 +01:00
Compute-Runtime-Validation 8d18a0cd12 Revert "feat(ocl): Generate minimal set of args info"
This reverts commit ea6c91eccc.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-12-29 07:07:32 +01:00
Kacper Nowak ea6c91eccc feat(ocl): Generate minimal set of args info
- Provide minimalistic arg info metada when provided native binary is missing
kernels_misc_info section.
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-12-28 20:24:44 +01:00
Kopryk, Kamil ceda3f65c2 fix(zebin): pass disable zebin internal option when building vme program
Signed-off-by: Kopryk, Kamil <kamil.kopryk@intel.com>
2022-12-23 09:50:27 +01:00
Kamil Kopryk a9121f88c4 fix(zebin): fallback to patchtokens when vme is used
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-12-22 10:59:56 +01:00
Krystian Chmielewski d25a5c73f2 fix(ocl zebin): do not expose functions as kernels
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-12-05 12:39:18 +01:00
Compute-Runtime-Validation c322bc3578 Revert "fix(ocl zebin): do not expose functions as kernel"
This reverts commit 359b9278b8.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-11-29 13:51:50 +01:00
Krystian Chmielewski 359b9278b8 fix(ocl zebin): do not expose functions as kernel
Do not expose dummy kernel containing functions' ISAs as kernels.

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-11-28 14:29:32 +01:00
Warchulski, Jaroslaw 1c03361273 Cleanup includes 6
Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-11-21 12:02:14 +01:00
Warchulski, Jaroslaw f35f59b573 Cleanup includes 5
Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-11-18 22:46:38 +01:00
Krystian Chmielewski 78d75dee0f Use mock in KernelArgInfoTest
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-11-04 14:09:47 +01:00
Luzynski, Sebastian Jozef 91c69e0fe7 Patch global variables and constants once
This change replaces mechanism of patching global constants and
variables in kernel per relocation to patching them only once. This
would improve linking time performance for kernels with multiple global
symbols.

Signed-off-by: Luzynski, Sebastian Jozef <sebastian.jozef.luzynski@intel.com>
2022-11-03 17:45:09 +01:00
Kacper Nowak 709e322a4a feat(zebin): get extended args metadata on clGetKernelArgInfo API call
This commit adds support for retrieving extended args metadata passed in
.kernel_misc_info zeInfo's section on clGetKernelArgInfo call.

Related-To: NEO-7372
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-11-03 13:15:09 +01:00
Dunajski, Bartosz b2001bf265 L0: GRF mode debug flags support
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2022-09-22 15:27:31 +02:00
Krystian Chmielewski 6b3ac9f1e2 refactor ocl patchtokens tests
Related-To: NEO-7131

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-09-19 17:46:02 +02:00
Kacper Nowak 83b84b3491 Enahnce kernel debug ULTs
Mock ProgramWithKernelDebugging ULTs.
This change is neccessary to ensure independence from binary format
after incoming switching to zebinary format.

Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
Related-To: NEO-6646
2022-06-01 17:33:13 +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
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
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 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 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
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
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
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
lgotszal 3bd4bca911 Copyright header update
Dates corrected in copyright headers to reflect original publication date
(2018 for OpenCL, 2020 for Level Zero).

Signed-off-by: lgotszal <lukasz.gotszald@intel.com>
2021-05-17 20:38:19 +02:00
Sebastian Luzynski 95ba83c7e1 Fix ocl program creation on multi device contexts
Signed-off-by: Sebastian Luzynski <sebastian.jozef.luzynski@intel.com>

Related-To: NEO-5734
2021-05-10 12:30:09 +02:00
Mateusz Jablonski 722f693e0f Set Context in program when using builtins
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-04-06 17:41:19 +02:00
Mateusz Hoppe 4191dfdb43 Prepend -s option when -cmc is not used
Related-To: NEO-5582

- "-s filename" is added to build options
based on filename returned from debugger
- when "-cmc" is passed as first option, do not
modify user options.

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2021-03-01 18:17:25 +01:00
Mateusz Jablonski 077ae2726e Correct storing KernelInfos in multi device programs
Related-To: NEO-5001
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-12-01 16:15:37 +01:00
Mateusz Jablonski 2ee1d569c5 Store KernelInfo per root device in Program
Related-To: NEO-5001
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-12-01 11:38:23 +01:00
Mateusz Jablonski 52d96af5f0 Use device from API function in clGetKernelWorkGroupInfo/SubGroupInfo
store execution environment reference in Kernel class

Related-To: NEO-5001
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-11-24 17:45:59 +01:00
Mateusz Jablonski 8fdc35bb4b Disallow compiling/building program if it has attached Kernels
allow for creating kernel if the program is built for at least one device

Related-To: NEO-5001
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-11-23 18:15:44 +01:00
Mateusz Jablonski 33a487e2cc Create structure for per root device members in Kernel
make private surface per root device

Related-To: NEO-5001
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-11-18 17:36:05 +01:00
Filip Hazubski 4052525091 Update DestructorCallbacks helper
Move common logic to the helper.

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2020-11-16 13:08:53 +01:00
Mateusz Jablonski 61d61e8b1c Remove Program::pDevice
Related-To: NEO-5001
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-11-10 11:25:41 +01:00
Mateusz Jablonski 0aec0bdde4 Store program binary type per device
Related-To: NEO-5001
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-11-04 15:01:11 +01:00