Commit Graph

256 Commits

Author SHA1 Message Date
Maciej Bielski 56cb1f757b programStateBaseAddress: improve code reuse
Another step towards cleaner callers of
StateBaseAddressHelper<>::programStateBaseAddress.

Export programming state base address into a separate function to
improve code reuse and reduce copy-pasted fragments, which make code
modifications or maintenance more and more difficult over time. Use
specialization for gen-specific variations.

Related-To: NEO-6774
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2022-09-21 11:54:57 +02:00
Zbigniew Zdanowicz cee520b311 simplify systolic mode code and reduce double implementation
Related-To: NEO-5019

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-09-15 11:57:54 +02:00
Maciej Bielski 0d0d6a300e Debugger: simplify captureStateBaseAddress()
So far captureStateBaseAddress() was a wrapper around
programSbaTrackingCommands(), doing an additional checking before
calling the latter. The checking is apparently no longer relevant, so
unify the distinction and remove part of the code which is no longer
needed.

In practice, keep the captureStateBaseAddress() while moving the body of
programSbaTrackingCommands() into it. This imposes lower diff-impact
onto the class hierarchy. Remove the second function. Simplify the
caller which had to distinct these two functions previously.

Related-To: NEO-6774
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2022-09-13 17:08:31 +02:00
Maciej Bielski e1b80ba1a8 Cleanup: updateStreamProperties(), SBA tracking
Fixes found out while working on the StateBaseAddress adaptation to
StreamProperties. Removing unused parameters, improving code reuse
(further improvements come with following commits).

Related-To: NEO-6774
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2022-09-12 17:56:28 +02:00
Mateusz Hoppe 6ad16c9e72 Missing support for OCL debugging with L0
- make resident debugSurface
- allocate debugSurface with correct allocation type and size
- notify cmdQ create/destroy

Related-To: NEO-7075

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-09-07 13:30:05 +02:00
Zbigniew Zdanowicz a4b9b3b837 Extend encode class for start and end hw commands
Related-To: NEO-5019

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-09-02 16:29:36 +02:00
Zbigniew Zdanowicz c3f7e40a8d Rename special pipeline select mode to systolic
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-08-31 22:16:26 +02:00
Dominik Dabek 8cc0177f1c Change DG2 l1 cache policy to WB
With compiler LSC WAs this gives better performance.

If debugger is active, policy will not be changed ie.
will be WBP.

Related-To: NEO-7003

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-08-31 14:31:23 +02:00
Compute-Runtime-Validation 2621460e80 Revert "Change DG2 l1 cache policy to WB"
This reverts commit a820e73dd7.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-08-27 08:04:19 +02:00
Dominik Dabek a820e73dd7 Change DG2 l1 cache policy to WB
With compiler LSC WAs this gives better performance.

If debugger is active, policy will not be changed ie.
will be WBP.

Related-To: NEO-7003

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-08-26 12:58:45 +02:00
Dunajski, Bartosz 595cfebaef Refactor PIPE_CONTROL programming
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2022-08-23 13:55:25 +02:00
Zbigniew Zdanowicz 0011368775 Add parameter to set surface state base address value
This change introduces capability to set surface state base address
when surface state heap or global base address are not available

Related-To: NEO-7187

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-08-18 15:36:43 +02:00
Zbigniew Zdanowicz 6c38b36251 Unify getting state base address command space from command buffer
Related-To: NEO-5019

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-08-17 11:49:02 +02:00
Zbigniew Zdanowicz ceb9d81f87 Add struct argument for input/output in StateBaseAddressHelper
This refactor makes future interface changes easier

Related-To: NEO-5019

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-08-17 10:28:49 +02:00
Zbigniew Zdanowicz 1b9d50660a Unify programming of binding table base address command
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-08-10 14:35:02 +02:00
Dunajski, Bartosz 98d776867f Add initial support for KernelArgsBuffer allocation
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2022-08-03 20:28:21 +02:00
Dunajski, Bartosz a3903c385e Remove HW types from synchronization interface
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2022-07-25 13:59:26 +02:00
Bartosz Dunajski 52b00a11b0 Remove LSH from CommandQueue
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-07-19 08:47:02 +02:00
Dominik Dabek 5899fc6bfb Enable taskcount from wait on multi gpu envs
Related-To: NEO-6948

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-07-14 15:28:48 +02:00
Dominik Dabek b225c63b9a Fix: Disable timestamp from wait on multi gpu envs
Related-To: NEO-6948

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-07-13 13:33:29 +02:00
Compute-Runtime-Validation f53ae0a50e Revert "Add debug flag for EOT WA"
This reverts commit cf3817e058.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-07-09 01:21:56 +02:00
Mateusz Jablonski cf3817e058 Add debug flag for EOT WA
EOT WA requires allocating last 64KB of kernel heap and putting EOT
signature at the last 16 bytes of kernel heap

