SWDEV-315545 - Fix for hipMemsetAsync crash

Change-Id: I39ad0dacf4357aa6f9d0c6cf92a6a7d14bd219c0


[ROCm/clr commit: c4f6037ae8]
这个提交包含在:
Sarbojit Sarkar
2021-12-20 15:05:51 +00:00
提交者 Sarbojit Sarkar
父节点 3bdc78b813
当前提交 641d0b9d6f
+8 -2
查看文件
@@ -2258,12 +2258,18 @@ hipError_t packFillMemoryCommand(amd::Command*& command, amd::Memory* memory, si
amd::Coord3D fillSize(sizeBytes, 1, 1);
// surface=[pitch, width, height]
amd::Coord3D surface(sizeBytes, sizeBytes, 1);
command =
amd::FillMemoryCommand* fillMemCommand =
new amd::FillMemoryCommand(*queue, CL_COMMAND_FILL_BUFFER, waitList, *memory->asBuffer(),
&value, valueSize, fillOffset, fillSize, surface);
if (command == nullptr) {
if (fillMemCommand == nullptr) {
return hipErrorOutOfMemory;
}
if (!fillMemCommand->validatePeerMemory()) {
delete fillMemCommand;
return hipErrorInvalidValue;
}
command = fillMemCommand;
return hipSuccess;
}