Skip to content

Detached sampling thread must start/stop in atomic

rocmwrapper has rsmiSamplingRunning as bool which should be atomic. The same goes for the nvmlwrapper, but moreover it calls detach, not join, which is not appropriate. Any wrappers using a thread to sample must use a condition variable atomic and call join on the closing sequence.

image @vys0053

Edited by Ondrej Vysocky