[GPU] Fix to access from not allocated memory (#14289)

During constant propagation, unexpected to access not allocated memory in input_layout_inst

Signed-off-by: hyunback <hyunback.kim@intel.com>
This commit is contained in:
hyunback kim 2022-12-05 16:25:00 +09:00 committed by GitHub
parent c636d1dbfc
commit 507585b526
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -683,6 +683,7 @@ void primitive_inst::allocate_internal_buffers(void) {
// check if there is any device mem input
if (engine.supports_allocation(allocation_type::usm_device)) {
for (const auto& dep : inst_deps) {
if (!dep.first->mem_allocated()) continue;
if (dep.first->output_memory().get_allocation_type() == allocation_type::usm_device) {
input_device_mem = true;
break;