Commit Graph

105 Commits

Author SHA1 Message Date
Mrozek, Michal 8d2df3c332 Move indirect heaps from command queues to csr.
-This is required to enable N:1 submission model.
-If heaps are coming from different command queues that always
mean that STATE_BASE_ADDRESS needs to be reloaded
-In order to not emit any non pipelined state in CSR, this change
moves the ownership of IndirectHeap to one centralized place which is
CommandStreamReceiver
-This way when there are submissions from multiple command queues then
they reuse the same heaps, therefore preventing SBA reload

Change-Id: I5caf5dc5cb05d7a2d8766883d9bc51c29062e980
2018-04-26 14:05:40 +02:00
Pawel Wilma a0c044e6d2 Extend batch buffer flattening in AubCSR to BatchedDispatch mode
- batch buffer flatening in batched mode
    - added MI_USER_INTERRUPT command
    - added GUC Work Queue Item

Change-Id: I35142da34b30d3006bb4ffc1521db7f6ebe68ebc
2018-04-26 12:45:02 +02:00
Artur Harasimiuk 5fbdad88c6 refactor config.h usage
- add defines to command line
- remove most occurences of include "config.h"

Change-Id: I19d65d83c895fc6143d319d057a50e5ae3e78830
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-04-26 10:02:15 +02:00
Dunajski, Bartosz 1d36206bb7 Remove obsolete methods form LinearStream
Change-Id: Id87dd58d9a373cf5d3f217e9ecc8db8a79b25190
2018-04-25 11:40:47 +02:00
Mrozek, Michal ce8c44cae3 Add check for local work group size in clEnqueueNDRangeKernel call.
- Incoming local work group size cannot exceed device capabilities.

Change-Id: I89a7503155c71443e3ebc630debb5d5b466c6cb5
2018-04-20 08:16:16 +02:00
Hoppe, Mateusz 83160213f0 Fix problems in thkWrapper and SharingHandler
- ThkWrapper had uninitialized mFunc member, setting it
to nullptr

- D3DSurface could dereference null image pointer,
adding validateUpdateData method in SharingHandler
that may return CL_INVALID_MEM_OBJECT if memObject is invalid

Change-Id: Iaa4499bcea47baca156c9d28be4c93ba4f0e1ebb
2018-04-19 15:04:38 +02:00
Artur Harasimiuk 75d497a9a9 separate BuiltinDispatchInfoBuilder from built_ins.h
We don't need BuiltinDispatchInfoBuilder in every place where built ins
are used. specifically in .cpp files generated from kernel binary.

Change-Id: Ie739951cdc93873993f78ad14cee656122af51fd
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-04-19 12:32:13 +02:00
Mrozek, Michal d900bdffc6 [33/n] Internal 4GB allocator.
- Move indirect heap to internal allocator domain.
- Add logic in getIndirectHeap to allocate with proper API depending on
heap type
- Add State base Address programming, reflecting that now Indirect Object
Heap is placed in 4GB domain.
- For AddPatchInfoCommentsForAUBDump mode , keep all heaps in non 4GB mode.

Change-Id: I6862f6a249e444d0d6cfe7e499a10d43f284553e
2018-04-19 08:13:48 +02:00
Mrozek, Michal 59df78cc18 [32/n] Internal 4GB allacator.
- Ensure that heaps passed as IndirectHeap to flushTask

Change-Id: Ib633e3d3027e142a1fdb51e78b970fb1bd1b9b0c
2018-04-18 08:49:08 +02:00
Artur Harasimiuk b42e19110b more ULTs cleanup
- removing not used BuiltInsFixture

Change-Id: Iba35db629d155522070a143da26ee2ac44fc9568
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-04-17 10:25:12 +02:00
Mrozek, Michal 87b8b6e261 [28/n] Internal 4GB allocator.
Avoid default parameter to getIndirectHeap.

Change-Id: I105ceaa4b5e9b23ce8dc96631410b9535e5a44e0
2018-04-16 17:56:49 +02:00
Mrozek, Michal cb06fad983 [27/n] Internal 4GB allocator.
- Allow indirect heap to work in 2 modes:
first mode is when it will be used as an allocation from 4GB allocator.
In such scenario driver will return offset from base of the allocator region.
Second mode is the legacy mode which will be used by device enqueue, this
will results in heap CPU base address being programmed in State Base Address
commands and during programming heap offset base of 0 will be returned.

