[GPU] Don't add crop for unused out ports of Split op (#24877)

### Details:
- Currently we insert crop primitive for each out port of
(Variadic)Split ops, and if some of them are not used we just waste some
execution time. This patch modifies converter for Split to process ports
with real users only.
This commit is contained in:
Vladimir Paramuzov 2024-06-07 09:53:13 +04:00 committed by GitHub
parent b8ced3dfc7
commit 0cc051debb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -65,6 +65,11 @@ static void CreateCommonSplitOp(ProgramBuilder& p, const std::shared_ptr<ov::Nod
}
for (size_t i = 0; i < op->get_output_size(); i++) {
const auto& users = op->get_output_target_inputs(i);
// don't add crop primitive if port is not used by anyone
if (users.size() == 0)
continue;
auto cropPrim = cldnn::crop(get_layer_name(i),
inputs,
cldnn::tensor(1),