[IE CLDNN] Fixed memory allocation for case when usm is not available (#1952)

This commit is contained in:
Vladimir Paramuzov 2020-08-26 20:58:21 +03:00 committed by GitHub
parent a072c3b7b6
commit 9618367cff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -186,7 +186,8 @@ memory_impl::ptr primitive_inst::allocate_output() {
_node.get_memory_dependencies(),
alloc_type,
false);
} else if (_network.is_internal() && _node.is_output() && _node.is_type<generic_layer>()) {
} else if (_network.is_internal() && _node.is_output() && _node.is_type<generic_layer>() &&
engine.supports_allocation(allocation_type::usm_device)) {
return engine.allocate_memory(layout, allocation_type::usm_device, net_id);
} else if (_network.is_internal() || (!_node.can_share_buffer()) || _node.can_be_optimized() || _node.is_output()) {
return engine.allocate_memory(layout, alloc_type, net_id);