!46036 GraphKernel Fix CSE BUG
Merge pull request !46036 from ZengZitao/fix_some_bugs
This commit is contained in:
commit
afbae413e8
|
@ -40,6 +40,8 @@ class COMMON_EXPORT CallbackImpl : public Callback {
|
|||
void SetBasicNodeKernelInfo(const AnfNodePtr &node, const std::vector<inner::NodeBase> &outputs_info) override;
|
||||
void SetEmptyKernelInfo(const AnfNodePtr &node) override;
|
||||
void ResetKernelInfo(const AnfNodePtr &node) override;
|
||||
|
||||
private:
|
||||
void CollectInputTypesAndFormats(const AnfNodePtr &node, std::vector<TypeId> *input_types,
|
||||
std::vector<std::string> *input_formats);
|
||||
};
|
||||
|
|
|
@ -57,6 +57,7 @@ void InsertReshape(const FuncGraphPtr &graph, const AnfNodePtr &node, const Type
|
|||
MS_EXCEPTION_IF_NULL(reshape);
|
||||
common::AnfAlgo::SetNodeAttr(kAttrShape, MakeValue(infer_shape), reshape);
|
||||
common::AnfAlgo::SetOutputInferTypeAndShape({infer_type}, {infer_shape}, reshape.get());
|
||||
reshape->set_kernel_info(std::make_shared<device::KernelInfo>());
|
||||
auto graph_sel_info =
|
||||
BuildSelectKernelBuildInfo({kOpFormat_DEFAULT}, {device_type}, {kOpFormat_DEFAULT}, {device_type});
|
||||
AnfAlgo::SetSelectKernelBuildInfo(graph_sel_info, reshape.get());
|
||||
|
|
Loading…
Reference in New Issue