From a922be9270496de95b8c8a4ec7923dd0cb50f184 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 6 Jan 2015 14:13:21 +0500 Subject: Cycles: Repot CPU and CUDA capabilities to system info operator For CPU it gives available instructions set (SSE, AVX and so). For GPU CUDA it reports most of the attribute values returned by cuDeviceGetAttribute(). Ideally we need to only use set of those which are driver-specific (so we don't clutter system info with values which we can get from GPU specifications and be sure they stay the same because driver can't affect on them). --- intern/cycles/device/device.cpp | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'intern/cycles/device/device.cpp') diff --git a/intern/cycles/device/device.cpp b/intern/cycles/device/device.cpp index e6e6befd72c..3a33b8fb68b 100644 --- a/intern/cycles/device/device.cpp +++ b/intern/cycles/device/device.cpp @@ -265,5 +265,28 @@ vector& Device::available_devices() return devices; } -CCL_NAMESPACE_END +string Device::device_capabilities() +{ + string capabilities = "CPU device capabilities: "; + capabilities += device_cpu_capabilities() + "\n"; +#ifdef WITH_CUDA + if(device_cuda_init()) { + capabilities += "\nCUDA device capabilities:\n"; + capabilities += device_cuda_capabilities(); + } +#endif + +#ifdef WITH_OPENCL + /* TODO(sergey): Needs proper usable implementation. */ + /* + if(device_opencl_init()) { + capabilities += "\nOpenCL device capabilities:\n"; + capabilities += device_opencl_capabilities(); + } + */ +#endif + return capabilities; +} + +CCL_NAMESPACE_END -- cgit v1.2.3