From 65c492edf6ded8b259febb71ae92b3aa10607494 Mon Sep 17 00:00:00 2001 From: Cedric Nugteren Date: Fri, 22 Sep 2017 21:35:32 +0200 Subject: Added OpenCL properties printing to the diagnostics helper --- CHANGELOG | 1 + test/diagnostics.cpp | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index a62c040e..32c0be3a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,7 @@ Development (next version) - The tuners can now distinguish between different AMD GPU board names of the same architecture - The tuners can now use particle-swarm optimisation to search more efficiently (thanks to 'mcian') - Further improved compilation time of database.cpp +- Added a small diagnostics helper executable - Various minor fixes and enhancements - Added tuned parameters for various devices (see README) - Added non-BLAS routines: diff --git a/test/diagnostics.cpp b/test/diagnostics.cpp index 65131d3b..6872ed6f 100644 --- a/test/diagnostics.cpp +++ b/test/diagnostics.cpp @@ -66,6 +66,17 @@ void OpenCLDiagnostics(int argc, char *argv[]) { printf("* Device vendor %s\n", device_vendor.c_str()); printf("* Device architecture %s\n", device_architecture.c_str()); + // Selected OpenCL properties + printf("\n --- OpenCL device properties:\n"); + printf("* Max work group size %zu\n", device.MaxWorkGroupSize()); + printf("* Max work item dimensions %zu\n", device.MaxWorkItemDimensions()); + const auto max_work_item_sizes = device.MaxWorkItemSizes(); + for (auto i = size_t{0}; i < max_work_item_sizes.size(); ++i) { + printf("* - Max work item size #%zu %zu\n", i, max_work_item_sizes[i]); + } + printf("* Local memory size %zuKB\n", device.LocalMemSize()); + printf("* Extensions:\n%s\n", device.Capabilities().c_str()); + // Simple OpenCL benchmarking constexpr auto kNumRuns = 20; printf("\n --- Some OpenCL library benchmarks (functions from clpp11.h):\n"); -- cgit v1.2.3