Track memory used by memory allocations. System and local per device.
Will be used for heuristics in memory pooling.
Related-To: NEO-11356
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
avoid redefinition issue in case of integrating multiple xe drm versions
define mock drm xe in inl file to provide xe definitions for mock members
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
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>
Added the test to check whether numa library is not loaded
when EnableHostAllocationMemPolicy is not set.
Related-To: GSD-5053
Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
add fallback to get max eu per ss from topology if not available in other way
Related-To: NEO-12073
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
firstly, setup hw info using product specific functions
secondly, query system info from GuC to setup max values
then, query memory info
then, query engine info as it depends on memory info
then, query topology as it depends on engine info
Related-To: NEO-12073
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
support for DRM_XE_VM_BIND_FLAG_IMMEDIATE and DRM_XE_VM_BIND_FLAG_READONLY
Fixes: #717
Related-To: NEO-10958
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
firstly, setup hw info using product specific functions
secondly, query system info from GuC to setup max values
thirdly, query topology to setup current topology data
Related-To: NEO-12073
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
Some OpenCL application need to render libva surface
with drm display and use the same libva surface as
OpenCL kernel output. Such applicatoins need to
use /dev/dri/card0 instead of /dev/dri/renderD128
for getting the display fd.
Related-To: NEO-11714
Signed-off-by: Elaine, Wang <elaine.wang@intel.com>
Removed if condition when calling vm_bind in order to
reflect changed in KMD.
Specifically, dii-4347 to dii-4349 include changes on
strict fence ordering on vm_bind, where user fence has
to be inserted regardless of using pagefault or explicit
residency.
Related-To: NEO-11966
Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
adjust slice count to proper value based on previously calculated
max slices and max subslice counts
Related-To: NEO-12073
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
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>
for xe kmd there will be new query for EU per DSS for PVC, LNL, BMG platforms
when new query is available, previous one (currently used in NEO) will be empty
To avoid integration issues this commit adds fallback to setup that value based
on max eu per dss that we get from GuC in device blob
Support for new query is in PR https://github.com/intel/compute-runtime/pull/745
Related-To: NEO-12012
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
once drm specific code queries engine info, caps are stored in drm-agnostic form
Related-To: NEO-10445
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
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>