SWDEV-430437,SWDEV-434702 - Split the streamset per device

Change-Id: If1bcca45825c9899462bb95ed6f637f5af806cc8
This commit is contained in:
Ioannis Assiouras
2024-02-06 00:34:35 +00:00
rodzic 1239309c90
commit be2bdabb76
6 zmienionych plików z 175 dodań i 144 usunięć
+4 -4
Wyświetl plik
@@ -76,7 +76,7 @@ hipError_t ihipFree(void *ptr) {
if (memory_object != nullptr) {
// Wait on the device, associated with the current memory object during allocation
auto device_id = memory_object->getUserData().deviceId;
hip::Stream::SyncAllStreams(device_id);
g_devices[device_id]->SyncAllStreams();
// Find out if memory belongs to any memory pool
if (!g_devices[device_id]->FreeMemory(memory_object, nullptr)) {
@@ -743,7 +743,7 @@ hipError_t ihipArrayDestroy(hipArray_t array) {
auto image = as_amd(memObj);
// Wait on the device, associated with the current memory object during allocation
hip::Stream::SyncAllStreams(image->getUserData().deviceId);
g_devices[image->getUserData().deviceId]->SyncAllStreams();
image->release();
delete array;
@@ -1252,7 +1252,7 @@ hipError_t ihipHostUnregister(void* hostPtr) {
if (mem != nullptr) {
// Wait on the device, associated with the current memory object during allocation
hip::Stream::SyncAllStreams(mem->getUserData().deviceId);
g_devices[mem->getUserData().deviceId]->SyncAllStreams();
amd::MemObjMap::RemoveMemObj(hostPtr);
for (const auto& device: g_devices) {
@@ -4304,7 +4304,7 @@ hipError_t ihipMipmappedArrayDestroy(hipMipmappedArray_t mipmapped_array_ptr) {
auto image = as_amd(mem_obj);
// Wait on the device, associated with the current memory object during allocation
hip::Stream::SyncAllStreams(image->getUserData().deviceId);
g_devices[image->getUserData().deviceId]->SyncAllStreams();
image->release();
delete mipmapped_array_ptr;