Rewrited the OpInfer as a class with functions "infer_shape","infer_type"
and "infer_format". Used op name to find the subclass that have implemented
these functions. Two common class "_Elemwise" and "_Reduce" was provided.
Op BiasAddGrad supported "FractalNZ" format.
Changed the expander to class, and used the class name to identify the operator.
Moved the original op logic into the `_expand` function; added a `_check` function to check op inputs.
Use decorator to register the whitelist formats that operator supports,
and the decorator will change the `_check` function to check the formats.
Decoupled from the front-end interfaces.
1. Removed the call to "Renormalize".
Completed the infer-format in model_builder.
Only used the device shape and device format to
infer an abstract shape without considering padding.
2. Removed the call to python's Primitive interfaces.
The "Renormalize" relies on the PrimitivePy, so they can be
removed together. After that, the functions "ConstAttrToInput",
"DeleteAttrInInput" and related can be removed.
3. Reuse the AkgKernelJsonGenerator in GraphKernelExpander.
1) set the attribute "extract_opinfo_from_anf" to true, so that
the generator can handle the basic operator with anf info.
2) added a function "extract_expand_info" in expander.py
to convert the json into a more friendly format. The attrs
was converted to a dict instead of a list.
4. Scalars only support DefaultFormat.
Removed the argument "format" from graph_builder.value
5. Moved the expander op list from graph_kernel_helper.cc to graph_kernel_expander.cc
fixbug in ReplaceNewFuseCNode
add a pass to eliminate repeated output after cse
fixbug in graph_kernel_splitter
do not fuse reshape op as output in costmodel.
add tile expander
add BroadcastTo in model
fix BroadcastTo op calling error and infer shape
rewrite tile expander
not split broadcast_to
add SqrtGrad expander