Each host function gets its unique ID within a CSR,
uses 1 mi store to write ID - to signal that host function is ready,
and 1 mi semaphore wait will wait for the ID to be cleared,
Use 0th bit from ID as pending/completed flag,
host function ID is incremented by 2, and starts with 1.
So each ID will always have 0bit set.
This is a must have since semaphore wait can wait for 4 bytes only.
Adjust command buffer programming and patching logic to IDs.
Add hostFunction callable class - using invoke method,
which stores required information about callback.
Add host function streamer - stores all host function data
for a given CSR.
All user provided host functions are stored in unordered map,
where key is host function ID.
Add host function scheduler, and a thread pool - under debug flag
Single threaded scheduler loops over all registered host function streamers,
dispatch ready to execute host functions to thread pool.
Allow for out of order host functions execution for OOQ - under debug flag,
each host function has bool isInOrder flag which indicates if it can be
executed Out Of Order - in this mode, ID tag will be cleared immediately,
so semaphore wait will unblock before the host function execution.
Remove Host Function worker CV and atomics based implementation.
Rename classes
Related-To: NEO-14577
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
* add common host function worker interface
* add worker as a single thread per csr with 3 modes
* add logic for waiting on internal tag, check gpu hang
* if tag is in pending state, read callback data, run callback
and signal completion
* threads will exit the work loop once stop request
is called in finish
* add multi thread unit tests
Related-To: NEO-14577
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
- program in place for immediate cmdlist
- add to patch commands for regular cmdlist
- initialize host data allocation for the 1st use in csr
Related-To: NEO-14577
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
- sum total noop size requirement for both in order and noop patchlist
Related-To: NEO-15376
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
Related-To: NEO-15570
- Fixes for missing handle definitions for DDi Ext compliance and
incorrect definitions for several handle definitions requiring handle
translation.
Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
- update correctly mutable residency of cooperative kernel barrier allocation
- fix disable noop patching when mutate into non cooperative kernel
- reset mutation variables for not default kernels in mutable kernel group
Related-To: NEO-10492
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
use uint32_t-alias type to avoid casting out of ze_structure_type_t enum range
Related-To: NEO-12901
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
Related-To: NEO-13715
Implements basic functionality for zeCommandListAppendMemoryAdvise for
system allocator
Signed-off-by: Chandio, Bibrak Qamar <bibrak.qamar.chandio@intel.com>