如何客观评估GPU速度(没看到GPU比CPU快)
我用hotball给出的GPU测试代码2(second_cuda.cu)在一台HP Z800的工作站(CENTOS5.4 32G内存,TESLA C1060,FX1800显示卡各一块)上编译通过,运行时候发现计算耗时不稳定。
$ ./a.out
Max error: 1.19209e-07 Average error: 4.22521e-08
Time used: 0.1100 (18.18 GFLOPS)
$ ./a.out
Max error: 1.19209e-07 Average error: 4.22521e-08
Time used: 0.0900 (22.22 GFLOPS)
$ ./a.out
Max error: 1.19209e-07 Average error: 4.22521e-08
Time used: 0.1100 (18.18 GFLOPS)
$ ./a.out
Max error: 1.19209e-07 Average error: 4.22521e-08
Time used: 0.0700 (28.57 GFLOPS)
$ ./a.out
Max error: 1.19209e-07 Average error: 4.22521e-08
Time used: 0.0700 (28.57 GFLOPS)
另外编写了简单的cuda程序,发现计时比较,并不比CPU算得快啊
哪位支持一下,推荐个小示范程序,能体现gpu比cpu算得快好吗
谢谢