Commit Graph

304 Commits

Author SHA1 Message Date
Bellekallu Rajkiran be4570fe10 fix: Read appropriate entry for HBM channels
Related-To: NEO-11949

Signed-off-by: Bellekallu Rajkiran <bellekallu.rajkiran@intel.com>
2024-08-12 09:44:37 +02:00
Maciej Bielski 790bb84841 refactor: decouple ClosCacheReservation from Drm
The dependency towards `Drm` is unnecessary and only makes testing more
difficult. Instead, dependency towards `IoctlHelper` alone only is
sufficient.

Related-To: NEO-10158
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2024-07-31 10:38:35 +02:00
Mateusz Jablonski e24acc6155 fix: ensure memory info is queried before querying engine info
initialization of engine info relies on memory info data

Related-To: NEO-12073
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-07-26 09:28:50 +02:00
Maciej Bielski 2165154530 feature: add support for L3-cache reservation
Resolves: NEO-7849

Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2024-07-24 10:10:28 +02:00
Compute-Runtime-Validation 2116808b8d Revert "fix: correct number of slices based on GuC info"
This reverts commit b6a56bcdde.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2024-07-23 17:22:31 +02:00
Mateusz Hoppe 8a7923c6ee fix: allow fork() after zeInit()
- do not release resources derived from parent process
- zeInit() in child should initilize new driver

Related-To: NEO-11761

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2024-07-23 15:31:50 +02:00
Mateusz Hoppe 0800ab54f5 refactor: remove redundant getPid()
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2024-07-22 22:51:47 +02:00
Compute-Runtime-Validation 9625f88d02 Revert "feature: add support for cache reservation"
This reverts commit b8eabdd4ce.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2024-07-19 20:58:43 +02:00
Mateusz Jablonski 64acb65b08 fix: don't crash when getting pci path for non-render device
Related-To: NEO-11714
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-07-18 12:27:35 +02:00
Mateusz Jablonski b6a56bcdde fix: correct number of slices based on GuC info
KMD exposes flat subslice info without indicating slice index
This commit calculates slice count based on total subslice count and
max subslice per slice count that we have from device blob

Related-To: NEO-12073
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-07-18 12:12:19 +02:00
Maciej Bielski b8eabdd4ce feature: add support for cache reservation
Resolves: NEO-7849

Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2024-07-18 12:08:58 +02:00
Maciej Bielski 005b273b1e test: stop abusing ctors in DrmMockCustom and derived types
Calling virtual functions from within constructors is incorrect, the
virtualization mechanism does not work until a constructor completes.
So, instead of performing many operations in constructors, make them
small and use static `create()` methods to construct the object properly
and only then perform additional setup.

Mocks are a prominent example how such practice degrades the code.
A function called from a constructor is basically unmockable. Despite
being overriden by derived type (to alter the execution path as per
needs of a given test-case) the parent versions are always called.

This was making test development more and more painful as at some point
there is no hack to compensate for the lack of standard mechanism.

Related-To: NEO-9754
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2024-07-10 08:34:09 +02:00
Maciej Bielski f99846a108 feature: add Drm-specific memoryBanks computation logic
Related-To: NEO-9754

Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2024-07-03 10:01:39 +02:00
Mateusz Jablonski 43ca7c082e fix: query csr size in mb and slm size per dss from device blob
Related-To: NEO-8188, NEO-10774
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-06-26 14:42:18 +02:00
Wenbin Lu e39d478acd fix: read max SS & EU/SS from GuC system info blob
Related-To: NEO-9489

Signed-off-by: Wenbin Lu <wenbin.lu@intel.com>
2024-06-26 09:30:57 +02:00
Compute-Runtime-Validation d19f58019f Revert "feature: add Drm-specific memoryBanks computation logic"
This reverts commit 11f7166c5a.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2024-06-25 12:31:26 +02:00
Maciej Bielski 11f7166c5a feature: add Drm-specific memoryBanks computation logic
Related-To: NEO-9754

Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2024-06-24 11:22:41 +02:00
Dominik Dabek dc26b25169 Revert "fix: ulls controller sleep, windows"
This reverts commit 672cc0ebc7.

Resolves: HSD-18038912878, NEO-11770

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2024-06-21 14:10:43 +02:00
Filip Hazubski 0d61860af6 fix: Reset builtins pointer after its resources are freed
Add resetBuiltins helper function to MockRootDeviceEnvironment.
Update tests to use the new function whenever builtins unique pointer
is reset to ensure that sip kernels are properly freed.

