[GNA] Fix std::bad_alloc for split eltwise (#13336)

This commit is contained in:
Nadezhda Ageeva 2022-10-05 21:29:46 +04:00 committed by GitHub
parent 2b70158047
commit 35b943d21a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -50,7 +50,7 @@ public:
// @brief Returns sizes of split outputs to split the input tensor to aligned parts not greater than the specified size
static std::vector<uint32_t> GetAlignedSplitSizes(uint32_t totalSize, uint32_t maxSplitSize, uint32_t alignment = GNALimitations::inputByteAlignment) {
std::vector<uint32_t> splitSizes;
uint32_t maxAlignedSplitSize = maxSplitSize - maxSplitSize % alignment;
uint32_t maxAlignedSplitSize = std::max(maxSplitSize - maxSplitSize % alignment, alignment);
uint32_t usedSize = 0;
while (usedSize < totalSize) {
uint32_t partSize = std::min(totalSize - usedSize, maxAlignedSplitSize);

View File

@ -149,7 +149,8 @@ const std::vector<ov::Shape> inputShape = {
{1, 67000},
{1, 500000},
{1, 936, 513},
{1, 64, 64, 64}
{1, 64, 64, 64},
{1, 256, 64, 64}
};
INSTANTIATE_TEST_SUITE_P(SplitEltwiseTestSuite, SplitEltwiseTestSuiteFixture,