diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2017-09-22 21:35:32 +0200 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2017-09-22 21:35:32 +0200 |
commit | 65c492edf6ded8b259febb71ae92b3aa10607494 (patch) | |
tree | a4298c378b51776dd4695b2646d6357e0d711312 /test/diagnostics.cpp | |
parent | 2ef6578961bb50377bac0f030a5d7158f6a22ea5 (diff) |
Added OpenCL properties printing to the diagnostics helper
Diffstat (limited to 'test/diagnostics.cpp')
-rw-r--r-- | test/diagnostics.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
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"); |