SWDEV-313126 - Use data() method for the base array address
Reference for the first element can trigger an assert with
_GLIBCXX_ASSERTIONS build
Change-Id: I59c63c052831307edfe5dcc6384798a43e9596dd
[ROCm/clr commit: 6f2e7c3199]
This commit is contained in:
@@ -459,7 +459,7 @@ bool DmaBlitManager::copyBufferRect(device::Memory& srcMemory, device::Memory& d
|
||||
"HSA Asycn Copy Rect wait_event=0x%zx, completion_signal=0x%zx",
|
||||
(wait_events.size() != 0) ? wait_events[0].handle : 0, active.handle);
|
||||
hsa_status_t status = hsa_amd_memory_async_copy_rect(&dstMem, &offset,
|
||||
&srcMem, &offset, &dim, agent, direction, wait_events.size(), &wait_events[0], active);
|
||||
&srcMem, &offset, &dim, agent, direction, wait_events.size(), wait_events.data(), active);
|
||||
if (status != HSA_STATUS_SUCCESS) {
|
||||
gpu().Barriers().ResetCurrentSignal();
|
||||
LogPrintfError("DMA buffer failed with code %d", status);
|
||||
@@ -482,7 +482,7 @@ bool DmaBlitManager::copyBufferRect(device::Memory& srcMemory, device::Memory& d
|
||||
hsa_status_t status = hsa_amd_memory_async_copy(
|
||||
(reinterpret_cast<address>(dst) + dstOffset), dstAgent,
|
||||
(reinterpret_cast<const_address>(src) + srcOffset), srcAgent,
|
||||
size[0], wait_events.size(), &wait_events[0], active);
|
||||
size[0], wait_events.size(), wait_events.data(), active);
|
||||
if (status != HSA_STATUS_SUCCESS) {
|
||||
gpu().Barriers().ResetCurrentSignal();
|
||||
LogPrintfError("DMA buffer failed with code %d", status);
|
||||
@@ -668,7 +668,7 @@ bool DmaBlitManager::hsaCopy(const Memory& srcMemory, const Memory& dstMemory,
|
||||
(wait_events.size() != 0) ? wait_events[0].handle : 0, active.handle);
|
||||
|
||||
status = hsa_amd_memory_async_copy(dst, dstAgent, src, srcAgent,
|
||||
size[0], wait_events.size(), &wait_events[0], active);
|
||||
size[0], wait_events.size(), wait_events.data(), active);
|
||||
if (status == HSA_STATUS_SUCCESS) {
|
||||
gpu().addSystemScope();
|
||||
} else {
|
||||
|
||||
@@ -1614,7 +1614,7 @@ void VirtualGPU::submitSvmPrefetchAsync(amd::SvmPrefetchAsyncCommand& cmd) {
|
||||
// Initiate a prefetch command
|
||||
hsa_status_t status = hsa_amd_svm_prefetch_async(
|
||||
const_cast<void*>(cmd.dev_ptr()), cmd.count(), agent,
|
||||
wait_events.size(), &wait_events[0], active);
|
||||
wait_events.size(), wait_events.data(), active);
|
||||
|
||||
// Wait for the prefetch. Should skip wait, but may require extra tracking for kernel execution
|
||||
if ((status != HSA_STATUS_SUCCESS) || !Barriers().WaitCurrent()) {
|
||||
|
||||
Reference in New Issue
Block a user