CUFFT的计算性能 [英] Calculating performance of CUFFT

查看:23
本文介绍了CUFFT的计算性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在划分为多个 GPU 的块 (N*N/p) 上运行 CUFFT,我对计算性能有疑问.首先,关于我是如何做到的:

I am running CUFFT on chunks (N*N/p) divided in multiple GPUs, and I have a question regarding calculating the performance. First, a bit about how I am doing it:

  1. 向每个 GPU 发送 N*N/p 个块
  2. 对 p 个 GPU 中的每一行进行批量 1-D FFT
  3. 将 N*N/p 个块返回主机 - 对整个数据集执行转置
  4. 同上步骤 1
  5. 同上第 2 步

Gflops = ( 1e-9 * 5 * N * N *lg(N*N) )/执行时间

执行时间计算如下:

执行时间 = Sum(每个 GPU 的行和列 FFT 的 memcpyHtoD + 内核 + memcpyDtoH 时间)

这是在多个 GPU 上评估 CUFFT 性能的正确方法吗?有没有其他方法可以代表 FFT 的性能?

Is this the correct way to evaluate CUFFT performance on multiple GPUs? Is there any other way I could represent the performance of FFT?

谢谢.

推荐答案

如果你在做一个复杂的变换,操作计数是正确的(对于一个实值变换应该是 2.5 N log2(N)),但是 GFLOP公式不正确.在并行、多处理器操作中,通常的吞吐量计算是

If you are doing a complex transform, the operation count is correct (it should be 2.5 N log2(N) for a real valued transform), but the GFLOP formula is incorrect. In a parallel, multiprocessor operation the usual calculation of throughput is

operation count / wall clock time

在您的情况下,假设 GPU 并行运行,请测量执行时间的挂钟时间(即整个操作花费了多长时间),或使用此:

In your case, presuming the GPUs are operating in parallel, either measure the wall clock time (ie. how long the whole operation took) for the execution time, or use this:

execution time = max(memcpyHtoD + kernel + memcpyDtoH times for row and col FFT for each GPU)

就目前而言,您的计算代表了串行执行时间.考虑到多 GPU 方案的开销,我预计您获得的计算性能数字将低于在单个 GPU 上完成的等效转换.

As it stands, your calculation represents the serial execution time. Allowing for the overheads from the multigpu scheme, I would expect that the calculated performance numbers you are getting will be lower than the equivalent transform done on a single GPU.

这篇关于CUFFT的计算性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