Blocking and default streams' sync:
Add hip::syncStreams(dev) to sync blocking streams on a given device. hip::syncStreams(void) should only sync streams on the current device. Change-Id: Ib6b0735215fa0ed12c646ebd029e9763ee3712ce
Этот коммит содержится в:
@@ -42,14 +42,20 @@ class StreamCallback {
|
||||
|
||||
namespace hip {
|
||||
|
||||
void syncStreams() {
|
||||
void syncStreams(int devId) {
|
||||
amd::ScopedLock lock(streamSetLock);
|
||||
|
||||
for (const auto& it : streamSet) {
|
||||
it->finish();
|
||||
if (it->device->deviceId() == devId) {
|
||||
it->finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void syncStreams() {
|
||||
syncStreams(getCurrentDevice()->deviceId());
|
||||
}
|
||||
|
||||
Stream::Stream(hip::Device* dev, amd::CommandQueue::Priority p, unsigned int f) :
|
||||
queue(nullptr), device(dev), priority(p), flags(f) {}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user