From 9ca75a115b035290456deef7c328f6c1be5fdfcd Mon Sep 17 00:00:00 2001 From: Ben Sander Date: Fri, 18 Mar 2016 21:28:29 -0500 Subject: [PATCH] Print Pinned or Unpinned in result summary [ROCm/hip-tests commit: 62fb06f54e54416aa7f676a1d6ecfb3c760c334f] --- .../1_Utils/hipBusBandwidth/hipBusBandwidth.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/projects/hip-tests/samples/1_Utils/hipBusBandwidth/hipBusBandwidth.cpp b/projects/hip-tests/samples/1_Utils/hipBusBandwidth/hipBusBandwidth.cpp index 6e875667f9..7e12da9f32 100644 --- a/projects/hip-tests/samples/1_Utils/hipBusBandwidth/hipBusBandwidth.cpp +++ b/projects/hip-tests/samples/1_Utils/hipBusBandwidth/hipBusBandwidth.cpp @@ -10,6 +10,7 @@ bool p_verbose = false; bool p_pinned = true; int p_iterations = 10; +int p_beatsperiteration=1; int p_device = 0; int p_detailed = 0; bool p_async = 0; @@ -189,8 +190,8 @@ void RunBenchmark_H2D(ResultDatabase &resultDB) double speed = (double(sizeToBytes(sizes[sizeIndex])) / (1000*1000)) / t; char sizeStr[256]; sprintf(sizeStr, "%9s", sizeToString(sizes[sizeIndex]).c_str()); - resultDB.AddResult("H2D_Bandwidth", sizeStr, "GB/sec", speed); - resultDB.AddResult("H2D_Time", sizeStr, "ms", t); + resultDB.AddResult(std::string("H2D_Bandwidth") + (p_pinned ? "_Pinned" : "_Unpinned"), sizeStr, "GB/sec", speed); + resultDB.AddResult(std::string("H2D_Time") + (p_pinned ? "_Pinned" : "_Unpinned"), sizeStr, "ms", t); } } @@ -332,8 +333,8 @@ void RunBenchmark_D2H(ResultDatabase &resultDB) double speed = (double(sizeToBytes(sizes[sizeIndex])) / (1000*1000)) / t; char sizeStr[256]; sprintf(sizeStr, "%9s", sizeToString(sizes[sizeIndex]).c_str()); - resultDB.AddResult("D2H_Bandwidth", sizeStr, "GB/sec", speed); - resultDB.AddResult("D2H_Time", sizeStr, "ms", t); + resultDB.AddResult(std::string("D2H_Bandwidth") + (p_pinned ? "_Pinned" : "_Unpinned"), sizeStr, "GB/sec", speed); + resultDB.AddResult(std::string("D2H_Time") + (p_pinned ? "_Pinned" : "_Unpinned"), sizeStr, "ms", t); } //resultDB.AddResult("ReadbackLatencyEstimate", "1-2kb", "ms", times[0]-(times[1]-times[0])/1.); //resultDB.AddResult("ReadbackLatencyEstimate", "1-4kb", "ms", times[0]-(times[2]-times[0])/3.); @@ -484,8 +485,8 @@ void RunBenchmark_Bidir(ResultDatabase &resultDB) double speed = (double(sizeToBytes(sizes[sizeIndex])) / (1000*1000)) / t; char sizeStr[256]; sprintf(sizeStr, "%9s", sizeToString(sizes[sizeIndex]).c_str()); - resultDB.AddResult("Bidir_Bandwidth", sizeStr, "GB/sec", speed); - resultDB.AddResult("Bidir_Time", sizeStr, "ms", t); + resultDB.AddResult(std::string("Bidir_Bandwidth") + (p_pinned ? "_Pinned" : "_Unpinned"), sizeStr, "GB/sec", speed); + resultDB.AddResult(std::string("Bidir_Time") + (p_pinned ? "_Pinned" : "_Unpinned"), sizeStr, "ms", t); } }