From bef8dc7bcc8410aa496405a019dea3aca1a97395 Mon Sep 17 00:00:00 2001 From: Ben Sander Date: Mon, 14 Mar 2016 23:02:49 -0500 Subject: [PATCH] print device config info [ROCm/hip commit: 70c5f5e3f506d6b77987b9abe75afd88871e5bcf] --- .../1_Utils/hipBusBandwidth/hipBusBandwidth.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/projects/hip/samples/1_Utils/hipBusBandwidth/hipBusBandwidth.cpp b/projects/hip/samples/1_Utils/hipBusBandwidth/hipBusBandwidth.cpp index 88d547e2c5..a43bee77e1 100644 --- a/projects/hip/samples/1_Utils/hipBusBandwidth/hipBusBandwidth.cpp +++ b/projects/hip/samples/1_Utils/hipBusBandwidth/hipBusBandwidth.cpp @@ -490,6 +490,14 @@ int parseInt(const char *str, int *output) return !strlen(next); } + +void printConfig() { + hipDeviceProp_t props; + hipGetDeviceProperties(&props, p_device); + + printf ("Device:%s Mem=%.1fGB #CUs=%d Freq=%.0fMhz Pinned=%s\n", props.name, props.totalGlobalMem/1024.0/1024.0/1024.0, props.multiProcessorCount, props.clockRate/1000.0, p_pinned ? "YES" : "NO"); +} + void help() { printf ("Usage: hipBusBandwidth [OPTIONS]\n"); printf (" --iterations, -i : Number of copy iterations to run.\n"); @@ -560,6 +568,8 @@ int main(int argc, char *argv[]) { parseStandardArguments(argc, argv); + printConfig(); + if (p_h2d) { ResultDatabase resultDB; RunBenchmark_H2D(resultDB);