Update HIP's unsafeAtomicAdd to:
- Compile properly even when not compiling for gfx90a
- Fall back to safe atomic add on non-gfx90a architectures
- use flat atomic add for FP64 on gfx90a, instead of dynamically
checking memory spaces.
In addition, when the compiler is passed -munsafe-fp-atomics, it
will define __AMDGCN_UNSAFE_FP_ATOMICS__. When this happens, the
compiler is requesting that the HIP headers force all HIP
atomicAdd() calls on floats or doubles to use their unsafe versions.
This patch thus causes unsafeAtomicAdd() calls when that define
is seen. This call to unsafeAtomicAdd() is also done for atomicSub(),
since that calls atomicAdd underneath. This is not done for
system-scope atomicAdd because, on gfx90a, system-scope atomic FP
add instructions would need to target fine-grained memory, which is
always unsafe.
This patch also creates safeAtomicAdd() functions for float and double.
These functions will create a standalone safe atomic, even when the
application is compiled with -munsafe-fp-atomics.
Finally, this patch adds wrappers in the Nvidia path of HIP so that
these HIP functions call through to atomicAdd there as well.
Change-Id: I8af0621d3d28ea30c9278bfeea7393d03bbdac6d
[ROCm/clr commit: f68149eafd]
- hipHostRegister should return hipErrorInvalidValue when size is 0 or
size doesn't match the actual allocated size
- hipMemAllocPitch should return hipErrorInvalidValue when width or height
is 0 and elementSizeBytes should be 4, 8 or 16
Change-Id: I43c9fe4ac1ef0a6ac2f953908d301508a7bc5aa3
[ROCm/clr commit: 06203c251e]
hipGraphExecMemcpyNodeSetParamsToSymbol, fix for functional cases
failing as well
Change-Id: I9f263778f6b24e3ec35a78231a17e01c0d44f23a
[ROCm/clr commit: 63f23ec2b0]
Using device write to set 0 to signal while streamWaitEvent is checking
the signal.
Use app in SWDEV-314307 to verify this fix
Requires vdi #668012 change to work
Change-Id: Ie329a29cfaeb5d144b92cda36773646f913ca73d
[ROCm/clr commit: 1abd0d6ecf]
- hipMemcpy[From/To]Symbol APIs to return hipErrorInvalidMemcpyDirection
if the copy kind is incorrect
- hipGetSymbolSize and hipGetSymbolAddress APIs to return hipErrorInvalidValue
if the pointer is null
Change-Id: I32f428045c804b1e4f648e91b507f749f60c09d0
[ROCm/clr commit: f1fb612774]
Use the original device from creation to sync before host memory
free.
Change-Id: I510e34afa7accf69e3d01338587bbc817b981cec
[ROCm/clr commit: b4c5a01fbc]
Some components like tensorflow search for the contents of hip_version.h
For backward compatibility insert actual file contents in wrapper file as non executable code
Improvements: wrapper header template file checked in, instead of generating it on runtime
Redundant codes for unsetting variables removed
Change-Id: I67ee48437f8959d8ed70946412d09be3ed262e58
[ROCm/clr commit: 95d0b79ca0]
Add lock protection for access to the pool list.
Remove destroyed stream from the list of the safe streams
Change-Id: I1863b89bd3f5e188c161227cc790c3adaf72cc58
[ROCm/clr commit: 5957ff9f7b]
Honor hipEventReleaseToDevice and hipEventReleaseToSystem flags.
hipEventRecord would flush caches if no release flags are provided. To
change this behavior set ROC_EVENT_NO_FLUSH=1
Change-Id: I03e41b515b1d0cf963b0c2d5b9901b09e71a0e59
[ROCm/clr commit: f320acb797]
The actual size of allocation can be different from the original
request due to alignments. Pass the size of the original request
for validation during the arena object look-up
Change-Id: I30000046b1ec56abe743e43113046144fd3edbc6
[ROCm/clr commit: fb835c6f3e]
Tensor flow build console shows "hip/lib/.hipInfo: No such file or directory"
Fixed by adding soft link for .hipInfo and this will maintain backward compatibility for file reorganization
Change-Id: I91c17115b56bbcabeb86cbcd12d3fb9aaa8f847e
[ROCm/clr commit: 1a4fd9b7ea]
hipErrorHostMemoryNotRegistered should be returned when an
unregistered pointer is passed to hipHostUnregister
Change-Id: Ie76086b602bde2cd7a7a2b049cd03d29454ff306
[ROCm/clr commit: ed4014e519]
This reverts commit eff4583118.
Reason for revert: Catch2 test fails
Change-Id: If0ea0eab16b50f27c9acbc471530266917773ff1
[ROCm/clr commit: d888c0a9bf]
Flat folder structure requires hip to be installed in /opt/rocm and this need a change in build script
This patch is a workaround, till build scripts changes for flat folder structure are merged and will be removed once build script changes are merged to amd-master
Change-Id: Ib6f51b9d4e89afcc954a5d96595ce471cf7bd67a
[ROCm/clr commit: ef32ae6ada]