Skip to content

Instantly share code, notes, and snippets.

@nightduck
Last active June 10, 2021 00:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nightduck/4101c707582e137d1486bbf7479886de to your computer and use it in GitHub Desktop.
Save nightduck/4101c707582e137d1486bbf7479886de to your computer and use it in GitHub Desktop.
Check CUDA Stream Priority Range
#include <stdio.h>
#include <stdlib.h>
/* Compile with
* nvcc streamPriorityRange.cu -o run
*
* And run with:
* ./run
*
* 0 corresponds to the lowest priority (and the priority of the default stream)
* Negative numbers correspond to increasingly higher priority streams
*/
int main() {
int low = -1, high = -1;
cudaError_t ret = cudaDeviceGetStreamPriorityRange(&low, &high);
printf("priority ranges from %d to %d\n", low, high);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment