gpgpu - OpenACC - How to find if device is busy doing some CUDA operations? -


i have cuda-based code , want incorporate openacc parts of code. but, function trying parallelize openacc code governed cuda calls , not.

my question how can query openacc library see whether device busy or not. there api calls that?

note: not familiar cuda, use pseudo-code.

sometimes target function seq_function called on host when device busy computation below. but, called when device not busy.

cudamemalloc(...); cudalaunchasync(...); ... //this function trying parallelize openacc seq_function(...);  ... cudawait(...); cudadealloc(...); 

so, want make target function flexible:

  • if device busy or cuda-based computation running => use host.
  • if device not busy => use gpu through openacc-enabled code.

is there way find whether device busy or not?

i don't know of way programmatically device utilization. can memory usage via cudamemgetinfo might able use extrapolate if running on gpu or not.


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -