2011-04-27 11:58:34 +00:00
|
|
|
/*
|
2013-08-18 14:16:15 +00:00
|
|
|
* Copyright 2011-2013 Blender Foundation
|
2011-04-27 11:58:34 +00:00
|
|
|
*
|
2013-08-18 14:16:15 +00:00
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
|
* You may obtain a copy of the License at
|
2011-04-27 11:58:34 +00:00
|
|
|
*
|
2013-08-18 14:16:15 +00:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2011-04-27 11:58:34 +00:00
|
|
|
*
|
2013-08-18 14:16:15 +00:00
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
* See the License for the specific language governing permissions and
|
2014-12-25 02:50:24 +01:00
|
|
|
* limitations under the License.
|
2011-04-27 11:58:34 +00:00
|
|
|
*/
|
|
|
|
|
|
2020-02-11 18:54:50 +01:00
|
|
|
#ifdef WITH_CUDA
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2020-03-19 09:33:03 +01:00
|
|
|
# include "device/cuda/device_cuda.h"
|
2020-02-12 14:28:29 +01:00
|
|
|
# include "device/device.h"
|
|
|
|
|
# include "device/device_intern.h"
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2020-02-11 18:54:50 +01:00
|
|
|
# include "util/util_logging.h"
|
|
|
|
|
# include "util/util_string.h"
|
2020-02-12 14:05:00 +01:00
|
|
|
# include "util/util_windows.h"
|
2012-09-04 13:29:07 +00:00
|
|
|
|
2020-02-11 18:54:50 +01:00
|
|
|
CCL_NAMESPACE_BEGIN
|
2017-02-14 05:50:29 -05:00
|
|
|
|
2018-11-09 12:01:38 +01:00
|
|
|
bool device_cuda_init()
|
2014-08-05 13:57:50 +06:00
|
|
|
{
|
2020-02-12 14:05:00 +01:00
|
|
|
# ifdef WITH_CUDA_DYNLOAD
|
2014-08-05 13:57:50 +06:00
|
|
|
static bool initialized = false;
|
|
|
|
|
static bool result = false;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2015-03-28 00:15:15 +05:00
|
|
|
if (initialized)
|
2014-08-05 13:57:50 +06:00
|
|
|
return result;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2014-08-05 13:57:50 +06:00
|
|
|
initialized = true;
|
2018-02-06 14:54:18 +01:00
|
|
|
int cuew_result = cuewInit(CUEW_INIT_CUDA);
|
2015-03-28 00:15:15 +05:00
|
|
|
if (cuew_result == CUEW_SUCCESS) {
|
2014-11-16 01:58:55 +05:00
|
|
|
VLOG(1) << "CUEW initialization succeeded";
|
|
|
|
|
if (CUDADevice::have_precompiled_kernels()) {
|
2016-03-12 15:00:06 +05:00
|
|
|
VLOG(1) << "Found precompiled kernels";
|
2014-08-05 13:57:50 +06:00
|
|
|
result = true;
|
2014-11-16 01:58:55 +05:00
|
|
|
}
|
|
|
|
|
else if (cuewCompilerPath() != NULL) {
|
2016-03-12 15:00:06 +05:00
|
|
|
VLOG(1) << "Found CUDA compiler " << cuewCompilerPath();
|
2014-08-05 13:57:50 +06:00
|
|
|
result = true;
|
2014-11-16 01:58:55 +05:00
|
|
|
}
|
|
|
|
|
else {
|
2018-06-12 10:37:51 +02:00
|
|
|
VLOG(1) << "Neither precompiled kernels nor CUDA compiler was found,"
|
2014-11-16 01:58:55 +05:00
|
|
|
<< " unable to use CUDA";
|
|
|
|
|
}
|
2014-08-05 13:57:50 +06:00
|
|
|
}
|
2014-11-16 01:58:55 +05:00
|
|
|
else {
|
|
|
|
|
VLOG(1) << "CUEW initialization failed: "
|
|
|
|
|
<< ((cuew_result == CUEW_ERROR_ATEXIT_FAILED) ? "Error setting up atexit() handler" :
|
|
|
|
|
"Error opening the library");
|
|
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2014-08-05 13:57:50 +06:00
|
|
|
return result;
|
2020-02-12 14:05:00 +01:00
|
|
|
# else /* WITH_CUDA_DYNLOAD */
|
2016-01-14 12:24:09 +05:00
|
|
|
return true;
|
2020-02-12 14:05:00 +01:00
|
|
|
# endif /* WITH_CUDA_DYNLOAD */
|
2014-08-05 13:57:50 +06:00
|
|
|
}
|
|
|
|
|
|
2018-11-29 23:30:17 +01:00
|
|
|
Device *device_cuda_create(DeviceInfo &info, Stats &stats, Profiler &profiler, bool background)
|
2011-04-27 11:58:34 +00:00
|
|
|
{
|
2018-11-29 23:30:17 +01:00
|
|
|
return new CUDADevice(info, stats, profiler, background);
|
2012-01-04 18:06:32 +00:00
|
|
|
}
|
|
|
|
|
|
2017-08-20 22:44:17 +02:00
|
|
|
static CUresult device_cuda_safe_init()
|
2012-01-04 18:06:32 +00:00
|
|
|
{
|
2020-02-12 14:05:00 +01:00
|
|
|
# ifdef _WIN32
|
2017-08-20 22:44:17 +02:00
|
|
|
__try {
|
|
|
|
|
return cuInit(0);
|
|
|
|
|
}
|
|
|
|
|
__except (EXCEPTION_EXECUTE_HANDLER) {
|
|
|
|
|
/* Ignore crashes inside the CUDA driver and hope we can
|
|
|
|
|
* survive even with corrupted CUDA installs. */
|
|
|
|
|
fprintf(stderr, "Cycles CUDA: driver crashed, continuing without CUDA.\n");
|
|
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2017-08-20 22:44:17 +02:00
|
|
|
return CUDA_ERROR_NO_DEVICE;
|
2020-02-12 14:05:00 +01:00
|
|
|
# else
|
2017-08-20 22:44:17 +02:00
|
|
|
return cuInit(0);
|
2020-02-12 14:05:00 +01:00
|
|
|
# endif
|
2017-08-20 22:44:17 +02:00
|
|
|
}
|
2012-01-04 18:06:32 +00:00
|
|
|
|
2017-08-20 22:44:17 +02:00
|
|
|
void device_cuda_info(vector<DeviceInfo> &devices)
|
|
|
|
|
{
|
|
|
|
|
CUresult result = device_cuda_safe_init();
|
2012-11-21 01:00:03 +00:00
|
|
|
if (result != CUDA_SUCCESS) {
|
|
|
|
|
if (result != CUDA_ERROR_NO_DEVICE)
|
2014-08-05 13:57:50 +06:00
|
|
|
fprintf(stderr, "CUDA cuInit: %s\n", cuewErrorString(result));
|
2012-01-04 18:06:32 +00:00
|
|
|
return;
|
2012-11-21 01:00:03 +00:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2017-08-20 22:44:17 +02:00
|
|
|
int count = 0;
|
2012-11-21 01:00:03 +00:00
|
|
|
result = cuDeviceGetCount(&count);
|
|
|
|
|
if (result != CUDA_SUCCESS) {
|
2014-08-05 13:57:50 +06:00
|
|
|
fprintf(stderr, "CUDA cuDeviceGetCount: %s\n", cuewErrorString(result));
|
2012-01-04 18:06:32 +00:00
|
|
|
return;
|
2012-11-21 01:00:03 +00:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-01-09 16:58:01 +00:00
|
|
|
vector<DeviceInfo> display_devices;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-01-04 18:06:32 +00:00
|
|
|
for (int num = 0; num < count; num++) {
|
|
|
|
|
char name[256];
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2017-10-19 11:26:10 +02:00
|
|
|
result = cuDeviceGetName(name, 256, num);
|
|
|
|
|
if (result != CUDA_SUCCESS) {
|
|
|
|
|
fprintf(stderr, "CUDA cuDeviceGetName: %s\n", cuewErrorString(result));
|
2012-01-04 18:06:32 +00:00
|
|
|
continue;
|
2017-10-19 11:26:10 +02:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2016-11-04 14:49:54 +01:00
|
|
|
int major;
|
|
|
|
|
cuDeviceGetAttribute(&major, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR, num);
|
2018-02-17 16:15:07 +01:00
|
|
|
if (major < 3) {
|
2018-02-06 15:19:25 +01:00
|
|
|
VLOG(1) << "Ignoring device \"" << name << "\", this graphics card is no longer supported.";
|
2015-06-20 17:34:12 +02:00
|
|
|
continue;
|
|
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-01-04 18:06:32 +00:00
|
|
|
DeviceInfo info;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-01-04 18:06:32 +00:00
|
|
|
info.type = DEVICE_CUDA;
|
|
|
|
|
info.description = string(name);
|
2015-06-27 15:11:46 +02:00
|
|
|
info.num = num;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2017-11-03 21:28:13 +01:00
|
|
|
info.has_half_images = (major >= 3);
|
2017-10-08 04:32:25 +02:00
|
|
|
info.has_volume_decoupled = false;
|
2020-04-07 19:43:51 +02:00
|
|
|
info.has_adaptive_stop_per_sample = false;
|
2020-05-31 23:49:10 +02:00
|
|
|
info.denoisers = DENOISER_NLM;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2020-06-08 17:16:10 +02:00
|
|
|
/* Check if the device has P2P access to any other device in the system. */
|
|
|
|
|
for (int peer_num = 0; peer_num < count && !info.has_peer_memory; peer_num++) {
|
|
|
|
|
if (num != peer_num) {
|
|
|
|
|
int can_access = 0;
|
|
|
|
|
cuDeviceCanAccessPeer(&can_access, num, peer_num);
|
|
|
|
|
info.has_peer_memory = (can_access != 0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
Cycles: Refactor Device selection to allow individual GPU compute device selection
Previously, it was only possible to choose a single GPU or all of that type (CUDA or OpenCL).
Now, a toggle button is displayed for every device.
These settings are tied to the PCI Bus ID of the devices, so they're consistent across hardware addition and removal (but not when swapping/moving cards).
From the code perspective, the more important change is that now, the compute device properties are stored in the Addon preferences of the Cycles addon, instead of directly in the User Preferences.
This allows for a cleaner implementation, removing the Cycles C API functions that were called by the RNA code to specify the enum items.
Note that this change is neither backwards- nor forwards-compatible, but since it's only a User Preference no existing files are broken.
Reviewers: #cycles, brecht
Reviewed By: #cycles, brecht
Subscribers: brecht, juicyfruit, mib2berlin, Blendify
Differential Revision: https://developer.blender.org/D2338
2016-11-07 02:33:53 +01:00
|
|
|
int pci_location[3] = {0, 0, 0};
|
|
|
|
|
cuDeviceGetAttribute(&pci_location[0], CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID, num);
|
|
|
|
|
cuDeviceGetAttribute(&pci_location[1], CU_DEVICE_ATTRIBUTE_PCI_BUS_ID, num);
|
|
|
|
|
cuDeviceGetAttribute(&pci_location[2], CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID, num);
|
2016-11-22 16:38:37 +01:00
|
|
|
info.id = string_printf("CUDA_%s_%04x:%02x:%02x",
|
|
|
|
|
name,
|
|
|
|
|
(unsigned int)pci_location[0],
|
|
|
|
|
(unsigned int)pci_location[1],
|
|
|
|
|
(unsigned int)pci_location[2]);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2017-10-08 19:08:44 +02:00
|
|
|
/* If device has a kernel timeout and no compute preemption, we assume
|
|
|
|
|
* it is connected to a display and will freeze the display while doing
|
|
|
|
|
* computations. */
|
|
|
|
|
int timeout_attr = 0, preempt_attr = 0;
|
|
|
|
|
cuDeviceGetAttribute(&timeout_attr, CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT, num);
|
|
|
|
|
cuDeviceGetAttribute(&preempt_attr, CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED, num);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2019-06-18 18:30:48 +02:00
|
|
|
/* The CUDA driver reports compute preemption as not being available on
|
|
|
|
|
* Windows 10 even when it is, due to an issue in application profiles.
|
|
|
|
|
* Detect case where we expect it to be available and override. */
|
|
|
|
|
if (preempt_attr == 0 && (major >= 6) && system_windows_version_at_least(10, 17134)) {
|
|
|
|
|
VLOG(1) << "Assuming device has compute preemption on Windows 10.";
|
|
|
|
|
preempt_attr = 1;
|
|
|
|
|
}
|
|
|
|
|
|
2017-10-08 19:08:44 +02:00
|
|
|
if (timeout_attr && !preempt_attr) {
|
2017-10-19 11:26:10 +02:00
|
|
|
VLOG(1) << "Device is recognized as display.";
|
2016-06-03 11:52:08 +02:00
|
|
|
info.description += " (Display)";
|
2012-01-04 18:06:32 +00:00
|
|
|
info.display_device = true;
|
2012-01-09 16:58:01 +00:00
|
|
|
display_devices.push_back(info);
|
|
|
|
|
}
|
2017-10-08 19:08:44 +02:00
|
|
|
else {
|
2019-06-18 18:30:48 +02:00
|
|
|
VLOG(1) << "Device has compute preemption or is not used for display.";
|
2012-01-09 16:58:01 +00:00
|
|
|
devices.push_back(info);
|
2017-10-08 19:08:44 +02:00
|
|
|
}
|
2017-10-19 11:26:10 +02:00
|
|
|
VLOG(1) << "Added device \"" << name << "\" with id \"" << info.id << "\".";
|
2012-01-04 18:06:32 +00:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-01-09 16:58:01 +00:00
|
|
|
if (!display_devices.empty())
|
|
|
|
|
devices.insert(devices.end(), display_devices.begin(), display_devices.end());
|
2011-04-27 11:58:34 +00:00
|
|
|
}
|
|
|
|
|
|
2018-11-09 12:01:38 +01:00
|
|
|
string device_cuda_capabilities()
|
2015-01-06 14:13:21 +05:00
|
|
|
{
|
2017-08-20 22:44:17 +02:00
|
|
|
CUresult result = device_cuda_safe_init();
|
2015-01-06 14:13:21 +05:00
|
|
|
if (result != CUDA_SUCCESS) {
|
|
|
|
|
if (result != CUDA_ERROR_NO_DEVICE) {
|
|
|
|
|
return string("Error initializing CUDA: ") + cuewErrorString(result);
|
|
|
|
|
}
|
2015-06-05 14:13:59 +02:00
|
|
|
return "No CUDA device found\n";
|
2015-01-06 14:13:21 +05:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2015-01-06 14:13:21 +05:00
|
|
|
int count;
|
|
|
|
|
result = cuDeviceGetCount(&count);
|
|
|
|
|
if (result != CUDA_SUCCESS) {
|
|
|
|
|
return string("Error getting devices: ") + cuewErrorString(result);
|
|
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2015-01-06 14:13:21 +05:00
|
|
|
string capabilities = "";
|
|
|
|
|
for (int num = 0; num < count; num++) {
|
|
|
|
|
char name[256];
|
|
|
|
|
if (cuDeviceGetName(name, 256, num) != CUDA_SUCCESS) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
capabilities += string("\t") + name + "\n";
|
|
|
|
|
int value;
|
2020-02-12 14:05:00 +01:00
|
|
|
# define GET_ATTR(attr) \
|
|
|
|
|
{ \
|
|
|
|
|
if (cuDeviceGetAttribute(&value, CU_DEVICE_ATTRIBUTE_##attr, num) == CUDA_SUCCESS) { \
|
|
|
|
|
capabilities += string_printf("\t\tCU_DEVICE_ATTRIBUTE_" #attr "\t\t\t%d\n", value); \
|
|
|
|
|
} \
|
2015-01-06 14:13:21 +05:00
|
|
|
} \
|
2020-02-12 14:05:00 +01:00
|
|
|
(void)0
|
2015-01-06 14:13:21 +05:00
|
|
|
/* TODO(sergey): Strip all attributes which are not useful for us
|
|
|
|
|
* or does not depend on the driver.
|
|
|
|
|
*/
|
|
|
|
|
GET_ATTR(MAX_THREADS_PER_BLOCK);
|
|
|
|
|
GET_ATTR(MAX_BLOCK_DIM_X);
|
|
|
|
|
GET_ATTR(MAX_BLOCK_DIM_Y);
|
|
|
|
|
GET_ATTR(MAX_BLOCK_DIM_Z);
|
|
|
|
|
GET_ATTR(MAX_GRID_DIM_X);
|
|
|
|
|
GET_ATTR(MAX_GRID_DIM_Y);
|
|
|
|
|
GET_ATTR(MAX_GRID_DIM_Z);
|
|
|
|
|
GET_ATTR(MAX_SHARED_MEMORY_PER_BLOCK);
|
|
|
|
|
GET_ATTR(SHARED_MEMORY_PER_BLOCK);
|
|
|
|
|
GET_ATTR(TOTAL_CONSTANT_MEMORY);
|
|
|
|
|
GET_ATTR(WARP_SIZE);
|
|
|
|
|
GET_ATTR(MAX_PITCH);
|
|
|
|
|
GET_ATTR(MAX_REGISTERS_PER_BLOCK);
|
|
|
|
|
GET_ATTR(REGISTERS_PER_BLOCK);
|
|
|
|
|
GET_ATTR(CLOCK_RATE);
|
|
|
|
|
GET_ATTR(TEXTURE_ALIGNMENT);
|
|
|
|
|
GET_ATTR(GPU_OVERLAP);
|
|
|
|
|
GET_ATTR(MULTIPROCESSOR_COUNT);
|
|
|
|
|
GET_ATTR(KERNEL_EXEC_TIMEOUT);
|
|
|
|
|
GET_ATTR(INTEGRATED);
|
|
|
|
|
GET_ATTR(CAN_MAP_HOST_MEMORY);
|
|
|
|
|
GET_ATTR(COMPUTE_MODE);
|
|
|
|
|
GET_ATTR(MAXIMUM_TEXTURE1D_WIDTH);
|
|
|
|
|
GET_ATTR(MAXIMUM_TEXTURE2D_WIDTH);
|
|
|
|
|
GET_ATTR(MAXIMUM_TEXTURE2D_HEIGHT);
|
|
|
|
|
GET_ATTR(MAXIMUM_TEXTURE3D_WIDTH);
|
|
|
|
|
GET_ATTR(MAXIMUM_TEXTURE3D_HEIGHT);
|
|
|
|
|
GET_ATTR(MAXIMUM_TEXTURE3D_DEPTH);
|
|
|
|
|
GET_ATTR(MAXIMUM_TEXTURE2D_LAYERED_WIDTH);
|
|
|
|
|
GET_ATTR(MAXIMUM_TEXTURE2D_LAYERED_HEIGHT);
|
|
|
|
|
GET_ATTR(MAXIMUM_TEXTURE2D_LAYERED_LAYERS);
|
|
|
|
|
GET_ATTR(MAXIMUM_TEXTURE2D_ARRAY_WIDTH);
|
|
|
|
|
GET_ATTR(MAXIMUM_TEXTURE2D_ARRAY_HEIGHT);
|
|
|
|
|
GET_ATTR(MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES);
|
|
|
|
|
GET_ATTR(SURFACE_ALIGNMENT);
|
|
|
|
|
GET_ATTR(CONCURRENT_KERNELS);
|
|
|
|
|
GET_ATTR(ECC_ENABLED);
|
|
|
|
|
GET_ATTR(TCC_DRIVER);
|
|
|
|
|
GET_ATTR(MEMORY_CLOCK_RATE);
|
|
|
|
|
GET_ATTR(GLOBAL_MEMORY_BUS_WIDTH);
|
|
|
|
|
GET_ATTR(L2_CACHE_SIZE);
|
|
|
|
|
GET_ATTR(MAX_THREADS_PER_MULTIPROCESSOR);
|
|
|
|
|
GET_ATTR(ASYNC_ENGINE_COUNT);
|
|
|
|
|
GET_ATTR(UNIFIED_ADDRESSING);
|
|
|
|
|
GET_ATTR(MAXIMUM_TEXTURE1D_LAYERED_WIDTH);
|
|
|
|
|
GET_ATTR(MAXIMUM_TEXTURE1D_LAYERED_LAYERS);
|
|
|
|
|
GET_ATTR(CAN_TEX2D_GATHER);
|
|
|
|
|
GET_ATTR(MAXIMUM_TEXTURE2D_GATHER_WIDTH);
|
|
|
|
|
GET_ATTR(MAXIMUM_TEXTURE2D_GATHER_HEIGHT);
|
|
|
|
|
GET_ATTR(MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE);
|
|
|
|
|
GET_ATTR(MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE);
|
|
|
|
|
GET_ATTR(MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE);
|
|
|
|
|
GET_ATTR(TEXTURE_PITCH_ALIGNMENT);
|
|
|
|
|
GET_ATTR(MAXIMUM_TEXTURECUBEMAP_WIDTH);
|
|
|
|
|
GET_ATTR(MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH);
|
|
|
|
|
GET_ATTR(MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS);
|
|
|
|
|
GET_ATTR(MAXIMUM_SURFACE1D_WIDTH);
|
|
|
|
|
GET_ATTR(MAXIMUM_SURFACE2D_WIDTH);
|
|
|
|
|
GET_ATTR(MAXIMUM_SURFACE2D_HEIGHT);
|
|
|
|
|
GET_ATTR(MAXIMUM_SURFACE3D_WIDTH);
|
|
|
|
|
GET_ATTR(MAXIMUM_SURFACE3D_HEIGHT);
|
|
|
|
|
GET_ATTR(MAXIMUM_SURFACE3D_DEPTH);
|
|
|
|
|
GET_ATTR(MAXIMUM_SURFACE1D_LAYERED_WIDTH);
|
|
|
|
|
GET_ATTR(MAXIMUM_SURFACE1D_LAYERED_LAYERS);
|
|
|
|
|
GET_ATTR(MAXIMUM_SURFACE2D_LAYERED_WIDTH);
|
|
|
|
|
GET_ATTR(MAXIMUM_SURFACE2D_LAYERED_HEIGHT);
|
|
|
|
|
GET_ATTR(MAXIMUM_SURFACE2D_LAYERED_LAYERS);
|
|
|
|
|
GET_ATTR(MAXIMUM_SURFACECUBEMAP_WIDTH);
|
|
|
|
|
GET_ATTR(MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH);
|
|
|
|
|
GET_ATTR(MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS);
|
|
|
|
|
GET_ATTR(MAXIMUM_TEXTURE1D_LINEAR_WIDTH);
|
|
|
|
|
GET_ATTR(MAXIMUM_TEXTURE2D_LINEAR_WIDTH);
|
|
|
|
|
GET_ATTR(MAXIMUM_TEXTURE2D_LINEAR_HEIGHT);
|
|
|
|
|
GET_ATTR(MAXIMUM_TEXTURE2D_LINEAR_PITCH);
|
|
|
|
|
GET_ATTR(MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH);
|
|
|
|
|
GET_ATTR(MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT);
|
|
|
|
|
GET_ATTR(COMPUTE_CAPABILITY_MAJOR);
|
|
|
|
|
GET_ATTR(COMPUTE_CAPABILITY_MINOR);
|
|
|
|
|
GET_ATTR(MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH);
|
|
|
|
|
GET_ATTR(STREAM_PRIORITIES_SUPPORTED);
|
|
|
|
|
GET_ATTR(GLOBAL_L1_CACHE_SUPPORTED);
|
|
|
|
|
GET_ATTR(LOCAL_L1_CACHE_SUPPORTED);
|
|
|
|
|
GET_ATTR(MAX_SHARED_MEMORY_PER_MULTIPROCESSOR);
|
|
|
|
|
GET_ATTR(MAX_REGISTERS_PER_MULTIPROCESSOR);
|
|
|
|
|
GET_ATTR(MANAGED_MEMORY);
|
|
|
|
|
GET_ATTR(MULTI_GPU_BOARD);
|
|
|
|
|
GET_ATTR(MULTI_GPU_BOARD_GROUP_ID);
|
2020-02-12 14:05:00 +01:00
|
|
|
# undef GET_ATTR
|
2015-01-06 14:13:21 +05:00
|
|
|
capabilities += "\n";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return capabilities;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CCL_NAMESPACE_END
|
2020-02-11 18:54:50 +01:00
|
|
|
|
|
|
|
|
#endif
|