Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

should the hipDeviceReset() release or destroy the event created by hipEventCreate() in previous? #45

Open
shenfumin opened this issue Sep 16, 2022 · 1 comment

Comments

@shenfumin
Copy link

No description provided.

@shenfumin
Copy link
Author

void Event::destroyAllEvents(int deviceId) {
  amd::ScopedLock lock(hip::eventSetLock);
  for (auto it = eventsSet.begin(); it != eventsSet.end();) {
    hip::Event* e = reinterpret_cast<hip::Event*>(*it);
    if (e->deviceId() == deviceId) {
      delete e;
      it = eventsSet.erase(it);
    } else {
      ++it;
    }
  }
}
and it will be called in the function hipDeviceReset() like the following
hip::Event::destroyAllEvents(dev->deviceId());

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant