SWDEV-279486 - Fix hipMemcpyPeer/hipMemcpy APIs
Addresses the scenarios when the size passed is more than the allocated size and when the deviceid is invalid Change-Id: I6c9b62639096f655ffb61976905b1ce8c5f51ee7 Change-Id: I8a0d660924a8e2300c517aba6f9088626b8f6ef5
This commit is contained in:
@@ -60,7 +60,7 @@ hipError_t single_process(int32_t offset) {
|
||||
ipc_offset_handle, 0));
|
||||
|
||||
// Copy Values from Device to Host and Check for correctness
|
||||
HIPCHECK_RETURN_ONFAIL(hipMemcpy(ipc_out_hptr, ipc_out_dptr, (NUM * sizeof(int)), hipMemcpyDeviceToHost));
|
||||
HIPCHECK_RETURN_ONFAIL(hipMemcpy(ipc_out_hptr, ipc_out_dptr, ((NUM-offset) * sizeof(int)), hipMemcpyDeviceToHost));
|
||||
for (size_t idx = offset; idx < NUM; ++idx) {
|
||||
if (ipc_out_hptr[idx-offset] != ipc_dptr[idx]) {
|
||||
std::cout<<"Failing @ idx: "<<idx<<std::endl;
|
||||
|
||||
Reference in New Issue
Block a user