ROCm / hcc

HCC is an Open Source, Optimizing C++ Compiler for Heterogeneous Compute currently for the ROCm GPU Computing Platform
https://github.com/RadeonOpenCompute/hcc/wiki
Other
424 stars 106 forks source link

isEmpty should only rely on underlying HSA queue #1412

Closed jeffdaily closed 4 years ago

jeffdaily commented 4 years ago

An external library can call acquireLockedHsaQueue() and insert its own packets into the HSA queue. #1382 caught the case where doing so would put the HSAQueue into an inconsistent state. However, it did not go far enough. isEmpty() should reflect the contents of the underlying HSA queue (if any), not the contents of the HSAQueue::asyncOps vector.

This will become a blocker for future HIP/hcc runtime improvements.

jeffdaily commented 4 years ago

This PR seems to break HIP unit tests. Needs more testing.

jeffdaily commented 4 years ago

HIP unit tests are passing with current PR. Removed dontmerge labels.

jeffdaily commented 4 years ago

After discussion with @scchan, instead of changing isEmpty et all, we should find a way to notify HCC's dep tracking.