Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ OV_CONFIG_RELEASE_OPTION(ov::internal, exclusive_async_requests, false, "")
OV_CONFIG_RELEASE_OPTION(ov::internal, query_model_ratio, 1.0f, "")
OV_CONFIG_RELEASE_OPTION(ov, cache_mode, ov::CacheMode::OPTIMIZE_SPEED, "Cache mode defines the trade-off between the model compilation time and the disk space required for the cache")
OV_CONFIG_RELEASE_OPTION(ov, cache_encryption_callbacks, ov::EncryptionCallbacks{}, "Callbacks used to encrypt/decrypt the model")
OV_CONFIG_RELEASE_OPTION(ov::log, level, ov::log::Level::NO, "Controls GPU plugin log verbosity")
OV_CONFIG_RELEASE_OPTION(ov::hint, dynamic_quantization_group_size, 0, "Dynamic quantization group size")
OV_CONFIG_RELEASE_OPTION(ov::intel_gpu::hint, dynamic_quantization_group_size_max, UINT64_MAX, "Maximum dynamic quantization group size. When group_size is set as a higher value than this number, dynamic quantization will be turned off")
OV_CONFIG_RELEASE_OPTION(ov::hint, kv_cache_precision, ov::element::dynamic, "")
Expand Down
1 change: 1 addition & 0 deletions src/plugins/intel_gpu/src/plugin/compiled_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ ov::Any CompiledModel::get_property(const std::string& name) const {
ov::PropertyName{ov::hint::kv_cache_precision.name(), PropertyMutability::RO},
ov::PropertyName{ov::device::id.name(), PropertyMutability::RO},
ov::PropertyName{ov::execution_devices.name(), PropertyMutability::RO},
ov::PropertyName{ov::log::level.name(), PropertyMutability::RO},
};
} else if (name == ov::model_name) {
return decltype(ov::model_name)::value_type {m_model_name};
Expand Down
42 changes: 41 additions & 1 deletion src/plugins/intel_gpu/src/plugin/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,43 @@ ov::Any Plugin::get_metric(const std::string& name, const ov::AnyMap& options) c
info.bus = device_info.pci_info.pci_bus;
info.device = device_info.pci_info.pci_device;
info.function = device_info.pci_info.pci_function;
return decltype(ov::device::pci_info)::value_type {info};
return decltype(ov::device::pci_info)::value_type{info};
} else if (name == ov::optimal_number_of_infer_requests) {
auto config_it = m_configs_map.find(device_id);
if (config_it == m_configs_map.end()) {
config_it = m_configs_map.find(m_default_device_id);
}
OPENVINO_ASSERT(config_it != m_configs_map.end(), "[GPU] get_property: Couldn't find config for GPU with id ", device_id);
const auto& config = config_it->second;
auto num_streams = config.get_num_streams();
unsigned int optimal = 1;
if (num_streams > 0) {
optimal = static_cast<unsigned int>(num_streams);
} else {
auto estimated_streams = std::max<int32_t>(device_info.num_ccs, 2);
optimal = static_cast<unsigned int>(estimated_streams);
}
if (config.get_performance_mode() != ov::hint::PerformanceMode::LATENCY) {
optimal *= 2;
}
optimal = std::max(1u, optimal);
return decltype(ov::optimal_number_of_infer_requests)::value_type{optimal};
} else if (name == ov::model_name) {
return decltype(ov::model_name)::value_type{};
} else if (name == ov::execution_devices) {
decltype(ov::execution_devices)::value_type execution_devices;
auto contexts = get_default_contexts();
auto ctx_it = contexts.find(device_id);
if (ctx_it != contexts.end()) {
execution_devices.emplace_back(ctx_it->second->get_device_name());
} else {
auto execution_device = get_device_name();
if (!device_id.empty()) {
execution_device += "." + device_id;
}
execution_devices.emplace_back(execution_device);
}
return execution_devices;
} else {
OPENVINO_THROW("Unsupported metric key ", name);
}
Expand All @@ -682,6 +718,9 @@ std::vector<ov::PropertyName> Plugin::get_supported_properties() const {
// Metrics
ov::PropertyName{ov::supported_properties.name(), PropertyMutability::RO},
ov::PropertyName{ov::available_devices.name(), PropertyMutability::RO},
ov::PropertyName{ov::execution_devices.name(), PropertyMutability::RO},
ov::PropertyName{ov::model_name.name(), PropertyMutability::RO},
ov::PropertyName{ov::optimal_number_of_infer_requests.name(), PropertyMutability::RO},
ov::PropertyName{ov::range_for_async_infer_requests.name(), PropertyMutability::RO},
ov::PropertyName{ov::range_for_streams.name(), PropertyMutability::RO},
ov::PropertyName{ov::optimal_batch_size.name(), PropertyMutability::RO},
Expand Down Expand Up @@ -715,6 +754,7 @@ std::vector<ov::PropertyName> Plugin::get_supported_properties() const {
ov::PropertyName{ov::cache_mode.name(), PropertyMutability::RW},
ov::PropertyName{ov::hint::performance_mode.name(), PropertyMutability::RW},
ov::PropertyName{ov::hint::execution_mode.name(), PropertyMutability::RW},
ov::PropertyName{ov::log::level.name(), PropertyMutability::RW},
ov::PropertyName{ov::compilation_num_threads.name(), PropertyMutability::RW},
ov::PropertyName{ov::num_streams.name(), PropertyMutability::RW},
ov::PropertyName{ov::hint::num_requests.name(), PropertyMutability::RW},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,14 @@ INSTANTIATE_TEST_SUITE_P(
smoke_OVCheckGetSupportedROMetricsPropsTests,
OVCheckGetSupportedROMetricsPropsTests,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_GPU),
::testing::ValuesIn(OVCheckGetSupportedROMetricsPropsTests::configureProperties(
{ ov::device::uuid.name(), ov::device::luid.name(), ov::device::gops.name(), ov::device::type.name(), ov::device::full_name.name() }))),
::testing::ValuesIn(OVCheckGetSupportedROMetricsPropsTests::configureProperties({ov::device::uuid.name(),
ov::device::luid.name(),
ov::device::gops.name(),
ov::device::type.name(),
ov::device::full_name.name(),
ov::execution_devices.name(),
ov::model_name.name(),
ov::optimal_number_of_infer_requests.name()}))),
OVCheckGetSupportedROMetricsPropsTests::getTestCaseName);

INSTANTIATE_TEST_SUITE_P(nightly_gpuOVCheckChangePropComplieModleGetPropTests_DEVICE_ID,
Expand All @@ -76,7 +82,15 @@ INSTANTIATE_TEST_SUITE_P(
OVCheckSetSupportedRWMetricsPropsTests,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_GPU),
::testing::ValuesIn(OVCheckSetSupportedRWMetricsPropsTests::getRWMandatoryPropertiesValues(
{ov::hint::execution_mode.name()}))),
{ov::hint::execution_mode.name(), ov::log::level.name()}))),
OVCheckSetSupportedRWMetricsPropsTests::getTestCaseName);

INSTANTIATE_TEST_SUITE_P(
smoke_OVCheckSetSupportedRWOptionalMetricsPropsTests,
OVCheckSetSupportedRWMetricsPropsTests,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_GPU),
::testing::ValuesIn(OVCheckSetSupportedRWMetricsPropsTests::getRWOptionalPropertiesValues(
{ov::log::level.name()}))),
OVCheckSetSupportedRWMetricsPropsTests::getTestCaseName);

//
Expand Down
Loading