[GPU] Minor fix to get correct input layout for dump layer (#19686)

Signed-off-by: Andrew Park <andrew.park@intel.com>
This commit is contained in:
Andrew Kwangwoong Park 2023-09-11 17:21:09 +09:00 committed by GitHub
parent 161ba14796
commit 5604566795
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1331,9 +1331,10 @@ void network::execute_impl(const std::vector<event::ptr>& events) {
"_" + get_iteration_prefix(curr_iter) + "_" + get_iteration_prefix(curr_iter) +
layer_name + "_src" + std::to_string(i); layer_name + "_src" + std::to_string(i);
auto input_mem = get_primitive(inst->id())->dep_memory_ptr(i); auto input_mem = get_primitive(inst->id())->dep_memory_ptr(i);
auto dep = inst->dependencies().at(i);
auto input_layout = dep.first->get_output_layout(dep.second);
GPU_DEBUG_IF(debug_config->dump_layers_binary) { GPU_DEBUG_IF(debug_config->dump_layers_binary) {
// Binary dump : raw // Binary dump : raw
auto input_layout = inst->get_input_layout(i);
auto filename = get_file_path_for_binary_dump(input_layout, name); auto filename = get_file_path_for_binary_dump(input_layout, name);
mem_lock<char, mem_lock_type::read> lock(input_mem, get_stream()); mem_lock<char, mem_lock_type::read> lock(input_mem, get_stream());
@ -1342,7 +1343,7 @@ void network::execute_impl(const std::vector<event::ptr>& events) {
debug_str_for_bin_load += (filename + ","); debug_str_for_bin_load += (filename + ",");
} else { } else {
log_memory_to_file(input_mem, log_memory_to_file(input_mem,
inst->get_input_layout(i), input_layout,
get_stream(), get_stream(),
name, name,
debug_config->dump_layers_raw); debug_config->dump_layers_raw);