Commit Graph

142 Commits

Author SHA1 Message Date
Mateusz Jablonski 27fbdde4c5 refactor: correct naming of unified memory enums
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-12-13 15:58:21 +01:00
Lu, Wenbin 67fa39c9a1 fix: get right page size when malloc uses 0 alignment
Related-To: GSD-7103

Signed-off-by: Lu, Wenbin <wenbin.lu@intel.com>
2023-12-13 15:00:56 +01:00
Dominik Dabek 2146cd07ee refactor: SortedVectorBasedAllocationTracker
Move code out to base class. This will allow to use the sorted vector
class with different values than only SvmData.

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2023-12-13 12:47:04 +01:00
Mateusz Jablonski b182917d9d refactor: correct naming of allocation types
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-12-11 16:23:37 +01:00
Mateusz Jablonski c9664e6bad refactor: rename global debug manager to debugManager
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-11-30 13:00:59 +01:00
Lukasz Jobczyk ac8c00048e performance: optimize svm allocation tracking
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2023-11-23 10:54:01 +01:00
Compute-Runtime-Validation 7f61217a44 Revert "performance: optimize svm allocation tracking"
This reverts commit e91ce78ec8.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-11-16 11:03:19 +01:00
Lukasz Jobczyk e91ce78ec8 performance: optimize svm allocation tracking
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2023-11-15 13:58:05 +01:00
Lukasz Jobczyk 9a8138725a fix: Deferred SVM allocations look up by gpu address
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2023-11-14 15:27:01 +01:00
John Falkowski f156a74f54 fix: split chunking prefetch flags
Related-To: NEO-9120

Signed-off-by: John Falkowski <john.falkowski@intel.com>
2023-10-18 19:20:42 +02:00
Mateusz Jablonski fc508212de refactor: pass big parameters as reference instead of by value
Related-To: NEO-9038
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-10-04 14:53:13 +02:00
John Falkowski 2403212dcd fix: chunking prefetch add USER_FENCE
Add USER_FENCE before PREFETCH call and after the BIND

Related-To: NEO-8098

Signed-off by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
Signed-off-by: John Falkowski <john.falkowski@intel.com>
2023-08-17 21:32:47 +02:00
Lukasz Jobczyk 3ab72e7d79 fix: Align svm cpu to alignment passed to properties
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2023-08-11 14:57:49 +02:00
Compute-Runtime-Validation 820e94e89c Revert "fix: Align svm cpu to alignment passed to properties"
This reverts commit d66da494d4.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-08-11 07:14:30 +02:00
Lukasz Jobczyk d66da494d4 fix: Align svm cpu to alignment passed to properties
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2023-08-09 11:52:21 +02:00
Milczarek, Slawomir 1195578d96 fix: KW issue with dereference in function call that may return null
Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2023-07-27 07:39:15 +02:00
Lu, Wenbin 4de792cee0 fix: support alignments in host and shared UnifiedMemoryAllocation
Related-To: LOCI-4334

Signed-off-by: Lu, Wenbin <wenbin.lu@intel.com>
2023-07-13 08:48:41 +02:00
Compute-Runtime-Validation 02436b8877 Revert "fix: support alignments in host and shared UnifiedMemoryAllocation"
This reverts commit c11809e002.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-06-14 06:32:40 +02:00
Jitendra Sharma 38415162c5 fix: While creating shared memory use given device
When creating shared USM, currently default root device index
is used when accessing memoryManager.
This change fixes this issue, by using device provided by caller.
In case device is not provided, then default root device index
could be used.

Related-To: LOCI-4474

Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2023-06-13 15:44:14 +02:00
Lu, Wenbin c11809e002 fix: support alignments in host and shared UnifiedMemoryAllocation
Related-To: LOCI-4334

Signed-off-by: Lu, Wenbin <wenbin.lu@intel.com>
2023-06-13 10:01:11 +02:00
Neil R Spruit ded9d7bff2 feature: Get Peer Allocation with specified base Pointer
Related-To: LOCI-4176

- Given a Base Pointer passed into Get Peer Allocation, then the base
pointer is used in the map of the new allocation to the virtual memory.
- Enables users to use the same pointer for all devices in Peer To Peer.
- Currently unsupported on reserved memory due to mapped and exec
resiedency of Virtual addresses.

Signed-off-by: Neil R Spruit <neil.r.spruit@intel.com>
2023-05-24 20:41:20 +02:00
Compute-Runtime-Validation b2b41e613b Revert "fix: add alignment support to host and shared UnifiedMemoryAllocation"
This reverts commit c3df92ac41.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-05-12 13:04:08 +02:00
Lu, Wenbin c3df92ac41 fix: add alignment support to host and shared UnifiedMemoryAllocation
Related-To: LOCI-4334

Signed-off-by: Lu, Wenbin <wenbin.lu@intel.com>
2023-05-11 11:45:12 +02:00
Lu, Wenbin 5d653c8536 fix: Add alignment support to createUnifiedMemoryAllocation
Allows the user to use alignments > 64KB in `createUnifiedMemoryAllocation`

So that the restriction in `piextUSMDeviceAlloc` of the DPC++ runtime
could be lifted

Related-To: LOCI-4168

Signed-off-by: Lu, Wenbin <wenbin.lu@intel.com>
2023-05-02 09:19:23 +02:00
Fabian Zwolinski cbce863dc2 refactor: Rename member variables to camelCase 3/n
Additionally enable clang-tidy check for member variables

Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2023-04-28 16:01:14 +02:00
Milczarek, Slawomir 01d03aa5b6 Extended regkey to force prefetch of shared memory in enqueue commands
Extended the regkey ForceMemoryPrefetchForKmdMigratedSharedAllocations
to force meory prefetch of kmd-migrated shared allocation
in clEnqueueNDRangeKernel(), clEnqueueMemFillINTEL, ...

Related-To: NEO-7841

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2023-04-11 11:23:48 +02:00
Dominik Dabek 1c52017ceb fix: use correct allocation type in program init
Globals surface allocation via USM manager will have correct allocation
type set (instead of just BUFFER) and will use cpu copy when possible.

Related-To: NEO-7796

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2023-04-04 11:31:11 +02:00
Compute-Runtime-Validation 2b93126795 Revert "Add alignment support to createUnifiedMemoryAllocation"
This reverts commit ca02bbba4b.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-03-30 15:43:47 +02:00
Mateusz Jablonski 8119905325 fix usm shared: propagate resource48Bit when allocating with kmd migrations
Related-To: NEO-7665
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-03-30 13:00:40 +02:00
Lu, Wenbin ca02bbba4b Add alignment support to createUnifiedMemoryAllocation
Allows the user to use alignments > 64KB in `createUnifiedMemoryAllocation`

So that the restriction in `piextUSMDeviceAlloc` of the DPC++ runtime
could be lifted

Related-To: LOCI-4168

Signed-off-by: Lu, Wenbin <wenbin.lu@intel.com>
2023-03-28 10:57:04 +02:00
Kamil Kopryk fa8579602f refactor: rename product helper files n/n
Related-To: NEO-7703
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-03-10 13:24:38 +01:00
Mateusz Jablonski 8194543ae5 refactor raytracing: unify RT programming logic
reuse EncodeEnableRayTracing in CommandStreamReceiver
add method to determine need for 48b resource flag for RT allocations
Related-To: NEO-7606

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-03-07 11:51:58 +01:00
Wrobel, Patryk d8a65c6958 Try to use provided pointer when dual storage shared memory is not supported
If user provided not-null hostptr field, then the driver
should try to use it. This change adds omitted functionality,
which handles the described case also in createUnifiedMemoryAllocation().

Related-To: NEO-7600
Signed-off-by: Wrobel, Patryk <patryk.wrobel@intel.com>
2023-02-21 09:08:11 +01:00
Michal Mrozek 2f847aa7bb Optimize zeMemGetAllocProperties.
- No functional changes only performance optimizations.
- add const modifiers
- add early returns
- remove not needed code
- do fast lookup for aligned pointers
- fix incorrect tests

+21% improvement in
./api_overhead_benchmark_l0 --test=GetMemoryProperties
--api=l0 --AmountOfUsmAllocations=100 --iterations=1000
+32% improvement in
./api_overhead_benchmark_l0 --test=GetMemoryProperties
--api=l0 --AmountOfUsmAllocations=1000 --iterations=1000

