Commit Graph

88 Commits

Author SHA1 Message Date
Patryk Wrobel 09eefb4968 Unify used flags in case of IR exclusion
Unifies usage of flags in case of IR exclusion from ocloc's output file.
When -exclude_ir parameter is active, then internal options passed to
IGC contain -exclude-ir-from-zebin to preserve consistency. Moreover,
when only -exclude-ir-from-zebin is present, then -exclude_ir is also set.

Related-To: NEO-6477
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
2021-12-17 14:30:58 +01:00
Krystian Chmielewski 7e08e56d50 Zebin: allow undef symbols
Skip undefined symbols when decoding ELF symbol table
instead of treating them as error in zebin path in
order to support dynamic linking scenarios.

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2021-12-13 15:31:56 +01:00
Kamil Diedrich 24c19509b3 Add implementation for reading logical subDevice from builtin
- add function for resolving builtins using relocations
- add relocation for __SubDeviceID symbol

Related-To: NEO-6258
Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
2021-12-09 13:20:49 +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 8b233f7f45 Support for bindless mode in L0 - improvements
Related-To: NEO-6448

- add new IGC compilation flag when bindless mode used
- fix SBA programming of BindlessSurfaceStateSize -
always set maximum surface state count
- fix residency of global DSH heap on gen9 - gen12lp
in bindless mode
- add L0 aub test with bindless kernel - disabled
- partial fixes in OCL aub tests


Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2021-12-02 16:30:58 +01:00
Fabian Zwolinski 5ee5e792e6 Fix hash counting
Related-To: NEO-6209
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2021-11-29 16:59:06 +01:00
Mateusz Hoppe d72a4491be Add error handling in SipKernelBinary
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2021-11-29 13:25:15 +01:00
Bartosz Dunajski 995cb88bfa Improve ftr/wa flags packing
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-11-25 16:05:57 +01:00
Mateusz Jablonski abb1f30cd0 Program implicit args only in case of stack calls or enabled debugger
Related-To: NEO-5081
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-11-18 14:33:11 +01:00
Artur Harasimiuk 35f135bbc8 compiler cache to store input into separate file
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2021-11-16 17:23:17 +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 d29148a73a Populate linkerInput before allocating globals
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2021-11-09 12:20:13 +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
Artur Harasimiuk 53223dc2b5 create trace files about cl_cache usage
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2021-10-29 18:21:49 +02:00
Bartosz Dunajski d34ef3170a Remove CPP_ATTRIBUTE_FALLTHROUGH macro
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-10-22 17:27:57 +02: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 Hoppe 2fb8edb69f Refactor SipKernel
- add debug bindless SipKernelType

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2021-10-19 11:45:24 +02:00
Fabian Zwolinski 9276f689f8 Implement r_pod_cast function
Related-To: NEO-6210
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2021-10-15 13:09:07 +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
Kamil Kopryk cfc673b77c Add compilerHwInfoConfig
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
Related-To: NEO-6237
2021-10-06 21:27:34 +02:00
Artur Harasimiuk d88b730daa cmake: move compiler_interface to neo_shared
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2021-10-04 17:09:02 +02:00
Krystian Chmielewski 1417e894c7 Create debug zebin
Creates copy of zebinary with program headers containing
addresses of segments and applies debug relocations.


Related-To: NEO-6071
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2021-09-15 13:56:38 +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
Kamil Kopryk 9293c9b676 Use isMidThreadPreemptionSupported helper in compiler interface
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2021-09-09 18:17:09 +02:00
Kamil Diedrich 03bfc2eaf9 Fix for hash counting
Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
2021-08-30 21:51:43 +02:00
Krystian Chmielewski 0b9e87e35f Add support for data relocations using symbols
Support symbols for data relocations.
Remove unused symbolSegment field in RelocationInfo.

Related-To: NEO-5833
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2021-08-24 13:10:20 +02:00
Igor Venevtsev 43fdd90330 Add bindlessSip param to SIP queries
Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
2021-08-19 13:56:05 +02:00
Spruit, Neil R d119494854 L0 Support for Dynamic Module Linking for undefined symbols
- Support for L0 apps to handle undefined symbols reported by IGC
- Removed duplication of symbol in exported symbol list and relocation
for properly resolving the symbol during dynamic link
- Add export module's exported function surface state to the import
module's residency container during dynamic linkage to allow import
kernels to execute exported functions.

Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
2021-08-13 19:26:41 +02:00
Compute-Runtime-Validation 5d49dedf00 Revert "L0 Support for Dynamic Module Linking for undefined symbols"
This reverts commit e602f4829d.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2021-08-13 10:33:13 +02:00
Spruit, Neil R e602f4829d L0 Support for Dynamic Module Linking for undefined symbols
- Support for L0 apps to handle undefined symbols reported by IGC
- Removed duplication of symbol in exported symbol list and relocation
for properly resolving the symbol during dynamic link
- Add export module's exported function surface state to the import
module's residency container during dynamic linkage to allow import
kernels to execute exported functions.

Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
2021-08-12 21:30:13 +02:00
Compute-Runtime-Validation d81c637b96 Revert "Use igc interface to get max param size"
This reverts commit a04d206fdd.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2021-08-07 08:50:27 +02:00
Dominik Dabek a04d206fdd Use igc interface to get max param size
Related-To: NEO-4851

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2021-08-06 12:57:21 +02:00
Krystian Chmielewski 34be220943 Enable relocation from instruction to data seg
Related-To: NEO-5833
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2021-08-05 14:24:29 +02:00
Young Jin Yoon 4ba64d2530 Add ze-opt-level support
Related-To: LOCI-2315
Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
2021-07-20 20:34:57 +02:00
Jaime Arteaga fa26f2b075 Fix typo
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2021-07-19 22:10:38 +02:00
Krystian Chmielewski 9c7d8a183b Decode zebin reloc types
Change LinkerInput::RelocationInfo::Type to be compliant with zebin
relocation types.
Add support for setting relocation type if zebin relocation
type is set.
Continue supporting R_AMD64_64 and R_AMD64_32 relocation types for
backward compatibility

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2021-07-16 12:33:51 +02:00
Dominik Dabek d0cb27226f Move mocks: cif, gmm context, compilers
Related-To: NEO-5161

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2021-05-27 12:51:28 +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
Mateusz Hoppe 28d32d6c8e Cleanup code and cmake
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2021-04-19 18:20:59 +02:00
Matias Cabral e35ffb0601 Retrieve state save area header from IGC
Signed-off-by: Matias Cabral <matias.a.cabral@intel.com>
2021-04-10 03:28:51 +02:00
Spruit, Neil R 7a3095c273 Report failure given Compiler Library Load failed for L0
- Return ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE given the Compiler
  cannot be loaded.
- Print dlopen and LoadLibrary error strings given Debug Print Messages
  are enabled.

Related-To: LOCI-1313

Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
2021-04-01 23:01:38 +02:00
Sebastian Luzynski 6163120809 Remove unnecessary check for gen12lp during symbol relocations
Related-To: NEO-5433

Signed-off-by: Sebastian Luzynski <sebastian.jozef.luzynski@intel.com>
2021-03-30 11:48:06 +02:00
Filip Hazubski 9a8125cdb0 Correct formatting
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2021-03-16 10:29:41 +01:00
Mateusz Hoppe ce15a85a0b Fix debug data relocations
Related-To: NEO-4769

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2021-03-16 09:27:14 +01:00