Commit Graph

50 Commits

Author SHA1 Message Date
Lukasz Jobczyk 8ed14d0c9f Use ZE_AFFINITY_MASK for neo devices
Resolves: NEO-5438

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2021-01-29 11:13:29 +01:00
Lukasz Jobczyk 18bfc3be8b Revert "Extend ZE_AFFINITY_MASK to OCL"
This reverts commit 452b53fb4d02ebf4205018b9fd982422e2d85f30.

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2021-01-21 10:31:40 +01:00
Lukasz Jobczyk d9b6280511 Extend ZE_AFFINITY_MASK to OCL
Resolves: NEO-5438

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2021-01-19 14:10:44 +01:00
Mateusz Jablonski 1b7d7afc07 Refactor USM properties
store reference to std of root device indices and device bitfields
store NEO::Device in USM properties

Related-To: NEO-3691
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-12-30 11:36:56 +01:00
Jitendra Sharma 7c70a14bc4 Implement ZE_ENABLE_PCI_ID_DEVICE_ORDER environment variable
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2020-12-23 12:08:43 +01:00
Zbigniew Zdanowicz b32b5784c2 Fix calculations for offseted addresses
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2020-12-11 20:25:54 +01:00
Jaime Arteaga d46bb59508 Migrate shared-allocations made resident with makeMemoryResident
Shared-allocations are currently migrated to GPU by the page-fault
manager when calling executeCommandLists. Allocations to migrate are
taken from the lists container. However, if a shared-allocation
has been made resident with zeContextMakeMemoryResident(), it is not
added to the list container, and hence it is not migrated to device.

So, add a container of resident allocations to the driver and migrate
them along with the other allocations.

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-12-11 03:27:42 +01:00
Mateusz Hoppe d3f3730989 Refactor L0 core tests
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2020-12-09 17:51:15 +01:00
Jaime Arteaga beb3c5ed05 Add support for global work offset extension in L0
Add experimental extension to set global work offest in L0.
Current L0 specification does not have interface to export
experimental function symbols, so for now, applications need
to find the symbol like with dlsym on Linux.

A blackbox test showing functionality is also added.

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-12-09 07:33:40 +01:00
Zbigniew Zdanowicz 4602220e62 Add manager of imported host pointers
Related-To: NEO-5126

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2020-11-30 13:28:25 +01:00
Jaime Arteaga ba89a47aea Add L0 extension for extended module descriptor
Add ZE_experimental_module_program extension to L0 driver to support
multiple input modules being passed to zeModuleCreate().

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-11-26 22:44:22 +01:00
Mateusz Hoppe 8aacad1854 Create DebuggerL0 only when debugging is supported
Related-To: NEO-5239

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2020-11-23 18:28:45 +01:00
Jaime Arteaga 4432547ff5 Add support for importing memory handles through zeMemAllocDevice
Add support for passing ze_external_memory_import_fd_t extended
structure to zeMemAllocDevice() to allocate a device memory
out of an fd handle.

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-11-23 04:18:03 +01:00
Jaime Arteaga 97437830a7 Add support for exporting memory handles through getAllocProperties
Add support for passing ze_external_memory_export_fd_t extended
structure to zeMemGetAllocProperties() to retrieve an fd handle
for a device allocation.

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-11-20 00:28:15 +01:00
Jaime Arteaga 3f6d1f5ee9 Correctly pass descriptors to L0 shared alloc function
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-11-11 07:04:54 +01:00
Jaime Arteaga 9473abc86a Correctly pass descriptors to L0 device and host alloc functions
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-11-10 21:31:07 +01:00
Jaime Arteaga 6ab9e9f1e0 Initial support for getExternalMemoryProperties and getExtensionProperties
Change-Id: Ib7c75dcae10bfb34dd2f703e481ecdd768370772
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-11-03 16:05:25 -08:00
Jitendra Sharma 6cce17e9a0 Add boiler plate support for sysman event API
Change-Id: I046620abb9943b2283215a5d2d85d71dcb8b98be
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2020-10-21 10:20:00 +05:30
Bill Jordan 909107cab6 Fix zesDeviceReset for Spec version 1.
This patch does the following:
- Fixes a bug in FsAccess::listDirectory that could return
ZE_RESULT_UNKNOWN_ERROR when no error has occurred.
- Fixes a bug in zesDeviceReset that would reset the device
if force was set to false, even if the device was in use.
- Fixes a bug in zesDeviceReset that would reset the device
if force was set to false without closing the file descriptor.
- Added a releaseResources method method to Device object.
This method does the same thing as the DeviceImp
destructor except it does not free the DeviceImp object
and it does not free the SysmanDeviceImp object.
- Added the releaseResources methods to Mock<Device> object.
- Moved the reset of the debugger out of DriverHandleImp
destructor and into DeviceImp releaseResources.
- Added a releaseEngine method to the EngineHandleContext. This
method frees all the Engine handles.
- On reset, I call the Devcie->releaseResources and
EngineHandleContext->releaseEngines before resetting the device.
- Added a -r (--reset) option to zello_sysman so I
could easily test resets.

