Commit Graph

65 Commits

Author SHA1 Message Date
Compute-Runtime-Validation 63a5b64c7e Revert "fix: Remove fence handling when reuse cmd buffer"
This reverts commit f3bbd70a58.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2024-01-27 08:28:57 +01:00
Lukasz Jobczyk f3bbd70a58 fix: Remove fence handling when reuse cmd buffer
Resolves: NEO-10163
Related-To: NEO-7116

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2024-01-26 10:06:24 +01:00
Lukasz Jobczyk d472cf0a5d fix: Restore handle fence completion when reusing cmd buffer
Related-To: NEO-7116

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2024-01-04 12:11:39 +01:00
Compute-Runtime-Validation c3b6ca8011 Revert "fix: Restore handle fence completion when reusing cmd buffer"
This reverts commit 5d90818cce.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-12-30 10:39:16 +01:00
Lukasz Jobczyk 5d90818cce fix: Restore handle fence completion when reusing cmd buffer
Related-To: NEO-7116

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2023-12-29 11:38:36 +01:00
Mateusz Jablonski dd1b9d6abc refactor: correct naming of enum class constants 8/n
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-12-19 08:18:18 +01:00
Mateusz Jablonski 432142c574 refactor: correct naming of enum class constants 4/n
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-12-13 08:08:51 +01:00
Mateusz Hoppe 5a4fa180d6 feature: control bindless compilation mode based on release
- check releaseHelper support when selecting bindless mode, if not
disabled, prefer bindless mode in L0 API
- bindless mode can be forced with DebugVariable: UseBindlessMode

Related-To: NEO-7063

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2023-10-19 10:11:11 +02:00
Igor Venevtsev eba306c099 fix: properly set systemMemoryForced flag for secondary command buffers
Due to this flag was not properly handled on Windows, command buffer
allocations were never reused in immediate command lists in case of
host secondary buffers. This lead to huge host memory consumption
and performance degradation

Related-To: NEO-8072

Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
2023-07-05 17:09:15 +02:00
Zbigniew Zdanowicz d4109eb153 [feat, perf] add closing mechanism to command list primary batch buffers
This change adds space reservation in command list for returning batch buffer
start hw command.
Primary batch buffer can be run from direct submission or from KMD call and
must be aligned to required size.
Ending patch for batch buffer start must be in the last command buffer of the
command list.

Related-To: NEO-7807

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2023-04-07 11:28:41 +02:00
Zbigniew Zdanowicz 4c7bc2ca98 [feature, perf] add alogrithm to chain command buffers in container
This feature is part of performance improvement to dispatch and start
command buffers as primary batch buffers.
When exhausted command buffer is closed, then reserve exact space for chained
batch buffer start and bind it to the next command buffer.
When closing command buffer, then save ending pointer and
reserve aligned space.

Related-To: NEO-7807

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2023-04-05 15:49:01 +02:00
Zbigniew Zdanowicz 38e50007f7 [perf] simplify memory layout of command container class
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2023-03-23 13:31:47 +01:00
Zbigniew Zdanowicz bc4e540c33 [fix] unify heaps size programing
- share same code between csr and cmd container to get default heap size
- share handling of debug flag to change heap size
- share platform level surface heap size between csr and command list
- refactor heap size files
- put heap size constant and function into namespace
- command list surface heap size increased to 2MB for xehp+ to match csr
- command list increased surface heap size only for sba tracking
- sba tracking heap consumption increased due to different reset policy

Related-To: NEO-5055

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2023-03-17 08:34:06 +01:00
Zbigniew Zdanowicz f348bf78a3 [fix] allow to use all available command buffer size after reset
- this change uses unified approach to reuse command buffer
- unified method takes all available space when reseting stream

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2023-03-16 12:48:52 +01:00
Zbigniew Zdanowicz e645f58b65 [fix] Do not reset state heap position for command list reset
- state base address tracking allows to reuse base address state
- surface state slots can be reused after sba reload or cache flush
- to avoid cache flush after each reset, then allow to gradualy consume heaps
- only until natural heap depletion and then dispatch reload of sba state

