Guest User

Untitled

a guest
Feb 14th, 2018
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.23 KB | None | 0 0
  1. $ cat cublasinit.cu
  2. #include <cublas_v2.h>
  3.  
  4. int main()
  5. {
  6. cublasHandle_t handle;
  7. cublasCreate(&handle);
  8. cudaDeviceReset();
  9. return 0;
  10. }
  11.  
  12. $ nvcc -arch=sm_52 cublasinit.cu -g -o cublasinit -lcublas
  13.  
  14. $ nvprof --profile-api-trace runtime ./cublasinit
  15. ==20967== NVPROF is profiling process 20967, command: ./cublasinit
  16. ==20967== Profiling application: ./cublasinit
  17. ==20967== Profiling result:
  18. Type Time(%) Time Calls Avg Min Max Name
  19. GPU activities: 100.00% 1.1520us 1 1.1520us 1.1520us 1.1520us [CUDA memcpy HtoD]
  20. API calls: 73.39% 333.76ms 1 333.76ms 333.76ms 333.76ms cudaFree
  21. 26.53% 120.65ms 1 120.65ms 120.65ms 120.65ms cudaDeviceReset
  22. 0.07% 308.56us 3 102.85us 10.797us 196.58us cudaMalloc
  23. 0.00% 15.254us 1 15.254us 15.254us 15.254us cudaMemcpy
  24. 0.00% 9.9180us 16 619ns 427ns 2.0100us cudaEventCreateWithFlags
  25. 0.00% 4.4720us 11 406ns 247ns 1.4270us cudaDeviceGetAttribute
  26. 0.00% 1.2830us 1 1.2830us 1.2830us 1.2830us cudaGetDevice
  27.  
  28. $ nvprof --profile-api-trace driver ./cublasinit
  29. ==22436== NVPROF is profiling process 22436, command: ./cublasinit
  30. ==22436== Profiling application: ./cublasinit
  31. ==22436== Profiling result:
  32. Type Time(%) Time Calls Avg Min Max Name
  33. GPU activities: 100.00% 1.2480us 1 1.2480us 1.2480us 1.2480us [CUDA memcpy HtoD]
  34. API calls: 62.06% 620.86us 185 3.3550us 124ns 161.93us cuDeviceGetAttribute
  35. 29.29% 293.05us 2 146.53us 69.859us 223.19us cuDeviceTotalMem
  36. 8.00% 80.030us 2 40.015us 31.885us 48.145us cuDeviceGetName
  37. 0.34% 3.4310us 4 857ns 259ns 2.2730us cuDeviceGetCount
  38. 0.19% 1.8850us 3 628ns 295ns 1.2760us cuDeviceGet
  39. 0.06% 625ns 1 625ns 625ns 625ns cuInit
  40. 0.05% 480ns 1 480ns 480ns 480ns cuDriverGetVersion
Advertisement
Add Comment
Please, Sign In to add comment