Skip to content
Permalink
Browse files

client: AMD decided to put the more descriptive version of the GPU na…

…me in a custom extension, so use the custom attribute to get the board name.
  • Loading branch information
romw committed Dec 19, 2015
1 parent 7fe2e6a commit a6ca46aacca578f605c246ad0fc421ed42c9a54c
Showing with 27 additions and 0 deletions.
  1. +18 −0 client/gpu_opencl.cpp
  2. +9 −0 lib/cl_boinc.h
@@ -860,6 +860,24 @@ cl_int COPROCS::get_opencl_info(
return ciErrNum;
}

// Nvidia Specific Extensions

// AMD Specific Extensions
if (strstr(prop.extensions, "cl_amd_device_attribute_query") != NULL) {

ciErrNum = (*__clGetDeviceInfo)(prop.device_id, CL_DEVICE_BOARD_NAME_AMD, sizeof(prop.name), prop.name, NULL);
if (ciErrNum != CL_SUCCESS) {
snprintf(buf, sizeof(buf),
"clGetDeviceInfo failed to get AMD Board Name for device %d",
(int)device_index
);
warnings.push_back(buf);
return ciErrNum;
}

}


return CL_SUCCESS;
}

@@ -193,6 +193,15 @@ typedef cl_bitfield cl_command_queue_properties;
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF 0x103C
#define CL_DEVICE_OPENCL_C_VERSION 0x103D

// Nvidia Specific Extensions


// AMD Specific Extensions
#ifndef CL_DEVICE_BOARD_NAME_AMD
#define CL_DEVICE_BOARD_NAME_AMD 0x4038
#endif


#ifdef __cplusplus
extern "C" {
#endif

0 comments on commit a6ca46a

Please sign in to comment.
You can’t perform that action at this time.