GNUInstallDirs is used to allow the user to customize the install paths
of HIP, rather than using hardcoded locations.
Minimum cmake version updated to 3.16.8
Depends-On: I521c44dc34404b136141682c2777257b23ffa6e8
Change-Id: I2cff642c469d6d1e8bb3f1a3c151e6a03fb5d55b
- hipDeviceGet/SetGraphMemAttr
- hipDeviceGraphMemTrim
- there is no memory pool for graphs currently
Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: I11db76ea7ea1c7732175fc93264448052357e8dc
This is attempt two of bf4df229c9
GNUInstallDirs is used to allow the user to customize the install paths
of HIP, rather than using hardcoded locations.
See documentation for more information:
https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
Note that libdir must be overriden to "lib" before including
GNUInstallDirs, because by default, cmake tries to detect the libdir
path, but ROCm packaging would like to use lib by default for all
targets. This does not stop the user (or distros) from overriding.
Also note this change does no take into account the changes needed to
non-cmake files, such as perl scripts, so not all paths combinations are
necessarily functional.
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
Change-Id: I521c44dc34404b136141682c2777257b23ffa6e8
Implements hipMemRetainAllocationHandle
HIP layer updates the svmPtr of the amd::memory
ROCCLR just manages the MemObjMap
This is because HIP knows the orignal (generic) address of the
physical memory whereas ROCCLR doesn't keep track of that
Change-Id: Ied26d7f814bc468f5cf586c967020737b9aa9e9f
- make the defualt texref value compatible with cuda
Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: I2ae980e435f3b0fc15b237741e3f2b97c4257e12
Windows complains about undefined symbol for
hipStreamWrite32/64 and hipStreamWait32/64 -
commit hash 08435a972b
Change-Id: I48b9a6591cab3a05baaedbc26030914dd930fb68
This reverts commit bf4df229c9.
Reason for revert: <Breaking all the staging builds. this is breaking components which are using find_package(HIP)>
Change-Id: Ic7340fb461a5efdd170a0988731e0885538a11d6
GNUInstallDirs is used to allow the user to customize the install paths
of HIP, rather than using hardcoded locations.
See documentation for more information:
https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
Note that libdir must be overriden to "lib" before including
GNUInstallDirs, because by default, cmake tries to detect the libdir
path, but ROCm packaging would like to use lib by default for all
targets. This does not stop the user (or distros) from overriding.
Also note this change does no take into account the changes needed to
non-cmake files, such as perl scripts, so not all paths combinations are
necessarily functional.
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
Change-Id: Iae80f47c47ea0a74fc1c221b6eea82b557601394
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
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>
- channel format should be consistent accross parameters
Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: I1e7680ab9262a66e7bea4aaa21f061044b0f7956
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