[Beignet] [PATCH 2/4] Refine the benchmark tests: copy buffer and image.
Meng Mengmeng
mengmeng.meng at intel.com
Tue Nov 17 19:42:58 PST 2015
Get FPS of the two benchmarks in place of GB/S.
Signed-off-by: Meng Mengmeng <mengmeng.meng at intel.com>
---
benchmark/benchmark_copy_buffer.cpp | 4 ++--
benchmark/benchmark_copy_image.cpp | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/benchmark/benchmark_copy_buffer.cpp b/benchmark/benchmark_copy_buffer.cpp
index 951d8e6..f9efdf3 100644
--- a/benchmark/benchmark_copy_buffer.cpp
+++ b/benchmark/benchmark_copy_buffer.cpp
@@ -45,10 +45,10 @@ double benchmark_copy_buffer_ ##T(void) \
\
double elapsed = time_subtract(&stop, &start, 0); \
\
- return BANDWIDTH(sz * sizeof(M) * 2 * 100, elapsed); \
+ return (double)(100 / (elapsed * 1e-3)); \
} \
\
-MAKE_BENCHMARK_FROM_FUNCTION_KEEP_PROGRAM(benchmark_copy_buffer_ ##T, true, "GB/S");
+MAKE_BENCHMARK_FROM_FUNCTION_KEEP_PROGRAM(benchmark_copy_buffer_ ##T, true, "FPS");
BENCH_COPY_BUFFER(uchar,"bench_copy_buffer_uchar",unsigned char)
BENCH_COPY_BUFFER(ushort,"bench_copy_buffer_ushort",unsigned short)
diff --git a/benchmark/benchmark_copy_image.cpp b/benchmark/benchmark_copy_image.cpp
index ad132d7..a74ed88 100644
--- a/benchmark/benchmark_copy_image.cpp
+++ b/benchmark/benchmark_copy_image.cpp
@@ -60,10 +60,10 @@ double benchmark_copy_image_ ##T(void) \
\
double elapsed = time_subtract(&stop, &start, 0); \
\
- return BANDWIDTH(sz * sizeof(M)*2 * 100, elapsed); \
+ return (double)(100 / (elapsed * 1e-3)); \
} \
\
-MAKE_BENCHMARK_FROM_FUNCTION_KEEP_PROGRAM(benchmark_copy_image_ ##T, true, "GB/S");
+MAKE_BENCHMARK_FROM_FUNCTION_KEEP_PROGRAM(benchmark_copy_image_ ##T, true, "FPS");
BENCH_COPY_IMAGE(uchar,unsigned char,CL_UNSIGNED_INT8)
BENCH_COPY_IMAGE(ushort,unsigned short,CL_UNSIGNED_INT16)
--
1.9.1
More information about the Beignet
mailing list