Skip to content

Commit cf4241b

Browse files
Fine-tune the conditions
1 parent 3cc82bd commit cf4241b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/plugins/intel_gpu/src/runtime/memory_pool.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ memory::ptr memory_pool::get_from_non_padded_pool(const layout& layout,
187187
feature_aligned) &&
188188
#ifdef ENABLE_ONEDNN_FOR_GPU
189189
(!format::is_blocked(layout.format) || feature_aligned ||
190-
(mem_layout.format == layout.format && mem_layout.feature() == layout.feature())) &&
190+
(mem_layout.format == layout.format && mem_layout.feature() % layout.feature() == 0)) &&
191191
#endif // ENABLE_ONEDNN_FOR_GPU
192192
!has_conflict(it->second._users, restrictions))) {
193193
it->second._users.insert(memory_user(MEM_USER(unique_id, network_id, prim_id, layout_bytes_count)));
@@ -234,7 +234,7 @@ memory::ptr memory_pool::get_from_padded_pool(const layout& layout,
234234
feature_aligned) &&
235235
#ifdef ENABLE_ONEDNN_FOR_GPU
236236
(!format::is_blocked(layout.format) || feature_aligned ||
237-
mem_layout.feature() == layout.feature()) &&
237+
mem_layout.feature() % layout.feature() == 0) &&
238238
#endif // ENABLE_ONEDNN_FOR_GPU
239239
// TODO: check if this condition always correct
240240
layout.feature() <= mem_layout.feature() &&

0 commit comments

Comments
 (0)