【发布时间】:2011-04-28 17:46:36
【问题描述】:
我正在尝试计算 GPU 和 CPU 的 FLOP,我从 here 获得了源代码
我将它重命名为 cudaflops.cu 并用这个 makefile 编译它
################################################################################
#
# Build script for project
#
################################################################################
# Add source files here
EXECUTABLE := benchmark
# Cuda source files (compiled with cudacc)
CUFILES := cudaflops.cu
# C/C++ source files (compiled with gcc / c++)
CCFILES :=
################################################################################
# Rules and targets
include ../../common/common.mk
#########################################
Tt 工作正常,结果为 367 GFlOPs
但是现在,我不知道在 CPU 中测试这个源,我读到 this 说源可以在 CPU 上运行。
那么修改后的makefile怎么做呢??
【问题讨论】:
-
不管你怎么做,都会涉及到查看../../common/common.mk
-
这是否意味着我必须修改 common.mk??