This also fixes the QMCPack staging (SWDEV-335826) test failures related
to hipMemcpyToSymbol
Change-Id: Icc3ff04fb1e17999f5bddf12e1a7266e2289032f
[ROCm/clr commit: 8a333a989b]
Let more types support hipResourceViewDesc.
Add missing symbols to fix cuda build failing.
Change-Id: Ife694cc6491427093863252e257e820b0bb4fa0f
[ROCm/clr commit: a19b767e8a]
HIP uses icd_dispatch.h, which is not a public header. Using the public
CL/cl_icd.h removes inclusion of the private header.
This allows compiling HIP without relying on OCL ICD source, which makes
distributing a standalone ROCclr easier.
For WIN32, a few other headers are required.
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
Change-Id: I0cab173b9753c5b0ab3be9222aa8bb0545cdeaab
[ROCm/clr commit: d04938a6ad]
This reverts commit 1ab7f22334 due to QMCPack test failure (SWDEV-335826)
Change-Id: I40397b345aa60f43afc17853bc72426daf385cf7
[ROCm/clr commit: 84c46047e5]
Prior to this change, when Git_FOUND was false, HIP_VERSION_BUILD_ID
would be undefined in the CMake code. The value of HIP_VERSION_BUILD_ID
in <hip/hip_version.h> is taken from the CMake variable, so it was being
defined as nothing in those cases. That would cause compilation failures,
as src/hip_global.cpp contains the function:
size_t amd_dbgapi_get_build_id() {
return HIP_VERSION_BUILD_ID;
}
which would become
size_t amd_dbgapi_get_build_id() {
return ;
}
after preprocessing. To prevent this, we can define the version
information to a default value when Git is not found.
A related problem was reported by Harmen Stoppels in
https://github.com/ROCm-Developer-Tools/HIP/pull/2218. When Git
is not available (or if the library is being built from a tarball),
the HIP_VERSION_GITHASH is not defined. This causes trouble because
HIP_LIB_VERSION_STRING is defined as "X.Y.Z-${HIP_VERSION_GITHASH}"
and therefore becomes "X.Y.Z-".
The incomplete version string becomes a problem when it is appended
to the shared library file name. File names that end with '-' confuse
the linker. They cause strange errors when attempting to link to the
HIP library. This problem can be prevented by dropping the trailing
dash and using "X.Y.Z" as the version string when HIP_VERSION_GITHASH
is not defined.
Change-Id: I6e290c1f1b603ba30c9ded885e125d9ca9a2e688
Signed-off-by: Cordell Bloor <Cordell.Bloor@amd.com>
[ROCm/clr commit: 9c450d6f66]
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]