Skip to content

Commit

Permalink
[GPU] More test for weightless model cache
Browse files Browse the repository at this point in the history
  • Loading branch information
isanghao committed Oct 31, 2024
1 parent a488aec commit 4bd04da
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/plugins/intel_gpu/tests/functional/behavior/model_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,22 @@ void CheckWeightlessCacheAccuracy::run() {
auto new_out = new_req.get_tensor(res);
ov::test::utils::compare(orig_out, new_out);
}

{
// for functionality check of non-weightless flow
ov::AnyMap config_without_weightless_cache = { ov::cache_mode(ov::CacheMode::OPTIMIZE_SPEED) };
ov::CompiledModel compiled_model;
OV_ASSERT_NO_THROW(compiled_model = core->compile_model(xml_path, ov::test::utils::DEVICE_GPU, config_without_weightless_cache));

auto ofstr = std::ofstream(cache_path, std::ofstream::binary);
OV_ASSERT_NO_THROW(compiled_model.export_model(ofstr));
ofstr.close();

auto ifstr = std::ifstream(cache_path, std::ifstream::binary);
ov::CompiledModel imported_model;
OV_ASSERT_NO_THROW(imported_model = core->import_model(ifstr, ov::test::utils::DEVICE_GPU, config_without_weightless_cache));
ifstr.close();
}
}

TEST_F(CheckWeightlessCacheAccuracy, ReadConcatSplitAssign) {
Expand Down

0 comments on commit 4bd04da

Please sign in to comment.