已合并
fix: 修复 HostCPU Where 动态输出 StorageShape 未更新导致的精度问题 #4744
ZhuXincheng创建于 18 天前
fix: 修复 HostCPU Where 动态输出 StorageShape 未更新导致的精度问题 #4744
已合并
ZhuXincheng创建于 18 天前
1 个文件变更+7-0
@@ -39,6 +39,7 @@
39#include "exe_graph/runtime/gert_tensor_data.h"39#include "exe_graph/runtime/gert_tensor_data.h"
40#include "graph/load/model_manager/model_manager.h"40#include "graph/load/model_manager/model_manager.h"
41#include "aicpu_bin_handler.h"41#include "aicpu_bin_handler.h"
42+#include "kernel/common_kernel_impl/infer_shape.h"
42 43 
43using namespace ge;44using namespace ge;
44 45 
@@ -420,6 +421,12 @@ ge::graphStatus AicpuHostExecFunc(KernelContext *context) {
420 AicpuHostProcFunc aicpu_host_execute_func = *(AicpuHostProcFunc *)aicpu_host_execute_addr;421 AicpuHostProcFunc aicpu_host_execute_func = *(AicpuHostProcFunc *)aicpu_host_execute_addr;
421 GE_ASSERT_NOTNULL(aicpu_host_execute_func);422 GE_ASSERT_NOTNULL(aicpu_host_execute_func);
422 GE_ASSERT_SUCCESS(aicpu_host_execute_func(context));423 GE_ASSERT_SUCCESS(aicpu_host_execute_func(context));
424+ 
425+ const auto extended_context = reinterpret_cast<ExtendedKernelContext *>(context);
426+ GE_ASSERT_NOTNULL(extended_context);
427+ const auto compute_node_info = extended_context->GetComputeNodeInfo();
428+ GE_ASSERT_NOTNULL(compute_node_info);
429+ GE_ASSERT_SUCCESS(TransformAllOutputsShape(compute_node_info, context));
423 return ge::GRAPH_SUCCESS;430 return ge::GRAPH_SUCCESS;
424}431}
425 432