Ignore:
Timestamp:
Feb 2, 2017, 12:20:41 PM (2 years ago)
Author:
lindanl
Message:

Bug fixed for icgrep GPU version.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/IR_Gen/CudaDriver.h

    r5212 r5294  
    101101  // Retrieve device data
    102102
     103  CUevent start;
     104  CUevent stop;
     105  float elapsedTime;
     106
     107  cuEventCreate(&start, CU_EVENT_BLOCKING_SYNC);
     108  cuEventRecord(start,0);
     109
    103110  ulong * matchRslt;
    104111  int ret = posix_memalign((void**)&matchRslt, 32, outputSize);
     
    116123  }
    117124
     125  cuEventCreate(&stop, CU_EVENT_BLOCKING_SYNC);
     126  cuEventRecord(stop,0);
     127  cuEventSynchronize(stop);
     128
     129  cuEventElapsedTime(&elapsedTime, start, stop);
     130  printf("GPU Kernel time : %f ms\n" ,elapsedTime);
     131
    118132
    119133  // Clean-up
Note: See TracChangeset for help on using the changeset viewer.