When reusing memory chunks from the usm allocation pool,
they may contain stale data from previous executions.
This commit ensures that pooled allocations are
properly zero-initialized before use by:
- Transferring init data using transferMemoryToAllocation (unchanged)
- Zero-initializing the BSS section via memsetAllocation when present
- Zero-initializing entire totalSize for BSS-only allocations
This prevents stale data from affecting program execution when
chunks are reused from the pool.
HSD-13013893112, HSD-18043476772,
HSD-18043481899, HSD-18043487849,
HSD-18043489182
Related-To: NEO-12287
Signed-off-by: Fabian Zwoliński <fabian.zwolinski@intel.com>
This is prep work for the future implementation of pooling these allocations.
Related-To: NEO-12287
Signed-off-by: Fabian Zwoliński <fabian.zwolinski@intel.com>
When is2MBLocalMemAlignmentEnabled returns true,
increase pool size for builtins from 64k to 2MB.
Additionally, set appropriate alignment for kernel ISA heap allocations.
Additionally, configure isaAllocationPageSize based on productHelper
Related-To: NEO-12287
Signed-off-by: Fabian Zwoliński <fabian.zwolinski@intel.com>
- split the allocation code from command list or kernel
- allow to call allocation code in all parts of the driver
Related-To: NEO-13350
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
Add a constant to describe minimal size of SyncBuffer object.
Related-To: HSD-18039952263, HSD-18039940553, HSD-18039937640
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
Don't know if kernels will be initialized in the order needed to check
for indirect accesses in stack calls.
Remove now unused functionPointerWithIndirectAccessExists and reading
this value from zebin.
Related-To: NEO-12235
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
Do not put into usm reuse if is internal.
Set new isInternalAllocation flag for globals allocations.
Use actual size on device for tracking memory usage.
Related-To: NEO-6893
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
Do not put into usm reuse if is internal.
Set new isInternalAllocation flag for globals allocations.
Use actual size on device for tracking memory usage.
Related-To: NEO-6893
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
Allocating global surface is expecting that the usm allocation is zeroed
out. Reusing allocations can be filled with junk data and this caused
errors.
Resolves: HSD-18038551036, HSD-18038551766, HSD-18038551957, HSD-18038552252
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
Read indirect_stateless_count in module external functions.
If greater than 0, mark all kernels that have the has_stack_calls flag
set from this module as having indirect accesses.
Related-To: NEO-7712
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
Read indirect detection version intel compat notes from zebin.
This is to prepare for enabling indirect access optimization in AOT
built kernels.
Related-To: NEO-7712
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
- assert buffer has header that needs to be accounted for while parsing
the buffer and reading format strings. currentOffset in Printf Formatter
must not exceed size in header. The offset is relative to the beginning
of buffer, not the "begin" field in header
Resolves: NEO-8237
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>