Related-To : NEO-5055

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2023-03-15 19:04:20 +01:00
Zbigniew Zdanowicz d93f00e075 [perf] simplify getting indirect heap memory location
Related-To: NEO-5055

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2023-03-10 17:17:01 +01:00
Zbigniew Zdanowicz 8a55d9b517 skip surface and dynamic heap creation when global heaps are used
Related-To: NEO-5055

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2023-03-07 13:40:14 +01:00
Zbigniew Zdanowicz d3c99f6414 Add level zero heap addressing enum, property and debug key
Related-To: NEO-5055

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2023-03-01 18:28:00 +01:00
Zbigniew Zdanowicz 34064811d2 Refactor state base address programing 4/n
- This change gets level one cache policy from cached values instead
of calling virtual methods

Related-To: NEO-5055

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2023-02-27 17:30:36 +01:00
Zbigniew Zdanowicz 3cb064fe95 Refactor state base address programing 3/n
This is small optimization to replace virtual call and retrieved struct with
cached value.

Related-To: NEO-5055

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2023-02-23 13:08:32 +01:00
Lukasz Jobczyk 2f5be7a48d Copy command buffer into ring buffer
Resolves: NEO-7422

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2023-02-22 16:37:34 +01:00
Zbigniew Zdanowicz f2be0ebfc4 Allocate and consume shared heaps atomically
Related-To: NEO-5055

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2023-02-07 12:52:54 +01:00
Zbigniew Zdanowicz 7e0401d280 Add improvements to heap estimation in level zero command lists
- add estimation parameter for interface descriptor data count
- add to the heap estimation alignment parameter for dynamic and surface heaps
- extend encode interface and implementations to allow child heaps

Related-To: NEO-5055

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2023-02-03 20:26:27 +01:00
Zbigniew Zdanowicz 34b8f08fc6 Add state base address properties tracking for command lists
Related-To: NEO-5055

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2023-01-31 12:47:17 +01:00
Warchulski, Jaroslaw e21cf516d3 Cleanup includes 44
Cleaned up files:
level_zero/tools/source/sysman/windows/os_sysman_imp.h
opencl/source/command_queue/command_queue.h
shared/source/command_container/cmdcontainer.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-25 16:05:22 +01:00
Tratnack, Geoffrey 818db03a68 LOCI-3365: Cleanup MediaInterfaceDescriptorLoad logic in command encoder
Add a patch to command encoder when DSH is dirty.

Signed-off-by: Tratnack, Geoffrey <geoffrey.tratnack@intel.com>
Related-To: LOCI-3365
2022-12-08 17:07:53 +01:00
Warchulski, Jaroslaw 1fa5710dff Cleanup includes 10
Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-12-05 12:39:33 +01:00
Szymon Morek aac8754e67 Create reusable list per immediate cmd list
Related-To: NEO-7361

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-11-14 14:09:35 +01:00
Compute-Runtime-Validation 77b6918f30 Revert "LOCI-3365: Cleanup MediaInterfaceDescriptorLoad logic in command enco...
This reverts commit cb3f7234f0.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-11-12 16:05:11 +01:00
Tratnack, Geoffrey cb3f7234f0 LOCI-3365: Cleanup MediaInterfaceDescriptorLoad logic in command encoder
Add a patch to command encoder for samplers when DSH is dirty.

