- 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
[ROCm/clr commit: 9f09ca929e]
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
[ROCm/clr commit: 6f78083f2a]
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
[ROCm/clr commit: f61a87ebb2]
This reverts commit d12900e000.
Reason for revert: Moved out to future release
Change-Id: I36b046c8681371baa9e0ccb69d46dad633ee5706
[ROCm/clr commit: d328d72fab]
- test should allow first calling get function
Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: I365cd6210a01fd5ae3620711694bdc52e0f90b19
[ROCm/clr commit: 66bde8f336]
- hiprtcAddLinkData should accept 0 or null as input name
- hiprtcLinkCreate should accept 0 or null as options ptr
- hiprtcCompile should send -fgpu-rdc option to comgr if its present in the options
Change-Id: I84f6e36df5c99b719ee9c67dfc1b4dbcfd8e3172
[ROCm/clr commit: ee27685ac4]
- Implement CUDA mappings for stream ordered memory allocator and memory pool APIs
Change-Id: I2434118ff043527ec7c3389cd5175e1e21d032bf
[ROCm/clr commit: 9f4214b587]
Stream is not important to get the kernel
name from Function that can be found in
the functions_ map.
Change-Id: I164bc3ebcc5552359856e76204d8b124ba0d2f34
[ROCm/clr commit: fb8690f812]
- flags passed should be only one type at a time
Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: I3e56f036e51d8cc84fe5c18c06cfa11cf785233f
[ROCm/clr commit: 030e7702f1]
The path variable was used incorrectly and this is causing issue in spack build
Change-Id: I34890577f1403d0d5efcba80d417ad5f9720aa6e
[ROCm/clr commit: d65aaf2f78]
- Otherwise this consumes the caller's stdin by accident.
Patch by:
- Bolo -- Josef Burger
- https://github.com/bigtrak
Change-Id: I669376c025c0cde2cfdd59b5a4a14a71c5d8e862
[ROCm/clr commit: a0ecfd13a9]
HIP build scripts updated, so that cmake install prefix and cpack packaging prefix doesn't have destination directory hip
The workaround in source code is not at all required.
Depends-On: I6775407b4bfec84b6b911d333f3725c310539bfc
Change-Id: Ic1f5e170690d6dba0fec493143dea390c435cd42
[ROCm/clr commit: db6eaa35aa]