[GPU] Fixed setInputBlob behavior test (#8787)

This commit is contained in:
Vladimir Paramuzov
2021-11-25 10:59:14 +03:00
committed by GitHub
parent c10a981f1b
commit b75c91d67c
5 changed files with 9 additions and 4 deletions

View File

@@ -96,5 +96,7 @@ std::vector<std::string> disabledTestPatterns() {
R"(smoke_PrePostProcess.*cvt_color_nv12.*)",
// TODO: Issue 71215
R"(smoke_PrePostProcess.*cvt_color_i420.*)",
// Unsupported
R"(smoke_Behavior/InferRequestSetBlobByType.setInputBlobsByType/BlobType=Batched_Device=GPU_Config=().*)",
};
}

View File

@@ -56,13 +56,13 @@ protected:
case FuncTestUtils::BlobType::NV12:
return false;
case FuncTestUtils::BlobType::Batched: {
const std::vector<std::string>& supported_metrics = ie->GetMetric(targetDevice, METRIC_KEY(SUPPORTED_METRICS));
std::vector<std::string> supported_metrics = ie->GetMetric(targetDevice, METRIC_KEY(SUPPORTED_METRICS));
if (std::find(supported_metrics.begin(), supported_metrics.end(),
METRIC_KEY(OPTIMIZATION_CAPABILITIES)) == supported_metrics.end()) {
return false;
}
const std::vector<std::string>& optimization_caps =
std::vector<std::string> optimization_caps =
ie->GetMetric(targetDevice, METRIC_KEY(OPTIMIZATION_CAPABILITIES));
return std::find(optimization_caps.begin(), optimization_caps.end(),
METRIC_VALUE(BATCHED_BLOB)) != optimization_caps.end();

View File

@@ -74,8 +74,10 @@ static std::vector<unsigned char> loadBinaryFromFile(std::string path) {
if (fp) {
fseek(fp, 0, SEEK_END);
auto sz = ftell(fp);
if (sz < 0)
if (sz < 0) {
fclose(fp);
return {};
}
auto nsize = static_cast<size_t>(sz);
fseek(fp, 0, SEEK_SET);

View File

@@ -455,7 +455,7 @@ void ocl_stream::wait_for_events(const std::vector<event::ptr>& events) {
void ocl_stream::sync_events(std::vector<event::ptr> const& deps, bool is_output) {
bool needs_barrier = false;
for (auto& dep : deps) {
auto* ocl_base_ev = dynamic_cast<ocl_base_event*>(dep.get());
auto* ocl_base_ev = downcast<ocl_base_event>(dep.get());
if (ocl_base_ev->get_queue_stamp() > _last_barrier) {
needs_barrier = true;
}

View File

@@ -21,6 +21,7 @@ public:
: parent(prim, prog),
split(this->get_primitive()->split()),
depthwise_sep_opt(false),
transposed(false),
groups(this->get_primitive()->groups) {
support_padding_all(true);
}