Commit Graph

209 Commits

Author SHA1 Message Date
Kacper Nowak 1fc435e529 fix(ocl): Remove unneeded cast from ClCreateContextFromType API call
Remove not needed c-style cl_context handle casting on
clCreateContextFromType API call. This bug is currently also visible
when using OCL tracing API.
Related-To: NEO-8011
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2023-06-19 14:07:40 +02:00
Maciej Bielski 7ea8ed1757 refactor: extract generic parts of small buffers allocator
Currently the whole code resides within the opencl/ tree, but the
mechanism is meant to be reused in L0 for kernel-ISA allocations
optimization (further work).

This commit is a preparation step, which extracts the generic mechanism
and moves the extracted part under the shared/ tree.

Related-To: NEO-7788
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2023-06-13 10:46:03 +02:00
Warchulski, Jaroslaw e72a607c31 fix: propagate error from makeResident to API call
Related-To: NEO-6766
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-05-30 16:13:38 +02:00
Lu, Wenbin 5d653c8536 fix: Add alignment support to createUnifiedMemoryAllocation
Allows the user to use alignments > 64KB in `createUnifiedMemoryAllocation`

So that the restriction in `piextUSMDeviceAlloc` of the DPC++ runtime
could be lifted

Related-To: LOCI-4168

Signed-off-by: Lu, Wenbin <wenbin.lu@intel.com>
2023-05-02 09:19:23 +02:00
Diedrich, Kamil 5149d74141 refactor: Remove globaly enabled cl_cache
Current behaviour will be detecd path existence

Related-To: NEO-4262

Signed-off-by: Diedrich, Kamil <kamil.diedrich@intel.com>
2023-04-28 23:28:49 +02:00
Fabian Zwolinski cbce863dc2 refactor: Rename member variables to camelCase 3/n
Additionally enable clang-tidy check for member variables

Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2023-04-28 16:01:14 +02:00
Warchulski, Jaroslaw bbf23df6eb feature: add new API functions for external memory sharing
Related-To: NEO-6757
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-04-28 11:43:19 +02:00
Kacper Nowak 7be2ac84d3 Refactor(ocl): refactor OCL Kernel and MultiDeviceKernel class 1/n
- For static create() method for Kernel and MultiDeviceKernel force errcodeRet
parameter to be passed via reference (instead of a pointer)
- Move part of kernel's creation logic to initialize() method

Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2023-04-11 11:43:26 +02:00
Kacper Nowak 3459f3a7f6 fix(OCL): Propagate error on kernel creation to API call
On clCreateKernelsInProgram API call, we do not propagate potential
error from MultiDeviceKernel::create function. User would not know that
i.e. out of 4 kernels, only 3 were created succesfully.
- Propagate error returned from MultiDeviceKernel::create function to
API call
- In case of a failure on kernel creation, release all resources for the
already created ones and return empty array (nullptrs).

Related-To: NEO-7879
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2023-04-06 15:12:41 +02:00
Compute-Runtime-Validation 2b93126795 Revert "Add alignment support to createUnifiedMemoryAllocation"
This reverts commit ca02bbba4b.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-03-30 15:43:47 +02:00
Lu, Wenbin ca02bbba4b Add alignment support to createUnifiedMemoryAllocation
Allows the user to use alignments > 64KB in `createUnifiedMemoryAllocation`

So that the restriction in `piextUSMDeviceAlloc` of the DPC++ runtime
could be lifted

Related-To: LOCI-4168

Signed-off-by: Lu, Wenbin <wenbin.lu@intel.com>
2023-03-28 10:57:04 +02:00
Fabian Zwolinski 65c73a690f Introduce Online, Offline, Disabled DebuggingModes
This change allows to set DebuggingMode via
ZET_ENABLE_PROGRAM_DEBUGGING env var
0: Disabled
1: Online
2: Offline