Related-To: NEO-7676

Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
2023-01-30 18:00:57 +01:00
John Falkowski 01017a5df3 L0: add support for deferred memory free as per ContextImp::freeMemExt
Signed-off-by: John Falkowski <john.falkowski@intel.com>
2023-01-12 21:05:02 +01:00
Warchulski, Jaroslaw 191d4de033 Cleanup includes 28
Cleaned up files:
opencl/source/command_queue/command_queue.h
opencl/source/command_queue/gpgpu_walker.h
shared/source/helpers/memory_properties_helpers.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-11 17:47:33 +01:00
Warchulski, Jaroslaw 4794648978 Cleanup includes 26
Cleaned up files:
opencl/source/command_queue/csr_selection_args.h
opencl/source/event/event.h
shared/source/helpers/engine_control.h
shared/source/sku_info/definitions/sku_info.h

Related-To: NEO-5548

Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-11 09:10:45 +01:00
Kamil Kopryk 0dbf92d401 Refactor: reduce global productHelper getter usage
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-01-04 16:35:20 +01:00
Warchulski, Jaroslaw 0eac749fcc Cleanup includes 19
Cleaned up files:
opencl/source/api/cl_types.h
shared/source/compiler_interface/external_functions.h
shared/source/compiler_interface/linker.h
shared/source/device_binary_format/elf/elf.h
shared/source/helpers/preamble.h
shared/source/memory_manager/definitions/storage_info.h
shared/source/memory_manager/memory_manager.h
shared/source/memory_manager/os_agnostic_memory_manager.h
shared/source/program/program_info.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-03 11:02:05 +01:00
Warchulski, Jaroslaw 9f3fc6858e Cleanup includes 16
Cleaned up files:
shared/source/built_ins/built_ins.h
shared/source/command_container/command_encoder.h
shared/source/helpers/hw_helper.h
shared/source/memory_manager/allocation_properties.h
shared/source/xe_hpc_core/hw_cmds.h
shared/test/common/test_macros/test_excludes.h

Related-To: NEO-5548

Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-12-29 15:12:37 +01:00
Warchulski, Jaroslaw f275eea6ec Cleanup includes 14
Cleaned up files:
shared/source/device/device.h

Related-To: NEO-5548

Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-12-23 10:46:34 +01:00
Compute-Runtime-Validation 429755e0f4 Revert "Check for context in appendMemoryCopy"
This reverts commit 32bab85f7e.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-12-21 05:38:37 +01:00
Jaime Arteaga 32bab85f7e Check for context in appendMemoryCopy
Confirm the allocations used in an appendMemoryCopy operation
belong to the same context as the list.

Related-To: LOCI-1996
Resolves: NEO-6162

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2022-12-20 00:13:36 +01:00
Kamil Diedrich b36aa626bc Add support for USM shared in WSL for dGPU
This patch force KMD allocation path for USM shared
Additionally we force 64kb page from lock which is
required to properly program GPU VA

Related-To: NEO-6913
Signed-off-by: Kamil Diedrich kamil.diedrich@intel.com
2022-12-19 11:09:55 +01:00
Compute-Runtime-Validation 5a29cf8508 Revert "Check for context in appendMemoryCopy"
This reverts commit afd0784c16.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-12-16 03:28:06 +01:00
Jaime Arteaga afd0784c16 Check for context in appendMemoryCopy
Confirm the allocations used in an appendMemoryCopy operation
belong to the same context as the list.

Related-To: LOCI-1996
Resolves: NEO-6162

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2022-12-15 23:42:10 +01:00
Kamil Kopryk 232b886056 Rename HwInfoConfig to ProductHelper
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-12-14 14:39:52 +01:00
Compute-Runtime-Validation c54c3d796c Revert "Set isLockable if size small enough for cpu memcpy"
This reverts commit 41a80072b9.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-12-12 09:24:14 +01:00
Szymon Morek 41a80072b9 Set isLockable if size small enough for cpu memcpy
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-12-09 16:33:32 +01:00
Slawomir Milczarek 5c1b50bccf Add memory prefetch modes for single and multiple subdevices
Single-subdevice prefetch for cmd list copy-only (with bcs) and acc mode.
Multi-subdevice prefetch (default) for shared allocation with multiple BOs.

Related-To: NEO-6740

Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
2022-12-07 15:25:32 +01:00