[GPU]: Update device architecture to support other vendors (#15232)
This commit is contained in:
parent
52c2efb5e1
commit
82a07845a5
@ -537,7 +537,7 @@ Parameter Plugin::GetMetric(const std::string& name, const std::map<std::string,
|
||||
return decltype(ov::intel_gpu::device_id)::value_type {s.str()};
|
||||
} else if (name == ov::device::architecture) {
|
||||
std::stringstream s;
|
||||
s << "GPU: ";
|
||||
s << "GPU: vendor=0x" << std::hex << device_info.vendor_id << std::dec << " arch=";
|
||||
if (device_info.gfx_ver.major == 0 && device_info.gfx_ver.minor == 0) {
|
||||
s << device_info.dev_name;
|
||||
} else {
|
||||
|
@ -209,7 +209,8 @@ device_info init_device_info(const cl::Device& device) {
|
||||
std::fill_n(std::begin(info.uuid.val), device_uuid::max_uuid_size, 0);
|
||||
}
|
||||
|
||||
bool device_attr_supported = extensions.find("cl_intel_device_attribute_query ") != std::string::npos;
|
||||
bool device_attr_supported = extensions.find("cl_intel_device_attribute_query") != std::string::npos;
|
||||
bool nv_device_attr_supported = extensions.find("cl_nv_device_attribute_query") != std::string::npos;
|
||||
if (device_attr_supported) {
|
||||
info.gfx_ver = parse_version(device.getInfo<CL_DEVICE_IP_VERSION_INTEL>());
|
||||
info.device_id = device.getInfo<CL_DEVICE_ID_INTEL>();
|
||||
@ -224,6 +225,10 @@ device_info init_device_info(const cl::Device& device) {
|
||||
GPU_DEBUG_GET_INSTANCE(debug_config);
|
||||
GPU_DEBUG_IF(debug_config->disable_onednn)
|
||||
info.supports_immad = false;
|
||||
} else if (nv_device_attr_supported) {
|
||||
info.gfx_ver = {static_cast<uint16_t>(device.getInfo<CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV>()),
|
||||
static_cast<uint8_t>(device.getInfo<CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV>()),
|
||||
0};
|
||||
} else {
|
||||
info.gfx_ver = {0, 0, 0};
|
||||
info.device_id = driver_dev_id();
|
||||
|
Loading…
Reference in New Issue
Block a user