Related-To: NEO-7630
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2023-03-17 09:31:17 +01:00
Mateusz Hoppe e62c5e25d5 refactor: change debugging enabled to debugging mode
Related-To: NEO-7630

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2023-03-15 13:41:41 +01:00
Jaime Arteaga 55952d33df feature: Enable use KMD calls in prefetch APIs
If applications call Prefetch APIs, like
zeCommandListAppendMemoryPrefetch and
clEnqueueMigrateMemINTEL, then enable the use of KMD calls
by default.

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2023-03-07 16:31:50 +01:00
Fabian Zwolinski 6c59953072 Add FP64 emulation support for ATS-M
This patch adds FP64 emulation support for ATS-M.
Introducing new environment variable - NEO_FP64_EMULATION - which provides
an option to allow the opt-in emulation of FP64.
When emulation is enabled, we pass -cl-fp64-gen-emu (ocl) /
-ze-fp64-gen-emu (L0) as an internal option to IGC.

Related-To: NEO-7611
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2023-03-07 14:21:01 +01:00
Dunajski, Bartosz 72ada8b41f Add missing pollForCompletion on clEnqueueVerifyMemoryINTEL
Related-To: NEO-7618

Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2023-03-03 10:55:33 +01:00
Krystian Chmielewski 5caf7f7290 feat(linker): allow use of local symbols
This commit adds support for handling local symbols.
* Added 2 fields to SymbolInfo - binding, and associated
instructions segment id.
* Simplified code for decoding elf symbols and relocations.
* Simplified code for patching instruction segments.
* Changed logic of decodeElfSymbolTableAndRelocations:
* Add every global symbol to symbol map.
* Add any local symbol used by relocation to symbol map.
* Changed logic of link:
* After performing relocations remove local symbols from map.
* Replaced UNRECOVERABLE_IF with returning error.
* Removed LocalSymbolInfo structure used before for local kernel jumps.
* Removed old tests.

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2023-03-02 12:39:21 +01:00
Kamil Kopryk 2484c7ceb2 refactor: rename hw_helper files to gfx_core_helper files
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-02-01 19:37:51 +01:00
Kamil Kopryk 68bfd49033 refactor: don't use global ProductHelper getter 15/n
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-01-27 17:51:57 +01:00
Warchulski, Jaroslaw 414dbed5d9 Cleanup includes 46
Cleaned up files:
opencl/source/api/api.h
opencl/source/os_interface/windows/d3d_sharing_functions.h
opencl/test/unit_test/aub_tests/command_stream/aub_mem_dump_tests.h
opencl/test/unit_test/fixtures/ult_command_stream_receiver_fixture.h
shared/source/os_interface/linux/device_time_drm.h
shared/source/os_interface/linux/os_time_linux.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-27 14:31:05 +01:00
Warchulski, Jaroslaw fe8a6d98ad Cleanup includes 45
Cleaned up files:
opencl/source/api/api.h
shared/source/command_stream/csr_deps.h
shared/source/helpers/engine_node_helper.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-26 11:12:15 +01:00
Warchulski, Jaroslaw 8cc4cc1612 Cleanup includes 38
Cleaned up files:
opencl/source/cl_device/cl_device.h
opencl/source/command_queue/command_queue.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-20 14:55:17 +01:00
Warchulski, Jaroslaw fecb52ac49 Cleanup includes 29
Cleaned up files:
opencl/source/helpers/cl_memory_properties_helpers.h
shared/source/memory_manager/surface.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-13 07:53:03 +01:00
Mateusz Jablonski 43b790957d style: format code using clang-format 15.0.6
Related-To: NEO-7500
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-01-05 10:33:47 +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
Compute-Runtime-Validation 429755e0f4 Revert "Check for context in appendMemoryCopy"
This reverts commit 32bab85f7e.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-12-21 05:38:37 +01:00
Jaime Arteaga 32bab85f7e Check for context in appendMemoryCopy
Confirm the allocations used in an appendMemoryCopy operation
belong to the same context as the list.

Related-To: LOCI-1996
Resolves: NEO-6162

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2022-12-20 00:13:36 +01:00
Compute-Runtime-Validation 5a29cf8508 Revert "Check for context in appendMemoryCopy"
This reverts commit afd0784c16.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-12-16 03:28:06 +01:00
Compute-Runtime-Validation 1894d2da5b Revert "Limit cooperative dispatch support to platforms supporting cooperativ...
This reverts commit c124bfbc6c.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-12-16 02:52:59 +01:00
Jaime Arteaga afd0784c16 Check for context in appendMemoryCopy
Confirm the allocations used in an appendMemoryCopy operation
belong to the same context as the list.