With these patches, the L0 Sysman CTS for zesDeviceReset
both pass.

Change-Id: I31fad1b27bc5cc6befe31cd6f9319748e2683424
2020-10-05 19:55:14 +02:00
Jaime Arteaga a28e883691 Set UUID in driver properties
Change-Id: If0ce1e426f7021374a7ae8779f47d531f031be5b
Signed-off: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-09-15 11:42:45 +02:00
Jaime Arteaga 57e462d8ee Remove legacy affinity mask format
Change-Id: I17e9ad131c888bdaceb7d14dd7b5aa9b5aec14d7
Signed-off: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-09-15 11:42:04 +02:00
Matias A. Cabral 237e2fe61f Cleanup Sysman initialization
Change-Id: Idc1e13e1b1fd3928674d5f199665054dbab27a9b
Signed-off-by: Matias A. Cabral <matias.a.cabral@intel.com>
2020-08-06 06:28:21 +02:00
Jaime Arteaga fa8e39fe16 Correct new metrics env vars names
Change-Id: Id496a57076d82aad17c7fe5c757c9910a8ab2c76
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-08-05 18:44:55 +02:00
Jaime Arteaga ef791755e7 Remove unneeded include directives
Change-Id: I19e27b172c4187d9f22071fcfb3e62a150ff4b3a
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-08-03 21:59:55 +02:00
Jaime Arteaga 902fc2f6c4 level-zero v1.0 (2/N)
Change-Id: I1419231a721fab210e166d26a264cae04d661dcd
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
Signed-off-by: macabral <matias.a.cabral@intel.com>
Signed-off-by: davidoli <david.olien@intel.com>
Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@intel.com>
Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
Signed-off-by: Latif, Raiyan <raiyan.latif@intel.com>
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2020-08-03 13:11:13 +02:00
davidoli b4577ade07 Move Pin init from zetInit to zeInit
Change-Id: Iea704cda26916315343e3cef6840954ba3d62c06
Signed-off-by: davidoli <david.olien@intel.com>
2020-07-31 00:49:33 +02:00
Jaime Arteaga 72080bbf12 Add support for new affinity mask format (2)
Change-Id: I8a1d277ff86b0fbdcde96d4d02d6a235a56e197b
Signed-off: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-07-28 23:24:09 +02:00
Robert Krzemien d76515a18d Metric Api: Moved the initialization to zeInit
Change-Id: Ia390389e514facb3d81cc28d97bf017367e9f728
Signed-off-by: Robert Krzemien <robert.krzemien@intel.com>
2020-07-27 21:41:24 +02:00
Jaime Arteaga ba84d2376e Add support for new affinity mask format
Change-Id: I050d15721d2df74f6927ac9fa7daf834c4208d0a
Signed-off: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-07-27 11:10:45 +02:00
Jaime Arteaga 9537119472 Context implementation (1/N)
Change-Id: I3e0b3c3fdb7c9ab9ac10fccd3d61c7b394dbeee7
Signed-off: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-07-22 08:57:23 -07:00
Jaime Arteaga 3ab2e6c0cd Add stub for zeDriverGetExtensionProperties
Change-Id: I25016bb36a5ccd37e147cbc4cdb9f1d5e14ae03e
Signed-off: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-07-16 14:19:25 -07:00
Mateusz Hoppe 073a40c14c Move reading env vars to DriverImp
- add requirePerContextMemorySpace flag to ExecEnv

Related-To: NEO-4637

Change-Id: I3968bedd9cfd1b1e41e79b63939b7a9bf25e7ff5
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2020-07-14 19:51:41 +02:00
davidoli f70882c684 Move tracing files to experimental directories
Remove need for zetInit call for tracing

Change-Id: Icbb75d8f52e2f9107e5308fd0c99415ea1e227f6
Signed-off-by: davidoli <david.olien@intel.com>
2020-07-14 00:31:22 +02:00
Mateusz Jablonski 93c1e1b976 Add MultiGraphicsAllocation to USM
Related-To: NEO-4672
Change-Id: I53ea4bea73ae6d52840146f63bc561bb90f9fe62
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-07-02 09:39:21 +02:00
Spruit, Neil R e1d9f92b94 Fixed Global Driver to be void * with library unload driver cleanup
- Changed Global Driver to be a void * to avoid auto add of Global
Driver Destructor to run before destruction of other L0 data structures
that might be enqueued to destory in static object destructors.
- Added register of library unload driverdestructor to cleanup
driver/device as the last destructor run.

