- correct condition for flags
- remove check for num of dependency
Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: I6efd918e203b57c840d74ee0243f24b0c2c80e21
Hiprtc related libraries are duplicated when installed from build directory
This happens when cmake install libdir is set with lib64 as default and using hard code path "lib" for LIBRARY_DESTINATION
Replaced "lib" with cmake install libdir
Removed the default setting of libdir in source code and its should be controlled via build argument
Change-Id: Icac55eac9427a5088903d01942e6bfd5263a6fc0
Fixed an error in the CMakeLists.txt USE_PERF_API option declaration
that was making it always disabled. Fixing this exposed an issue with
the hip_prof_gen.py script's handling of function variants (for example,
_spt functions) and new HIP_INIT_API_* macros.
Also switched the python interpreter to python3 as python2 may not be
available by default on the build system.
Change-Id: I971fc9edcc746ca63a2bdf4f540e755f9a80fe69
- add user obj APIs for creating release and retain of user onbjects
Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: I0bf2999c77e44269565b27c31c7c1461f8a160a2
The cmake file command with REAL_PATH option is supported from cmake version 3.19 onwards
Issue reported in cmake version 3.17. get_filename_component is supported since 3.4 onwards
The command gives REALPATH with symlinks resolved - /opt/rocm-ver/lib/cmake/hip/hip-config.cmake
So need to move four level up to get ROCM PATH
Verfied by printing the variables
Change made so that default initializaton of ROCM PATH is executed if there is no ROCM_PATH set in ENV
Change-Id: Ibfff584eeb154bd73a568a842f28143d5ed72458
- hiprtcCompileProgram should create isa with temp name when
program name is not provided along with --save-temps option
Change-Id: I47974e2ac56336c851531622ff7d2a3ffb53455e
- Don't pass uint32_t arguments by reference.
- Use nullptr instead of NULL.
- Don't add frivolous typedefs.
- Use correct types when available instead of generic integral types.
- Make all roctracer callbacks extern "C" to prepare for a future change
that will be removing their declaration from hip_runtime_api.h.
- Rename cb/sem sync and release functions -> reader_lock/writer_lock
acquire and release.
Change-Id: If203fee077d421a9782fcd34607a413b8c3dcfc8
When acquiring the reader's lock (sem_sync()...sem_release()), it is
possible for a writer to squeeze by if the reader goes into sync_wait().
The writer could re-acquire the entry.sync between entry.sem > 0 and
entry.sync = 0.
void sync_wait(uint32_t id) {
sem_decrement(id);
while (entry(id).sync.load()) {}
// <--- HERE
sem_increment(id);
}
This could result in both the reader and the writer accessing
{ callback, arg } at the same time, and the reader could read
inconsistent data, for example: { new callback, old arg }.
The solution is to re-test entry.sync when returning from sync_wait():
void sem_sync(uint32_t id) {
sem_increment(id);
- if (entry(id).sync.load() == true) sync_wait(id);
+ while (entry(id).sync.load() == true) sync_wait(id);
}
Change-Id: I22f74f4cb9a5f027aac8aa4ed3e633acc19df4b8
Part 3: Add missing declaration of wall_clock64() to fix
compiling issue in device code.
Add querying hipDeviceAttributeWallClockRate.
Change-Id: Ie54771c2f58eeaacdc0248bc116ef193f99eb9b9
As per the requirements in SWDEV-287540, config files should not have hard coded /opt/rocm path
Instead of setting ROCM_PATH to /opt/rocm, used hip-config file path to find the rocm path
Validated by printing the CONFIG_PATH and is coming as/opt/rocm-ver/lib/cmake/hip/hip-config.cmake
So need four level up,with file name in the path
Change-Id: Iac01d3a0c0168138c777551165705ed56cf6c3b1
- move removing the array from array set earlier to avoid race condition
Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: I9003c991e3e0f47ed0509ddfdbeaa145b5a1e0f1