Related-To: HSD-18038645398, HSD-18038819112

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2024-06-20 10:49:56 +02:00
Dominik Dabek 672cc0ebc7 fix: ulls controller sleep, windows
Request higher resolution for windows periodic timers for ulls
controller sleep.

Allows for controller thread to sleep with granularity of 1ms.

Related-To: NEO-10800

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2024-06-18 06:28:15 +02:00
Artur Harasimiuk 8d28f8d90e fix: adjust SysCalls::write signature to match stdlib
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2024-06-14 16:48:12 +02:00
Maciej Plewka 32cfa3d497 fix: stop using LocalOnly flag on Xe2+ platforms
Related-To: NEO-11391
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2024-06-10 11:26:20 +02:00
Bartosz Dunajski da9c009b88 feature: assign unique interrupt to queue
Related-To: NEO-8179

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2024-06-07 10:06:31 +02:00
Anvesh Bakwad f75d03c866 fix(sysman): Fix memory management issues in Sysman PMT windows module
Related-To: NEO-11251

Signed-off-by: Anvesh Bakwad <anvesh.bakwad@intel.com>
2024-05-23 18:36:17 +02:00
Maciej Bielski dc32da2507 feature: prepare StorageInfo for Drm-specific customization
Get the local memory regions count from the primary source (MemoryInfo)
and store for further use when using DrmMemoryManager.
Add a point of dispatch (virtual `createStorageInfoFromProperties`) for
further Drm-specific customizations related to StorageInfo. As the
function became virtual, move one of its callers
(`isLocalMemoryUsedForIsa()`) from the constructor of `MemoryManager` to
respective constructors of all derivative classes. This prevents
bypassing the virtual call dispatch.

Related-To: NEO-9754
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2024-05-16 12:24:48 +02:00
Maciej Bielski 014720fc29 refactor: use DeviceBitfield where appropriate
Replace less type-safe uint32_t and reduce conversions between both
types.

Related-To: NEO-9754
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2024-05-14 09:13:11 +02:00
Young Jin Yoon 2c488d9e84 fix: check reset status after completion
Added a logic to check the reset status after the completion to make
sure we go through the logic at least once

Related-To: GSD-8902
Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
2024-05-14 06:38:07 +02:00
Bartosz Dunajski e5882e0d31 feature: pass GraphicsAllocation to fence wait
Related-To: NEO-8179

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2024-05-07 17:59:28 +02:00
Bartosz Dunajski 806da85ec6 refactor: prework to pass interrupt hint
Related-To: NEO-8179

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2024-04-29 11:14:53 +02:00
Mateusz Jablonski 25bed07989 fix: correct calculating system shared memory size
do not exceed system memory region size when region is available

Related-To: HSD-18038050680
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-04-24 18:55:23 +02:00
Igor Venevtsev 6425afc548 fix: properly set ReadOnly flag for D3DKMTCreateAllocation2
This is an OS behavior to have failed an allocation with a
const buffer backing storage (PAGE_READONLY attribute set)
ReadOnly flag allows to create allocation with read-only
backing storage

Related-To: NEO-9664, HSD-16021966023

Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
2024-04-19 11:32:46 +02:00
Maciej Bielski c2b4699cb6 feature: Add mask of tiles to each memory region in Xe
* Derive that information from GT list
* Use it to compute local memory size given the mask of tiles to account
for
* Leverage IoctlHelper to dispatch execution (i915 vs Xe)

Related-To: NEO-9754
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2024-04-16 14:22:40 +02:00
shubham kumar 6a55bbe6cd feature(sysman): Add pmt support in windows
Related-To: NEO-8804

Signed-off-by: shubham kumar <shubham.kumar@intel.com>
2024-04-10 12:42:19 +02:00
Compute-Runtime-Validation 5288100d86 Revert "feature(sysman): Add pmt support in windows"
This reverts commit ebf88c92ca.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2024-04-09 17:37:41 +02:00
shubham kumar ebf88c92ca feature(sysman): Add pmt support in windows
Related-To: NEO-8804

Signed-off-by: shubham kumar <shubham.kumar@intel.com>
2024-04-04 11:08:58 +02:00
Mateusz Jablonski 420e1391b2 fix: handle not aligned gtt size reported by i915
when i915 reports gtt size between 47 and 48 bits we consider
it as 48 bit VA space

Related-To: GSD-8215
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-03-29 07:51:06 +01:00
Wenju He 03078541d7 feature: make global bindless heaps resident when created
Make bindless heaps resident right after heap allocation.
Motivation is that SYCL bindless image can be passed as a value argument
or through memory. Therefore, we're not able to make its bindless heap
resident during kernel initialization or setting kernel arguments.