Change-Id: I8ba6c5c27424b942a86a2613edd52fc682ab1c64
Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
2020-06-22 12:59:03 +02:00
Mateusz Hoppe 68847ef942 Create L0 debugger object
Related-To: NEO-4713

Change-Id: I9d10019bbe6e8514ce10bdd729a64ea233bf91b0
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2020-06-19 15:46:52 +02:00
Mateusz Hoppe de2cce1238 Allocate debugSurface per RootDevice
subdevices should use RootDevice's debugSurface Allocation

Change-Id: I83a725ab574e33dc045f0a25715de682d1dc5efc
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2020-06-17 07:14:28 +02:00
Jaime Arteaga 775ce2cbee Expose devices according to ZE_AFFINITY_MASK (2)
Read the env var in hexadecimal format, as spec defines it,
and allow for empty string to be the same as default value.

Change-Id: I201c81733ac3d55a5c9ba50b42e28a8cf3414a6d
Signed-off: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-06-10 10:28:48 -07:00
Mateusz Hoppe d55a0ae5c6 Detect enable program debugging env variable
Resolves: NEO-4713

Change-Id: Id9ce30b84943c4b364f7756a430d58df2614a28b
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2020-06-09 15:23:20 +02:00
Jaime Arteaga 390ec9fd71 Return ZE_MEMORY_TYPE_UNKNOWN for non-runtime allocated pointers
This aligns more to spec definition

Change-Id: I3f6aaf50945ef82fa5ffe8f400972e944ad03e2b
Signed-off: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-06-01 09:45:07 +02:00
Mateusz Jablonski 91dc953e1c Add virtual destructor to L0::Driver
Change-Id: Iaeebe3e45a172daa028111f6dd1d741ca6a24969
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-05-29 14:59:42 +02:00
Jaime Arteaga 8ce44b0689 Expose devices according to ZE_AFFINITY_MASK
Change-Id: Ic8025a818b006c25f790688ef51bda6eeb4f03ad
Signed-off: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-05-19 19:35:46 +02:00
Vinod Tipparaju c98949fd37 Fix thread safety violations within runtime allocators
Change-Id: I925d15429de314e3d3287f41a054732181911851
Signed-off-by: Vinod Tipparaju <vinod.tipparaju@intel.com>
2020-05-14 16:27:55 +02:00
Jaime Arteaga 0c1282ab82 Add levelZeroSupported field to RuntimeCapabilityTable
So initialization fails gracefully when Level Zero is
executed in unsupported platforms.

Change-Id: I06bd9f00260ebb1266108bd4ccee7abbc9275200
Signed-off: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-05-06 07:59:46 +02:00
Jaime Arteaga a6a8a69f4c Return build number in Level Zero driverVersion
Change-Id: I5c1790b291fe536801bfe4aa5f9ac9b7ed230f66
Signed-off: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-05-05 10:04:25 +02:00
Jim Snow 2dbffe8b64 Allow zeEventPoolCreate with no device
We use the first device associated with the driver when no device
is explicitly provided.

Event pools are no longer created via a device method.

Change-Id: Ib16dc79be3ceb1f822c7c1dace7264a0052a6593
Signed-off-by: Jim Snow <jim.m.snow@intel.com>
2020-04-24 00:55:32 +02:00
Jim Snow b58371df4e Return device in zeDriverGetMemAllocProperties
Change-Id: Idc616fff41375a17fac04e5b036def9445d8bcfe
Signed-off-by: Jim Snow <jim.m.snow@intel.com>
2020-04-16 14:53:24 -07:00
chmielew 62ef24c52a getExtensionFunctionAddress - use lookup map
Change-Id: I8fac8d65da12a2703129419d87ad6592260dce5a
2020-04-02 14:44:49 +02:00
Mateusz Jablonski c294747979 Move methods from DriverHandle to Device
allocateMemoryFromHostPtr
allocateManagedMemoryFromHostPtr

add mock driver handle

Related-To: NEO-3691
Change-Id: Iee8a167e248871b3b5fc495bd79b3b5654fb1bbc
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-04-01 20:37:43 +02:00
Jaime Arteaga d96e462754 Reorganize Level Zero Core API files
Change-Id: I95750b90748dd65310fa72b030ea3ab2f72d3f24
Signed-off: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-03-25 11:21:43 +01:00