In active wait mode use signals without interrupts by default and switch
to the interrupts only if a callback is required.
Change-Id: Ibcde8f7d44c70f8fb8fa5e0a7fdd8b08a2982a8e
[ROCm/clr commit: f4b9d3b7bd]
Only when memory type is Local and the invisible memory is +ve
Should also fix SWDEV-490991
Change-Id: I78a4925a234ba90c63909bde5b7dc217568b4de3
[ROCm/clr commit: 7d763fb803]
On Windows, hipHostRegister may add a single object in the MemObjMap
that maps to memory that is allocated on different devices.
This change ensures that the offset that is returned from
getMemoryObject() is computed relative to the memory that is allocated
on the current device.
Change-Id: I5fd3af200bf6f4926fdeaea12dcb9d0154d3a843
[ROCm/clr commit: e80442fdbf]
- Header files inside rocclr/utils when included from hipamd or opencl should be included as #include "rocclr/utils/xxx.h" instead of "utils/xxx.h"
Change-Id: Ic0760c33b9d091f5620dec67e5482c9698d22093
[ROCm/clr commit: 78f62d3230]
Some functions were __device__ only, but should be __host__ and
__device__, changed them to __HOST_DEVICE__.
Some functions were __HOST_DEVICE__ but were using ockl functions,
changed them to __device__ only.
Change-Id: Ife9e7abe60415bda68f5f9a101e6e7c39ad51064
[ROCm/clr commit: 5122b8c999]
The hipGraph will use VMM by default when allocating memory.
However, the handle of Phy mem has been added to Memobj by default.
Since the Memobj will track the whole address range from handle to
handle + size, this needs the system to reserve the whole address
range. If the system range have not reserved by the system, then it
will have the potential issue that clr finds the Memobj incorrectly.
This patch removes the handle from the Memobj to fix this potential
issue.
Change-Id: I2da38e6b2d11d0d48e1afe66c46899500c290624
[ROCm/clr commit: 231b2410a0]
- Refactor blit code and clean ASAN instrumentation
- Use unified function for rocr copy
- Enable shader copy path for unpinned writeBuffer/readBuffer paths
- Set GPU_FORCE_BLIT_COPY_SIZE=16 which means we will use BLIT copy for
pinned copies or unpinned H2D/D2H copies < 16KB
Change-Id: I42045cca79234b340dbf53dafb93044199736ae4
[ROCm/clr commit: 7863eb92dc]
Shared mutex allows to have access to the list of streams from
multiple threads at the same time.
Change-Id: Ibee64b846cde03321d5b17dbee2829c0bab7e7d6
[ROCm/clr commit: efd3ea4b30]
The early return if the thread is not alive causes memory leaks.
Neither doorbell_ or urilocator are released if the thread is not alive.
This change alters the logic so regardless of the thread status the
HostcallListener releases its memory.
Change-Id: Ie912360ec0e2ee257de9937b1a8d7375e6aebd83
[ROCm/clr commit: f0063ba8da]
This change replaces some asserts, that were only available in debug
mode, with standard error handling.
Signed-off-by: Sebastian Luzynski <Sebastian.Luzynski@amd.com>
Change-Id: I112f9e56f921abd72daf0d11e4ecdcb7b1a9f9e6
[ROCm/clr commit: 019abdc3bd]
This PR adds the initialization and release of initial_heap_buffer_
to prevent memory leaks.
Change-Id: I4ab8721b439a1a3a6f6e53d63d870e572f7c984a
[ROCm/clr commit: f42a87dc2f]
=> If null stream is not created during sync skip nullstrm creation
=> Do cpu wait on blocking & null stream if it exists
Change-Id: I90d6ced6a2dd1782ba58f3fed4e3608fc0efa55a
[ROCm/clr commit: 17e7b7c2ef]
hipMallocAsync/hipFreeAsync APIs should return error stating
operation is not supported, if a stream is actively capturing
and is different from the passed stream
Change-Id: I2a1b8260c5eb22d99a936ac529d6788a83f81a17
[ROCm/clr commit: 70b20857e9]
1) for case where kernelParam_.func = nullptr, the validation
fails in setParam call and memory is not alloced for kernelParams
2) destructor path segfaults trying to free the kernelParams memory.
3) copy of params is done after function validation is successful.
Change-Id: I6338e0c89f259632e4115f0508e2f240bc207fd9
[ROCm/clr commit: 1ac9286b5a]
hsa_amd_profiling_async_copy_enable is taking 45us for the first call. Disable sdma profiling for enqueuing captured kernel packets and for accumulate command.
Change-Id: I80b51a58c46bccc9c1025e9331515f57c97b5a2a
[ROCm/clr commit: 9820480cbd]
Hence, It is not required to check it if thread is already finished processing packets.
Change-Id: If1b43a169a06203f3e1ab0529cf592879496d7c4
[ROCm/clr commit: 3f3f3d0f1c]
This reverts commit 84fb57e7f9.
Reason for revert: Even though this change is valid, this would break backward compatibility.
Change-Id: I9c7cab83198c8d5c8485b11194099162e3e7a874
[ROCm/clr commit: ec6f83b544]
Currently amd::Monitor can work in FILO mode for the active waits
and cause a delay in wakeup of some threads. That may have a problem
with the current sysmem pool design.
Change-Id: I145081478d1e0b282d8838855c5718f09cf54b69
[ROCm/clr commit: 9473f143c2]
Support zero width and height for hipTextObjectCreate to align
with cuda.
Change-Id: I5d4c48625faf5f060ed2a7e634ec65e4ecac9da5
[ROCm/clr commit: efce2f77c4]
1) For Dynamic CO variables, free the device pointer in
DynCO destructor instead of DeviceVar destructor.
2) For Static CO Remove Fatbinary,
only call hipFree for valid device Vars instead of all devices.
Change-Id: I84291f5371b2c05d1d0bcdb4f9c6bd122e7c9b21
[ROCm/clr commit: a2d8199402]
Runtime may use checkGpuTime() for the wait and not just for the GPU time queries. Hence, the call can't be skipped if profiling isn't enabled.
More changes are required for this optimization.
Change-Id: I79e8918312e755d75f0d26685f2fdc604a8ffb18
[ROCm/clr commit: e2eeb20c00]
Modified hipFuncSetAttribute to handle pointers to dynamic functions
returned by hipModuleGetFunction.
Change-Id: I54b98f9d31a79630dd7edcd363fad81f1d89219b
[ROCm/clr commit: 1a710dabcf]
- Remove binning logic, although useful it doesnt work in current
scenario as there is no upper limit on the size of allocation. If an
app or framework uses entire VRAM and then creates suballocs, binning
would result in failure.
Change-Id: Icc27c13e433bb4a1f03e82028d8718488b43bfa5
[ROCm/clr commit: e4d29e228d]