openvino icon indicating copy to clipboard operation
openvino copied to clipboard

Remove specific plugin names in shared test case

Open panhaiqi opened this issue 1 year ago • 4 comments

Details:

  • Remove specific plugin names in shared test case
  • Throw exception if device list in both ov::device::priorities() and device name (For example AUTO:GPU,CPU)

Tickets:

  • CVS-130214

panhaiqi avatar Apr 19 '24 04:04 panhaiqi

@sbalandi Please check again, I think there is no reason to extract device list here now.

peterchen-intel avatar Apr 29 '24 02:04 peterchen-intel

@sbalandi Please check again, I think there is no reason to extract device list here now.

yes, I agree with you, but I just realized that this construction is still needed for ov func tests for sw plugins, so maybe we need to keep it, but use something like that:

    std::string::size_type pos = temp_device.find(":", 0);
    if (pos != std::string::npos) {
        target_device = temp_device.substr(0, pos);
        if (target_device == std::string(ov::test::utils::DEVICE_MULTI) ||
            target_device == std::string(ov::test::utils::DEVICE_AUTO) ||
            target_device == std::string(ov::test::utils::DEVICE_HETERO) ||
            target_device == std::string(ov::test::utils::DEVICE_BATCH)) {
            compileModelProperties = {ov::device::priorities(temp_device.substr(++pos, std::string::npos))};
        }
    }


sbalandi avatar Apr 29 '24 10:04 sbalandi

@sbalandi Please check again, I think there is no reason to extract device list here now.

yes, I agree with you, but I just realized that this construction is still needed for ov func tests for sw plugins, so maybe we need to keep it, but use something like that:

    std::string::size_type pos = temp_device.find(":", 0);
    if (pos != std::string::npos) {
        target_device = temp_device.substr(0, pos);
        if (target_device == std::string(ov::test::utils::DEVICE_MULTI) ||
            target_device == std::string(ov::test::utils::DEVICE_AUTO) ||
            target_device == std::string(ov::test::utils::DEVICE_HETERO) ||
            target_device == std::string(ov::test::utils::DEVICE_BATCH)) {
            compileModelProperties = {ov::device::priorities(temp_device.substr(++pos, std::string::npos))};
        }
    }

Need to insert ov::device::priorities() to compileModelProperties instead of replacing it with only one element ov::device::priorities(). Throw exception if there is already ov::device::priorities() in compileModelProperties.

peterchen-intel avatar May 05 '24 12:05 peterchen-intel

    std::string::size_type pos = temp_device.find(":", 0);
    if (pos != std::string::npos) {
        target_device = temp_device.substr(0, pos);
        if (ov::device::priorities.name() is not in compileModelProperties) {
             insert ov::device::priorities(temp_device.substr(++pos, std::string::npos)) to compileModelProperties
        } else {
throw exception/fail the test case with information.
        }
    }

peterchen-intel avatar May 05 '24 14:05 peterchen-intel