Ensure the member function Alloc() and Free() of command_pool_ will not be
accessed after command_pool_ be destructed.
Signed-off-by: Chong Li <chongli2@amd.com>
Change-Id: Ic2d36423302518a030bd61fa399290ebe2ed8194
[ROCm/clr commit: e6a5c81221]
1) Since g_devices is not initialized when stream_per_thread constructor
is called on windows, m_streams is empty when hipDeviceReset is called.
2) clear_spt tries to access empty vector causing segfaults in
hipDeviceReset call.
3) on linux ROCCLR_INIT_PRIORITY makes sure that g_devices is initialized
first before tls constructor creates stream_per_thread object.
Change-Id: Ib2ba643d1278d820287ea3b242ed0878d7529165
[ROCm/clr commit: 450eca293b]
The amdgpu-arch tool is not supported for static build.
This commit adds changes to detect the build type during
cmake config and use the rocm_agent_enumerator for static build.
Change-Id: I8a295e01f54075507390ef540f16b28bb20237a9
[ROCm/clr commit: a02888af58]
This change adds a new HIP API `hipExtHostAlloc` which preserves
the functionality of `hipHostMalloc`.
Change-Id: I13504c6fc13465ddd7aed329795bb4f2fef1baff
[ROCm/clr commit: 2c84211b58]
Integration into pytorch pointed out some issues, value narrowing, to
fix this we are now using unions. Also removed check for -munsafe*
compiler flag. The check is now just on builtin detection.
Change-Id: I49364503fa429bd862952f9b29879072afa6d553
[ROCm/clr commit: bb52d9ed62]
hiprtc and hip APIs use the same file.
Append to file instead of start of file
Change-Id: I2703f9bb67f0c51b557a058daab129679a0b5dd9
[ROCm/clr commit: e07172ff57]
This patch fixes this potential issue that filling AQL header before
filling the AQL body. The hsa spec specifies "Packet processors may
process AQL packets after the packet format field is updated, but
before the doorbell is signaled."
However, the hipGraph AQL package with valid header will be filled
before fill the body, which may have the potential issue that CP
receive invalid AQL body.
Change-Id: I84af798c19ee2b8805ba19732b0eabdea2958a96
[ROCm/clr commit: 3959b5be1e]
SPT is destroyed with hipDeviceReset(). If a
stream is created right after reset, the same
object id could be reused. Later SPT destructor
incorrectly verifies that the stream is valid
referring to the reused object id causing the
corruption.
Change-Id: I3b1f7ffdf8bab874dca7b8fde22318162997b8f6
[ROCm/clr commit: f6a68b3c2e]
This change adds fixes in optimized multistream path for childGraph uses cases.
1) For childgraph nodes, rely on runNodes() only to process
the childgraph and skip calls to createCommand and enqueueCommands.
This ensures that the start/end markers are enqueued correctly
with respect to the childGraph commands.
In addition, the runNodes() for the childgraph should be called after
the dependency walkthrough to make sure that the subgraph is executed once.
2) Nodes with no outgoing edges should be marked
as a leafs regardless of which stream they are assigned to.
This is to ensure that marker dependencies from nodes
that run on non-zero stream to subgraph leafs that run on zero stream
are still set up correctly.
Change-Id: I4a5f4f3b0e0d01e515cdcb045b46c2798f291255
[ROCm/clr commit: 464b99373b]
Fix random language string that leads to compiling failure
of trap handler and TDR of hipMemset() on VM in release
mode of hip-rt
Change-Id: Ie1d874742b804f62ceda68064fa54f5d39c092b8
[ROCm/clr commit: 857d0d60b9]
When source or destination pitch is set to zero in hip_Memcpy2D struct
it should default to WidthInBytes + [src/dst]XInBytes
Change-Id: Id57b53cab40ba72ced231258da9356554c4868c3
[ROCm/clr commit: 7a1e818c82]
- Fixes -0.0 and +0.0 comparison. For atomicMax if the value on
address is -0.0 and on val is +0.0, gfx90a's unsafe atomics will swap
them. This behavior should be consistent with cas loop as well.
- _system variants of atomicMax and atomicMin are resulting in
incorrect output. Updated these to use the similar implementation as
atomicMax and atomicMin.
Change-Id: I20df36ee29ae0434a6b564f2ba71193fe41cfa59
[ROCm/clr commit: d69cc35750]
This is the first step to remove rocm-ocl-icd.
We don't build amd icd after this commit.
We still need to remove header files usage in future steps.
Change-Id: Ic4ac5476180f9ef2ce87b62891c08b28d6c9bfd2
[ROCm/clr commit: 5f775b8b7f]
Releasing graph exec after wait completes and before delete hip::stream obj
during stream destroy.
Change-Id: I1d68aa8d844f7d3af330c6d09c44af07f8553551
[ROCm/clr commit: 8e80429b87]