|
|
|
@@ -157,10 +157,7 @@ void LoadKernelData(Debugger *debugger, const CNodePtr &kernel, |
|
|
|
auto format = kOpFormat_DEFAULT; |
|
|
|
auto gpu_addr = std::make_unique<GPUDeviceAddress>(addr->addr, addr->size, format, type); |
|
|
|
string input_tensor_name = input_kernel_name + ':' + "0"; |
|
|
|
ShapeVector int_shapes; |
|
|
|
auto shape = AnfAlgo::GetOutputDeviceShape(input_kernel, PARAMETER_OUTPUT_INDEX); |
|
|
|
(void)std::transform(shape.begin(), shape.end(), std::back_inserter(int_shapes), |
|
|
|
[](size_t inner_item) { return SizeToInt(inner_item); }); |
|
|
|
ShapeVector int_shapes = trans::GetRuntimePaddingShape(input_kernel, PARAMETER_OUTPUT_INDEX); |
|
|
|
auto ret = gpu_addr->LoadMemToHost(input_tensor_name, exec_order, format, int_shapes, type, 0, true); |
|
|
|
if (!ret) { |
|
|
|
MS_LOG(ERROR) << "LoadMemToHost:" |
|
|
|
@@ -187,10 +184,7 @@ void LoadKernelData(Debugger *debugger, const CNodePtr &kernel, |
|
|
|
auto format = kOpFormat_DEFAULT; |
|
|
|
auto gpu_addr = std::make_unique<GPUDeviceAddress>(addr->addr, addr->size, format, type); |
|
|
|
string tensor_name = kernel_name + ':' + std::to_string(j); |
|
|
|
ShapeVector int_shapes; |
|
|
|
auto shape = AnfAlgo::GetOutputDeviceShape(kernel, j); |
|
|
|
(void)std::transform(shape.begin(), shape.end(), std::back_inserter(int_shapes), |
|
|
|
[](size_t inner_item) { return SizeToInt(inner_item); }); |
|
|
|
ShapeVector int_shapes = trans::GetRuntimePaddingShape(kernel, j); |
|
|
|
auto ret = gpu_addr->LoadMemToHost(tensor_name, exec_order, format, int_shapes, type, j, false); |
|
|
|
if (!ret) { |
|
|
|
MS_LOG(ERROR) << "LoadMemToHost:" |
|
|
|
|