Related-To: LOCI-1996
Resolves: NEO-6162

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2022-12-15 23:42:10 +01:00
Filip Hazubski c124bfbc6c Limit cooperative dispatch support to platforms supporting cooperative engine
By default, cooperative dispatch is not supported
for platforms not supporting cooperative engine.

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2022-12-15 15:12:23 +01:00
Mateusz Jablonski 10dbfc0d19 Reduce usage of global gfx core helper getter [3/n]
Related-To: NEO-6853
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-12-13 11:13:11 +01:00
Dominik Dabek 8468d6c4b0 Prepare for pool buffer enabling 2/n
Use correct offset for subBuffer created with clCreateSubBuffer

Make calls to clGetMemObjectInfo for CL_MEM_OFFSET and
CL_MEM_ASSOCIATED_MEMOBJECT return values like with pool buffer disabled

Related-To: NEO-7332

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-12-09 21:58:05 +01:00
Kamil Kopryk 03b687881f Rename HwHelper -> GfxCoreHelper
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-12-09 10:29:06 +01:00
Slawomir Milczarek 5c1b50bccf Add memory prefetch modes for single and multiple subdevices
Single-subdevice prefetch for cmd list copy-only (with bcs) and acc mode.
Multi-subdevice prefetch (default) for shared allocation with multiple BOs.

Related-To: NEO-6740

Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
2022-12-07 15:25:32 +01:00
Fabian Zwolinski f6eb2e753a Error check total SLM size not only inline
Related-To: NEO-7280
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2022-11-21 15:30:25 +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
Compute-Runtime-Validation 052164c559 Revert "Use total SLM instead of inline in error checking"
This reverts commit e1c49d0f23.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-10-22 09:41:36 +02:00
Fabian Zwolinski e1c49d0f23 Use total SLM instead of inline in error checking
Related-To: NEO-7280
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2022-10-21 12:39:48 +02:00
Dominik Dabek d1a6054af9 enable create subBuffer from pooled buffer
Allow creating subBuffer from buffer from buffer pool allocator
by redirecting the call to the pool buffer and adjusting offset

Related-To: NEO-7332

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-10-19 09:33:10 +02:00
Fabian Zwolinski 7953d15826 Print warning when kernel uses too much SLM
Instead of just returning proper error code in case of exceeding
available Shared Local Memory size we also want to print error message
to make debugging easier.

Related-To: NEO-7280
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2022-10-07 19:06:19 +02:00
Fabian Zwolinski 1142404c0c Add error handling when kernel uses too much SLM
API Functions reporting error:
- clCreateKernel
- clEnqueueNDRangeKernel
- zeKernelCreate
- zeCommandListAppendLaunchKernel
- zeKernelSuggestGroupSize

Related-To: NEO-7280
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2022-10-06 16:45:42 +02:00
Dunajski, Bartosz 9100610b5d Remove test API to disable overdispatch
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2022-10-06 10:12:47 +02:00
Compute-Runtime-Validation f226718fef Revert "Remove test API to disable overdispatch"
This reverts commit 3b92cef7a1.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-10-05 23:51:17 +02:00
Dunajski, Bartosz 3b92cef7a1 Remove test API to disable overdispatch
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2022-10-04 09:54:05 +02:00
Dunajski, Bartosz f2ce393fc2 Capability to set overdispatch param for Kernel
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2022-09-27 18:29:04 +02:00
Patryk Wrobel 46e0317548 Remove possibility of accessing directly USM device memory in debug logs
clEnqueueSVMMemFill() is utilized by clEnqueueMemFillINTEL().
The latter may receive USM device pointers. If anyone passed
such pointer then SEGMENTATION_FAULT would occur.

Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
2022-09-23 17:14:05 +02:00
Kamil Kopryk d4d54f5093 Cleanup includes
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-07-25 09:58:38 +02:00
Milczarek, Slawomir 3e22f30ed5 clEnqueueMigrateMemINTEL with memory prefetch for KMD migrated shared allocation
Related-To: NEO-6740

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2022-07-14 17:35:22 +02:00
Zbigniew Zdanowicz e07f9f0698 Add kernel algorithm to check any argument is using system memory
Related-To: NEO-6959

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-07-12 13:08:49 +02:00