availableDevices.push_back(dev.first);
IE_SET_METRIC_RETURN(AVAILABLE_DEVICES, availableDevices);
} else if (name == METRIC_KEY(FULL_DEVICE_NAME)) {
- IE_SET_METRIC_RETURN(FULL_DEVICE_NAME, StringRightTrim(device_info.dev_name, "NEO", false));
+ auto deviceName = StringRightTrim(device_info.dev_name, "NEO", false);
+ deviceName += std::string(" (") + (device_info.dev_type == cldnn::device_type::discrete_gpu ? "dGPU" : "iGPU") + ")";
+ IE_SET_METRIC_RETURN(FULL_DEVICE_NAME, deviceName);
} else if (name == METRIC_KEY(SUPPORTED_CONFIG_KEYS)) {
std::vector<std::string> configKeys;
for (auto opt : _impl->m_config.key_config_map)
/// @defgroup cpp_device GPU Device
/// @{
+/// @brief Enumeration of supported device types
+enum class device_type {
+ integrated_gpu = 0,
+ discrete_gpu = 1
+};
+
/// @brief Information about the device properties and capabilities.
struct device_info {
uint32_t cores_count; ///< Number of available HW cores.
std::string dev_name; ///< Device ID string
std::string driver_version; ///< Version of OpenCL driver
+
+ device_type dev_type; ///< Defines type of current GPU device (integrated or discrete)
};
struct device_impl;
return result.back();
}
-bool get_imad_support(const cl::Device& device) {
+static device_type get_device_type(const cl::Device& device) {
+ auto unified_mem = device.getInfo<CL_DEVICE_HOST_UNIFIED_MEMORY>();
+
+ return unified_mem ? device_type::integrated_gpu : device_type::discrete_gpu;
+}
+
+static bool get_imad_support(const cl::Device& device) {
std::string dev_name = device.getInfo<CL_DEVICE_NAME>();
if (dev_name.find("Gen12") != std::string::npos ||
dev_name.find("Xe") != std::string::npos)
return true;
- auto flag = device.getInfo<CL_DEVICE_HOST_UNIFIED_MEMORY>();
- if (flag != 0) {
+ if (get_device_type(device) == device_type::integrated_gpu) {
const std::vector<int> imad_ids = {
0x9A40, 0x9A49, 0x9A59, 0x9AD9,
0x9A60, 0x9A68, 0x9A70, 0x9A78,
device_info_internal::device_info_internal(const cl::Device& device) {
dev_name = device.getInfo<CL_DEVICE_NAME>();
driver_version = device.getInfo<CL_DRIVER_VERSION>();
+ dev_type = get_device_type(device);
compute_units_count = device.getInfo<CL_DEVICE_MAX_COMPUTE_UNITS>();
supports_imad = get_imad_support(device);
supports_immad = false;
- dev_type = static_cast<uint32_t>(device.getInfo<CL_DEVICE_TYPE>());
vendor_id = static_cast<uint32_t>(device.getInfo<CL_DEVICE_VENDOR_ID>());
supports_usm = extensions.find("cl_intel_unified_shared_memory") != std::string::npos;
struct device_info_internal : cldnn::device_info {
std::uint32_t compute_units_count;
- uint32_t dev_type;
uint32_t vendor_id;
uint8_t supports_usm;
bool supports_optimization_hints;
supports_immad,
supports_usm,
dev_name,
- driver_version
+ driver_version,
+ dev_type
};
}
};
<< " profiling: " << std::boolalpha << _configuration.enable_profiling << "\n"
<< " meaningful names: " << std::boolalpha << _configuration.meaningful_kernels_names << "\n"
<< " dump custom program: " << std::boolalpha << _configuration.dump_custom_program << "\n"
- << " device type: " << std::to_string(device_info.dev_type) << "\n"
<< " vendor type: " << std::hex << std::setfill('0') << std::setw(4) << std::right
<< std::to_string(device_info.vendor_id) << "\n"
<< std::dec << std::setfill(' ') << std::right