Created
August 6, 2020 03:57
-
-
Save tallendev/d93c6c589f276ce5c6a0824af12455f8 to your computer and use it in GitHub Desktop.
minimal breaking of nvprof for uvm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__global__ void foo(float* array) | |
{ | |
int i = 0; | |
array[i] = 0.0; | |
} | |
#define ARRAY_SIZE 500 | |
int main (void) | |
{ | |
float* array; | |
cudaMallocManaged(&array, ARRAY_SIZE * sizeof(float)); | |
foo<<<1,1>>>(array); | |
cudaDeviceSynchronize(); | |
return 0; | |
} | |
~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment