Skip to content

Commit

Permalink
SWDEV-432599 - Added null checks for rocMemory ptrs in copyMemory
Browse files Browse the repository at this point in the history
Change-Id: I8ccda2c915dad22c4ea67556dfaab9ba47770069
  • Loading branch information
iassiour committed Jan 18, 2024
1 parent 0f9f8b5 commit 28743d8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rocclr/device/rocm/rocvirtual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1857,7 +1857,10 @@ bool VirtualGPU::copyMemory(cl_command_type type, amd::Memory& srcMem, amd::Memo
amd::CopyMetadata copyMetadata) {
Memory* srcDevMem = dev().getRocMemory(&srcMem);
Memory* dstDevMem = dev().getRocMemory(&dstMem);

if (srcDevMem == nullptr || dstDevMem == nullptr) {
LogError("submitCopyMemory failed!");
return false;
}
// Synchronize source and destination memory
device::Memory::SyncFlags syncFlags;
syncFlags.skipEntire_ = entire;
Expand Down

0 comments on commit 28743d8

Please sign in to comment.