[GPU] Show freed constants' name on Verbose memory dump (#8354)
This commit is contained in:
parent
e19a6dc57d
commit
32052a8f92
@ -823,6 +823,10 @@ void network::transfer_memory_to_device(std::shared_ptr<primitive_inst> instance
|
|||||||
// Allocate and transfer memory
|
// Allocate and transfer memory
|
||||||
auto device_mem = inst_mem.get_engine()->allocate_memory(inst_mem.get_layout(), allocation_type::usm_device, false);
|
auto device_mem = inst_mem.get_engine()->allocate_memory(inst_mem.get_layout(), allocation_type::usm_device, false);
|
||||||
device_mem->copy_from(get_stream(), inst_mem);
|
device_mem->copy_from(get_stream(), inst_mem);
|
||||||
|
GPU_DEBUG_GET_INSTANCE(debug_config);
|
||||||
|
GPU_DEBUG_IF(debug_config->verbose >= 2) {
|
||||||
|
GPU_DEBUG_COUT << "[" << node.id() << ": constant]" << std::endl;
|
||||||
|
}
|
||||||
_memory_pool->release_memory(&inst_mem, node.id(), get_id());
|
_memory_pool->release_memory(&inst_mem, node.id(), get_id());
|
||||||
instance->set_output_memory(device_mem);
|
instance->set_output_memory(device_mem);
|
||||||
}
|
}
|
||||||
|
@ -623,6 +623,9 @@ void program::transfer_memory_to_device() {
|
|||||||
auto device_mem = mem.get_engine()->allocate_memory(data_node_layout, allocation_type::usm_device, false);
|
auto device_mem = mem.get_engine()->allocate_memory(data_node_layout, allocation_type::usm_device, false);
|
||||||
device_mem->copy_from(get_stream(), mem);
|
device_mem->copy_from(get_stream(), mem);
|
||||||
data_node.attach_memory(device_mem);
|
data_node.attach_memory(device_mem);
|
||||||
|
GPU_DEBUG_IF(debug_config->verbose >= 2) {
|
||||||
|
GPU_DEBUG_COUT << "[" << data_node.id() << ": constant]" << std::endl;
|
||||||
|
}
|
||||||
const_cast<memory::ptr&>(data_node.get_primitive()->mem).reset();
|
const_cast<memory::ptr&>(data_node.get_primitive()->mem).reset();
|
||||||
// TODO: Do we need finish call here? Maybe call it in network::execute() ?
|
// TODO: Do we need finish call here? Maybe call it in network::execute() ?
|
||||||
get_stream().finish();
|
get_stream().finish();
|
||||||
|
Loading…
Reference in New Issue
Block a user