File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -76,15 +76,15 @@ class levelProfile
7676 inline void tic (const char *event)
7777 {
7878#ifdef PROFILE
79- cudaThreadSynchronize ();
79+ cudaDeviceSynchronize ();
8080 Tic[event] = high_resolution_clock::now ();
8181#endif
8282 }
8383
8484 inline void toc (const char *event)
8585 {
8686#ifdef PROFILE
87- cudaThreadSynchronize ();
87+ cudaDeviceSynchronize ();
8888 duration<double , std::nano> ns = t2 - t1;
8989 times[event] += ns.count ();
9090#endif
Original file line number Diff line number Diff line change 2929
3030#define CUDA_SAFE_CALL ( call ) do { \
3131 CUDA_SAFE_CALL_NO_SYNC (call); \
32- cudaError err = cudaThreadSynchronize (); \
32+ cudaError err = cudaDeviceSynchronize (); \
3333 if ( cudaSuccess != err) { \
3434 fprintf (stderr, " Cuda error in file '%s' in line %i : %s.\n " , \
3535 __FILE__, __LINE__, cudaGetErrorString ( err) ); \
You can’t perform that action at this time.
0 commit comments