Change-Id: Ica098f3278b6b6ed5036b4c5ab7461dc61d8ee86
2018-04-16 16:45:30 +02:00
Artur Harasimiuk cb064abb04 fix mapImage for 1D_ARRAY
There are differences in qPitch programming between Gen8 vs Gen9+
devices and this requires special operation when image is zero-copy.

For Gen8 qPitch is distance in rows while Gen9+ it is in pixels.
Minimum value of qPitch is 4 and this causes slicePitch = 4*rowPitch on
Gen8.

To allow zero-copy we have to tell what is correct value rowPitch which
should equal to slicePitch.

Change-Id: I58dea004e3c7f9f4dfabd154d02749c15b6b0246
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-04-16 16:13:51 +02:00
mplewka 079f94cd2d Refactor ult for preemption enabling
Refactoring in ULTs around preemption:
    -refactoring ULTS to not fail with default preemption mode
    -fixing ULT memory leaks observed after enabling preemption
    -mocking getSipKernel in ULTs (to minimize ULT execution time)

Change-Id: I194b56173d7cb23aae94eeeca60051759c817e10
2018-04-16 12:55:30 +02:00
Artur Harasimiuk a129fc62ba enqueueMapImage tests cleanup
- remove unsused fixture BuiltIns fixture
- sort includes

Change-Id: Ieb09f4188eb1f250e30248c58db1f372a6ba5aaf
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-04-16 09:53:13 +02:00
Zdanowicz, Zbigniew e51cb6bd0b Separate struct EnqueueOperation declaration and implementation
Change-Id: I537660867a1c98f957280237c14b7a1554fce3db
2018-04-10 16:36:48 +02:00
Chodor, Jaroslaw 6bf4135def Fix for externally synchronized events
When inheriting task count from parent events,
don't take into account externally synchronized events

Change-Id: I52d861e482669a18e2aca499c813716bb4951b74
2018-04-09 12:12:58 +02:00
Mrozek, Michal ffa9b097f5 [26/n] Internal 4GB allocator.
- change the way we handle blocked commands.
- instead of allocating CPU pointer and populating it with commands, create
real IndirectHeap that may be later submitted to the GPU
- that removes a lot of copy operations that were happening on submit time
- for device enqueue, this requires dsh & shh to be passed directly to the
underlying commands, in that scenario device queue buffers are not used

Change-Id: I1124a8edbb46777ea7f7d3a5946f302e7fdf9665
2018-04-09 10:47:37 +02:00
Jacek Danecki d977d278b4 add tests for enqueue shared object with event
Change-Id: I5cc499fc85a1304ab6a46227f4045081a849eb1a
2018-04-06 14:30:39 +02:00
Chodor, Jaroslaw 0a97dfbb2f [1/n] Mipmap support
* adding support for map/unmap
* adding support for origin/region validation with mipmaps
* fixing slices returned in map/unmap
* removing ambiguity around mipLevel naming
* enabling cl_khr_mipmap_image in current shape
* enabling cl_khr_mipmap_image_writes in current shape

* fixing CompileProgramWithReraFlag test

Change-Id: I0c9d83028c5c376f638e45151755fd2c7d0fb0ab
2018-04-05 01:09:27 +02:00
Zdanowicz, Zbigniew b6b92ae808 Create GpgpuWalkerHelper class
Change-Id: Ia9aa7b816356aff57234b46ea3509b6bd9b7f14b
2018-04-04 16:42:16 +02:00
Milczarek, Slawomir b56289a507 User space AUBs capable of memory re-dumps on CPU-side memory modifications.
Any CPU related updates such as clEnqueueMapBuffer or similar
need to trigger a re-dump of memory prior to the next clEnqueue call.

Change-Id: I7b31e559278e92ff55b6ebab8ef4190caef1ebc0
2018-04-03 15:40:29 +02:00
Jacek Danecki e1697d7002 sharing: add missing tests
For image with defined sharingHandler test:
- enqueueAcquireSharedObjects
- enqueueReleaseSharedObjects

Change-Id: I8835e4a4aa06a08e57dc207b168810162e44445c
2018-04-03 13:55:29 +02:00
Mrozek, Michal e4c25f11de [25/n] Internal 4GB allocator.
- Do not obtain pattern allocation from reusable pool.
- This is due to the fact that it may contain allocations from internal
heap, which cannot be used for arguments declared as kernel argument.

Change-Id: I6c73445c409edc4ce25f8d8eba966f512dfd6cc9
2018-03-30 14:59:11 +02:00
Mrozek, Michal 5dc0a7c731 Remove default value for dispatchWalker parameter.
Change-Id: I0676a353a4364339664edc416e36da37a345a4f6
2018-03-30 12:57:42 +02:00
Mrozek, Michal de315db953 [24/n] Internal 4GB allocator.
- Refactor tests for better maintenance
- Remove duplicated code.

Change-Id: I154cad43610497d2e1cabf99217820735d3868cd
2018-03-30 09:12:08 +02:00
Artur Harasimiuk 0432d117ca ULTs cleanup
- removing more occurences of unused MemoryManagerFixture

Change-Id: I4d2d03536b26a54024e09877cf1bf48dcbf8559a
2018-03-30 08:53:35 +02:00
Artur Harasimiuk 7e6432a207 ULTs cleanup
- remove unused MemoryManagementFixture.
  MemoryLeaks are tracked using MemoryLeakListener no need to duplicate
  with Fixure.
  MMF should be used when you need to inject memory allocation failure

Change-Id: I95bcaa7051acf540c5b015c5489ed6a6fc38ee8e
2018-03-29 15:09:59 +02:00
Mrozek, Michal 7f3c4d3d70 [22/n] Internal 4GB allocator.
- Finalize Instruction Heap removal.

Change-Id: Idd7df94a228238a5157c3251180fc3c8d3a189df
2018-03-29 08:17:32 +02:00
Mrozek, Michal 2be5934096 [21/n] Remove Instruction Heap from enqueue path.
- This removes Instruction Heap allocation from enqueue path
- Blocked path is handled as well
- Heap is no longer allocated on demand it is bind to kernelInfo.

Change-Id: I54545beceed3404ee0330a8bac2b0934944cac30
2018-03-28 20:15:55 +02:00
Mrozek, Michal 9bdf01468e [20/n] Internal 4GB allocator.
- Switch to internal heap for kernel ISA allocations.
- remove IH from various functions
- remove IHState from CSR , IH is never dirty
- ISA is no longer copied on enqueue calls.

Change-Id: I0099cf2a9ebab6192ea03a74dd35f7da963fd5a5
2018-03-28 16:07:26 +02:00
Milczarek, Slawomir a02c3cb781 KM DAF AubCapture to recapture fill pattern allocations
The commit introduces a recapture of fill pattern allocations on every submit.

Change-Id: I634af075348dbc59c7809f58b8495326cab804e1
2018-03-27 16:38:41 +02:00
Milczarek, Slawomir 32825e203e KM DAF AubCapture to recapture command streams and heap allocations
This commit introduces a recapture of CS and Heap resources on every submit.

Change-Id: I2a5a763e8988de804da1a6c2c8042154b0786b2e
2018-03-26 18:27:20 +02:00
Hoppe, Mateusz 7f32eb06d1 Kernel Source Level debugger support 4/n
- adding DebugSurface allocation and setup
- unit tests refactors:
  - mock kernel with kernel debug option
  - separating fixtures to headers
  - added helper for getting internal-options kernels
    filenames

Change-Id: I7b6f4d46e2ab7cff0da8d5212483f44ae0d4be31
2018-03-26 15:02:42 +02:00
Pawel Wilma ff1d2361f3 Add patch info comments to AUB dump
Collect patching information and add as comments to AUB dump.

Change-Id: Ib7c903a2589d68b6e3e614c1774c7cd5a000c29f
2018-03-23 13:08:54 +01:00
Dunajski, Bartosz 9486dba6dd Kmd notify improvements [2/n]: Use QuickKmdSleep for sporadic waits
- Measure time between wait calls. If delay is exeeded  use QuickKmdSleep
- Kmd Notify helper functions
- Refactor overriding from debug variables
- Refactor Kmd Notify tests


Change-Id: I123c31f492d98fd304184f99ee0bf7d733d06f04
2018-03-22 17:09:16 +01:00
Mateusz Jablonski c0a8522eb1 Cmake refactor part 19
- create new object library igdrcl_libult_env
- move sources shared between igdrcl_tests, igdrcl_aub_tests and
  igdrcl_mt_tests to igdrcl_libult_env
- partially cleanup unit_tests/mt_tests/CMakeLists.txt

Change-Id: I4f4bbfa5649d84d79133b9d5c9bd137c68b7d82e
2018-03-22 16:30:15 +01:00
Dunajski, Bartosz 516082e7c5 Kmd notify improvements [1/n]: Quick KMD sleep optimization
- KmdNotifyProperties struct for CapabilityTable that can be extended by
  incoming KmdNotify related optimizations
- Quick KMD sleep optimization that is called from async events handler
- Optimization makes a taskCount check in busy loop with much smaller
  delay than basic version of KMD Notify optimization

Change-Id: I60c851c59895f0cf9de1e1f21e755a8b4c2fe900
2018-03-21 20:41:33 +01:00
Woloszyn, Wojciech ce2f1468b7 Implement cl_khr_mipmap_image [2/n]
- Add mipmap handling for clEnqueueCopyImage
- Add mipmap handling for clEnqueueCopyImageToBuffer
- Add mipmap handling for clEnqueueCopyBufferToImage
- Fix typos

Change-Id: Ie1a23b1699135afa17fe11bcba3c1e8bdf9a3dd9
2018-03-21 17:04:12 +01:00
Woloszyn, Wojciech 0ad81024b7 Implement cl_khr_mipmap_image [1/n]
- Add mipmap image handling for clEnqueueReadImage, clEnqueueWriteImage
- Fix mipmap image handling for clCreateImage

Change-Id: I42938a330b55c7e69a16c26dce3ab5d66f8a8938
2018-03-21 10:51:13 +01:00
Jobczyk, Lukasz 37443c19a2 Fix enqueueWriterImage and enqueueReadImage test
- set proper regions
- fix typos
- set proper expectations

Change-Id: I3d57cb7e3f9273fe7515f6bb7fb3beaa10e969eb
2018-03-20 15:59:33 +01:00
Jobczyk, Lukasz 2f8ff2b30e fix enqueueWriteImage tests:
- set proper regions
- fix typos
- set proper expectations

Change-Id: I5198a6e3c7acbc231a8f14ab400d8086fd9fcf1d
2018-03-19 10:48:51 +01:00
Mrozek, Michal 7644209288 Add debug flag to dump dispatch parameters.
- Also refactor debug manager tests , they now check for default value
in igdrcl.config file
- There is no need to write dedicated tests now , so I remove them.

Change-Id: Ib338ca05b6059302c29469c673239e7886dc4b9b
2018-03-16 11:13:35 +01:00
Dunajski, Bartosz c0d3eade30 Disable wait timeout when flushStamp is 0
Change-Id: I416ace1f8c1a3e5aa91d9bc2425a4faa77e2fbe7
2018-03-15 15:44:17 +01:00
Mrozek, Michal 93fc48339b [15/n] Internal 4GB allocator.
- Make resident on kernel ISA for blocked and non blocked path.

Change-Id: I1fc4948f1abb73c6f7028ae15dccad820101b8dc
2018-03-14 15:04:30 +01:00
Hoppe, Mateusz a1a20a3b34 Service read only memory passed as host_ptr
- read only memory cannot be used for allocation,
Oses cannot create graphics alocation for such memory
- if memory allocation fails for host_ptr passed
to enqueueWrite calls, then try doing new allocation
and copy host_ptr on cpu

Change-Id: I415a4673ae1319ea8f77e53bd8fba7489fe85218
2018-03-14 13:16:36 +01:00
Mrozek, Michal 8254d6a081 Ensure that submissions are flushed prior to csr destruction.
Change-Id: Ie04de561d3d295f40f55a19f01274d873d259abd
2018-03-12 12:54:47 +01:00
Dunajski, Bartosz 23c1c4fea6 clEnqueueMapImage origin and region usage fixes
- Return error on origin > 0 or region > 1 when its not allowed
- For 1Darray, array region and origin are stored on 2nd position.
  For 2Darray, its on 3rd postion
- Fix map offset for 1Darray image
- Fix CPU data transfer for 1Darray image

Change-Id: Id35ba5f54f117e7af318ca7e6e03c1fc942ce729
2018-03-08 08:54:48 +01:00
Dunajski, Bartosz 0659ee0896 Set valid origin on clEnqueueMapImage ULTs
Change-Id: I67853b7f7d7f7d4bc5475330715490e188a42b6d
2018-03-07 15:24:37 +01:00
Mateusz Jablonski 0afd7a9ec1 Cmake refactor part 8
igdrcl_tests: define sources in subdirectories A-C

Change-Id: Iad8e4e866c4b0b8ccf679313e46ef6f0e5deac50
2018-03-06 20:53:43 +01:00