Signed-off-by: Tratnack, Geoffrey <geoffrey.tratnack@intel.com>
Related-To: LOCI-3365
2022-11-10 23:28:58 +01:00
Szymon Morek 3f5ac0b4d0 Reuse heaps for immediate cmd lists
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-10-11 13:02:13 +02:00
Szymon Morek 5c26ecf004 Remove duplicated code in command container
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-10-05 14:32:52 +02:00
Szymon Morek 6073702941 Reuse command buffer for immediate cmdlist
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-10-04 16:02:18 +02:00
Zbigniew Zdanowicz 3d92186362 Add heap sharing to immediate command lists
This change is intended to be used in immediate command lists that are
using flush task functionality.
With this change all immediate command list using the same csr will consume
shared allocations for dsh and ssh heaps. This will decrease number of SBA
commands dispatched when multiple command lists coexists and dispatch kernels.
With this change new SBA command should be dispatched only when current heap
allocation is exhausted.
Functionality is currently disabled and available under debug key.
Functionality will be enabled by default for all immediate command lists
with flush task functionality enabled.

Related-To: NEO-7142

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-10-03 18:50:10 +02:00
Kamil Kopryk 1c446ff213 Remove wait on user fence during cmdlist destroy/reset
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
Related-To: NEO-7158
2022-09-28 16:46:10 +02:00
Zbigniew Zdanowicz f0888fece2 Rename command list tracking debug flag and variables
This change reflects exact nature of debug variable and what is code
actually doing

Related-To: NEO-7187

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-09-26 18:59:39 +02:00
Kamil Kopryk 17d87a4c69 Add RemoveUserFenceInCmdlistResetAndDestroy debug flag
Related-To: NEO-7156
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-09-19 22:35:53 +02:00
Zbigniew Zdanowicz 218a98f7f7 Refactor of pipeline select programming
Adding new interface to cooperate with hw context state
Simplify programming removing unnecessary functions
Code optimization that stop using expensive call and instead
stores configuration parameter

Related-To: NEO-5019

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-09-15 15:38:10 +02:00
Kamil Kopryk 307b74869c Add OverrideCmdListCmdBufferSize debug flag
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
Related-To: NEO-7156
2022-09-14 13:09:54 +02:00
Dunajski, Bartosz 9763d42379 Fix type redefinition
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2022-08-24 09:45:13 +02:00
Kamil Kopryk 8b5c567bea Remove wait on user fence during cmdlist destroy/reset
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
Related-To: NEO-7156
2022-08-05 09:24:04 +02:00
Aravind Gopalakrishnan 31b2433b2f Avoid implicit sync for async mode immediate copy queue
Related-To: LOCI-1988

Signed-off-by: Aravind Gopalakrishnan <aravind.gopalakrishnan@intel.com>
2022-04-27 08:50:18 +02:00
Dominik Dabek 4044320301 Limit allocations in execute command list
Reserve space in ResidencyContainer

Related-To: NEO-6837

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-04-06 15:00:34 +02:00
Dominik Dabek fccda460d6 Optimize zeCommandListCreate
Do not allocate heap if command list is copy only.

Related-To: NEO-6821

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>

Co-authored-by: Michal Mrozek <michal.mrozek@intel.com>
2022-03-28 16:31:10 +02:00
Filip Hazubski 32b0f7b014 Remove redundant value CsrSizeRequestFlags::numGrfRequiredChanged
Related-To: NEO-5995

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2022-03-15 15:08:15 +01:00
Compute-Runtime-Validation 41c51df086 Revert "Recycle old command buffers of immediate command lists"
This reverts commit 8f93f4f3ec.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-03-10 09:12:47 +01:00
Zbigniew Zdanowicz 8f93f4f3ec Recycle old command buffers of immediate command lists
Related-To: NEO-6242

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-03-08 14:59:26 +01:00
Zbigniew Zdanowicz 8f5dd3cff5 Refactor immediate command list flushing
Related-To: NEO-6242

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-03-07 20:37:28 +01:00
Maciej Plewka 9d8ce7aace Command container appends BB_END on cmd buffer allocation end
When linear stream created for command container has not enough space
for command and BB_END it will program BB_END and allocate new command
buffer allocation. Pointer returned from getSpace in this case will
return storage from new command buffer allocation.

Related-To: NEO-5707

Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2022-01-31 16:15:37 +01:00
Maciej Plewka f8c104feaa Use fw declaration of IndirectHeap in CommandContainer
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2022-01-26 13:30:26 +01:00