This fixes SYCL bindless image read_write_*D.cpp tests on DG2.

Related-To: NEO-7063
Signed-off-by: Wenju He <wenju.he@intel.com>
2024-03-20 14:40:11 +01:00
Bellekallu Rajkiran 9736313d10 feature: Support for ccs mode configuration via SysFs
Add support for configuring ccs mode for all applicable devices
before KMD is loaded.

Use ZEX_NUMBER_OF_CCS to configure ccs mode.

Format is as follows:

ZEX_NUMBER_OF_CCS=NumberOfCcs i,e Setting ZEX_NUMBER_OF_CCS
to 4 sets ccs mode to 4 for all devices for which configuration
is supported.

Related-To: NEO-10378

Signed-off-by: Bellekallu Rajkiran <bellekallu.rajkiran@intel.com>
2024-03-15 15:51:45 +01:00
Young Jin Yoon 82728ff394 feature: add logic to iterate for all contexts to check GPU pagefault
Implemented to go through entire contexts in the process and then query
reset status to check the unexpected GPU segfault.

Added a new debug variable GpuFaultCheckThreshold to change the checking
frequency for each hang check for performance analysis.

Related-To: GSD-5673
Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
2024-03-15 07:48:39 +01:00
Neil R. Spruit b5f8a38f19 feature: Enable Per IP euStall Functionality
Related-To: NEO-10220

Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
2024-03-14 16:49:52 +01:00
Artur Harasimiuk c3d884e548 test: improve test timeout configuration
Allow custom values for different test types, i.e. ULT, AUB, etc. can
have custom timeout by using e.g.: NEO_{ULT,AUB,...}_ITERATION_MAX_TIME.
Old behavior with reading NEO_ULT_ITERATION_MAX_TIME for each test type
is preserved but new envirnoment variable has precedence.

Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2024-02-28 09:05:29 +01:00
Dominik Dabek ed011de03e performance: program pat index on mtl linux
Enable programming pat indexes on mtl linux for device buffers.

Change DrmMemoryManager::allocateMemoryByKMD to use gemCreateExt.

Changes currently disabled, can be enabled with flag
DisableGemCreateExtSetPat=0

Related-To: NEO-7896

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2024-02-15 17:15:28 +01:00
Compute-Runtime-Validation 7b340775c6 Revert "performance: program pat index on mtl linux"
This reverts commit 8e0b23db84.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2024-02-15 02:06:03 +01:00
Dominik Dabek 8e0b23db84 performance: program pat index on mtl linux
Enable programming pat indexes on mtl linux for device buffers.

Change DrmMemoryManager::allocateMemoryByKMD to use gemCreateExt.

Related-To: NEO-7896

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2024-02-14 18:42:04 +01:00
Brandon Yates ea7ae7564f feature: Implement read/writeGpuMemory for Xe debugger
- makes prelim read/writeGpuMemory generic
- Implements Xe specific ioctls and fsyncs
- Refactors dbg IoctlHelper to use shared base class
for Xe and i915

Related-to: NEO-9668

Signed-off-by: Brandon Yates <brandon.yates@intel.com>
2024-02-08 22:09:59 +01:00
Yoon, Young Jin 9c7578f5f4 fix: change numa_library to read default policy
Changed NumaLibrary to read default policy instead of using
the address-based policy, and remove unnecessary argument.

Removed numaif.h from the repo as it is no longer required.

Related-To: NEO-8276
Signed-off-by: Yoon, Young Jin <young.jin.yoon@intel.com>
2024-01-19 08:31:41 +01:00
Mateusz Jablonski 2b25cbaa41 test: remove not needed printf
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-01-15 19:20:45 +01:00
Dominik Dabek 997bdfa010 performance: add windows thread priority debug key
Set windows thread priority to "above normal" on wddm init if flag is
set.

Related-To: NEO-8215

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2024-01-15 08:14:46 +01:00
Kamil Kopryk 5432b57fd0 refactor: improve readability
Added a time unit to the variable name to make it clear.
Removed incorrect and not needed check.

Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2024-01-05 14:53:52 +01:00
Young Jin Yoon 4ccae1dbb4 feature: support memory policy for GEM_CREATE
Modified ioctl_helper_prelim to support the extension of gem_create_ext,
i.e. prelim_drm_i915_gem_create_ext_mempolicy.

Added two debug variables to be used for the mempolicy extension.

Modified functions in memory_info and drm_memory_manager to support extension

Added numaif.h from https://github.com/numactl/numactl/tree/master,
v2.0.14

Related-To: NEO-8276
Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
2024-01-04 23:49:10 +01:00