Related-To: NEO-7099
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-07-07 16:58:24 +02:00
Bartosz Dunajski 76d905b1f2 Pass LogicalStateHelper to SBA helper
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-07-01 14:52:20 +02:00
Bartosz Dunajski 95d4ac7812 Capability to insert WA MMIO for BCS dispatch
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-07-01 11:53:53 +02:00
Lukasz Jobczyk 34a7059032 Avoid reading command buffer in flushed batched submissions
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2022-07-01 11:06:38 +02:00
Bartosz Dunajski f2bbd63d37 Refactor SBA handling + fix unit tests
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-06-29 13:27:57 +02:00
Bartosz Dunajski 2d976098f5 Use LogicalStateHelper to program FrontEndState
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-06-27 19:42:54 +02:00
Bartosz Dunajski 2c853adac3 Use LogicalStateHelper to program ComputeMode
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-06-27 15:25:55 +02:00
Bartosz Dunajski 61b2ee45cd Use LogicalStateHelper to encode SystemMemoryFence
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-06-24 13:29:58 +02:00
Bartosz Dunajski 0b5269d4ae Use LogicalStateHelper to program CSR allocation
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-06-22 21:19:57 +02:00
Bartosz Dunajski f4485ec541 Use LogicalStateHelper for SIP programming
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-06-22 13:46:57 +02:00
Bartosz Dunajski ba156c7eaa Add writeStreamInline at the end of flushTask
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-06-15 12:34:51 +02:00
Bartosz Dunajski 939d109362 Add LogicalStateHelper class
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-06-14 16:57:16 +02:00
Maciej Bielski 8de043b71f Stop redundant SBA programming due to global atomics
For all platforms different than XE_HP_SDV (ATS) stop considering the
`useGlobalAtomics` flag as a decisive factor for trigerring the SBA
(StateBaseAddress) programming on the HW. Only XE_HP_SDV supports such
flag.

For consistency of the implementation, keep the related logic in one
place only, that is a helper in `command_encoder` and then just reuse it
in different places (`command_stream_receiver`).

Related-To: NEO-6953
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2022-06-08 10:39:56 +02:00
John Falkowski 620bb970f4 Resubmit fix for task count hang
Signed-off-by: John Falkowski <john.falkowski@intel.com>
2022-06-07 16:28:17 +02:00
Daniel Chabrowski 6fd7ae7142 Cleanup headers
Signed-off-by: Daniel Chabrowski <daniel.chabrowski@intel.com>
2022-05-26 17:55:44 +02:00
Zbigniew Zdanowicz 52a3bfcfde Unify programming of pipe control command
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-05-16 18:42:04 +02:00
Szymon Morek 4266f861ac Make implicit flush for cross-device dependency
Related-To: NEO-6418

If there's a cross-device dependency, flush batched
submissions to avoid deadlock.

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-05-16 16:29:09 +02:00
Patryk Wrobel 9b2ad0c5df Detect GPU hangs in flushBcsTask()
This change introduces detection of GPU hangs in flushBcsTask()
function. The new code has been covered with ULTs.

Related-To: NEO-6681
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
2022-05-12 16:17:16 +02:00
Zbigniew Zdanowicz 910871a706 add multi-tile support for completion diagnostic
Related-To: NEO-6871

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-05-11 13:37:32 +02:00
Mateusz Jablonski 943ad0e1eb style: skip redundant unique_ptr::get function
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-05-10 13:22:40 +02:00
Maciej Plewka 0a16dc6c47 Fix multi thread usage of external host alloc
This is fixed reupload of this commit after auto revert
With this commit OpenCL will track if external host memory is used from
few threads and will secure to update task count in all threads before
destroing allocation.

Resolves: NEO-6807

Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2022-05-05 13:32:15 +02:00
Compute-Runtime-Validation 00a1a14652 Revert "Fix multi thread usage of external host alloc"
This reverts commit 54eee2a88b.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-04-28 17:42:07 +02:00
Mateusz Jablonski ffd1c430b1 feature: use completion fence value from direct submission when available
Related-To: NEO-6643
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-04-28 15:38:11 +02:00
Maciej Plewka 54eee2a88b Fix multi thread usage of external host alloc
With this commit OpenCL will track if external host memory is used from
few threads and will secure to update task count in all threads before
destroing allocation.

Resolves: NEO-6807

Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2022-04-26 15:31:24 +02:00
Mateusz Hoppe 96c668d595 L0 Debugger - Support for debugging immediate cmd lists
- add debugger support to imm cmd lists
- add debugger support to flushTask

Related-To: NEO-6845

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-04-22 14:43:41 +02:00
Mateusz Hoppe 5911515ed0 Refactor debugger code
- helper sets all SbaAddresses for debugger in
EncodeStateBaseAddress<GfxFamily>::setSbaAddressesForDebugger()
- change DebuggerL0::captureStateBaseAddress() to take
LinearStream
- move getSbaTrackingCommandsSize() to Debugger class

Related-To: NEO-6845

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-04-21 13:04:34 +02:00
Mateusz Jablonski b5b8762faf refactor direct submission: Pass command stream receiver to ctor
Related-To: NEO-6643

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-04-19 23:02:55 +02:00
Dominik Dabek 8d1ad5a4f3 Refactor: use stack vector for root device indices
Stack vector will not cause dynamic allocations in most circumstances
ie. number of root device indices not more than 16

Related-To: NEO-6837

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-04-14 14:05:42 +02:00
Bartosz Dunajski fc4eaa1894 Refactor passing GlobalFenceAllocation to DirectSubmission
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-04-07 16:08:07 +02:00