SWDEV-232918
hipEventRecord is much slower in hipclang/vdi
- Make sure default streams don't sync each other.
- Add null stream into the list of default streams.
- Code clean-up to simplify queue look-up.
Change-Id: I36e1fc8d86a600e3dce806694d95d146ed8afd03
[ROCm/hip commit: f7f7337bae]
This commit is contained in:
@@ -48,10 +48,7 @@ hipError_t ihipFree(void *ptr)
|
||||
}
|
||||
if (amd::SvmBuffer::malloced(ptr)) {
|
||||
for (auto& dev : g_devices) {
|
||||
amd::HostQueue* queue = hip::getNullStream(*dev->asContext());
|
||||
if (queue != nullptr) {
|
||||
queue->finish();
|
||||
}
|
||||
dev->NullStream()->finish();
|
||||
}
|
||||
amd::SvmBuffer::free(*hip::getCurrentDevice()->asContext(), ptr);
|
||||
return hipSuccess;
|
||||
@@ -283,10 +280,7 @@ hipError_t ihipArrayDestroy(hipArray* array) {
|
||||
return hipErrorInvalidValue;
|
||||
}
|
||||
for (auto& dev : g_devices) {
|
||||
amd::HostQueue* queue = hip::getNullStream(*dev->asContext());
|
||||
if (queue != nullptr) {
|
||||
queue->finish();
|
||||
}
|
||||
dev->NullStream()->finish();
|
||||
}
|
||||
as_amd(memObj)->release();
|
||||
|
||||
@@ -684,10 +678,7 @@ hipError_t hipHostUnregister(void* hostPtr) {
|
||||
HIP_INIT_API(hipHostUnregister, hostPtr);
|
||||
|
||||
for (auto& dev : g_devices) {
|
||||
amd::HostQueue* queue = hip::getNullStream(*dev->asContext());
|
||||
if (queue != nullptr) {
|
||||
queue->finish();
|
||||
}
|
||||
dev->NullStream()->finish();
|
||||
}
|
||||
|
||||
if (amd::SvmBuffer::malloced(hostPtr)) {
|
||||
|
||||
Reference in New Issue
Block a user