CUDA 编程的时候,大家知不知道如果调用性能计数器API?
cuda吧
全部回复
仅看楼主
level 1
希声问候
楼主
性能计数器(performance counter)的API?
2015年10月21日 14点10分
1
level 7
tengwl
cudaEvent_t start,stop;
cudaEventCreate(&start);
cudaEventCreate(&stop);
cudaEventRecord(start,0);
{
//统计的代码段
…………
}
cudaEventRecord(stop,0);
float costtime;
cudaEventElapsedTime(&costtime,start,stop);
2016年03月26日 12点03分
3
level 7
tengwl
楼上的 落了一句:
cudaEventRecord(stop,0)
cudaEventSynchronize(stop); //Waits for an event to complete.Record之前的任务
float costtime;
cudaEventElapsedTime(&costtime,start,stop);
2016年04月24日 14点04分
4
1