Browse Source

!92 For the transdata, auto_inline is not enabled by default

From: @hanhuifeng2020
Reviewed-by: @dylangeng,@anyrenwei
Signed-off-by: @anyrenwei
pull/92/MERGE
mindspore-ci-bot Gitee 4 years ago
parent
commit
efe42ee8fe
2 changed files with 2 additions and 5 deletions
  1. +2
    -4
      python/akg/composite/build_module.py
  2. +0
    -1
      tests/st/composite/need_adapt/Fused_Cast_RealDiv_TransData_fusion_7787524035156851367.json

+ 2
- 4
python/akg/composite/build_module.py View File

@@ -554,10 +554,8 @@ def _pragma_rmselfdep(kernel_info):

def _enable_auto_inline(kernel_info):
for op in kernel_info["op_desc"]:
# For the TransData op operator, if the inline is not performed,
# the operator fusion scene is difficult to handle for the poly.
# So are MatMul/BatchMatMul with bias.
if op['name'] in ["TransData", "MatMul", "BatchMatMul"]:
# For the MatMul/BatchMatMul with bias, the inline is necessary
if op['name'] in ["MatMul", "BatchMatMul"]:
return True
# For the Ascend, turn 'enable_auto_inline' off for composite op by default.
return False


+ 0
- 1
tests/st/composite/need_adapt/Fused_Cast_RealDiv_TransData_fusion_7787524035156851367.json View File

@@ -1 +0,0 @@
{"composite":true,"composite_graph":"17992.34526","id":5003,"input_desc":[[{"data_type":"float32","format":"DefaultFormat","shape":[8,2,1024,1024],"tensor_name":"input_0"}]],"op":"Fused_Cast_RealDiv_TransData_fusion_7787524035156851367","op_desc":[{"attr":[{"data_type":"bool","name":"is_backed_cast","value":false},{"data_type":"str","name":"pri_format","value":"NC1HWC0"},{"data_type":"str","name":"dst_type","value":"float16"}],"impl_path":"","input_desc":[[{"data_type":"float32","format":"DefaultFormat","name":"input_0","shape":[8,2,1024,1024],"tensor_name":"input_0"}]],"name":"Cast","output_desc":[{"data_type":"float16","format":"DefaultFormat","name":"output","shape":[8,2,1024,1024],"tensor_name":"output_0_0"}]},{"attr":[{"data_type":"str","name":"pri_format","value":"NC1HWC0"}],"impl_path":"","input_desc":[[{"data_type":"float16","format":"DefaultFormat","name":"input_0","shape":[8,2,1024,1024],"tensor_name":"output_0_0"}],[{"data_type":"float16","format":"DefaultFormat","name":"input_1","shape":[1],"tensor_name":"input_2","value":8.0}]],"name":"RealDiv","output_desc":[{"data_type":"float16","format":"DefaultFormat","name":"output","shape":[8,2,1024,1024],"tensor_name":"output_0_1"}]},{"attr":[{"data_type":"str","name":"dst_format","value":"FRACTAL_NZ"},{"data_type":"str","name":"src_format","value":"NCHW"},{"data_type":"str","name":"pri_format","value":"NC1HWC0"},{"data_type":"listInt","name":"_datadump_original_names","value":[]}],"impl_path":"","input_desc":[[{"data_type":"float16","format":"DefaultFormat","name":"input_0","shape":[8,2,1024,1024],"tensor_name":"output_0_1"}]],"name":"TransData","output_desc":[{"data_type":"float16","format":"FRACTAL_NZ","name":"output","shape":[8,2,64,64,16,16],"tensor_name":"output_0_2"}]}],"output_desc":[{"data_type":"float16","format":"FRACTAL_NZ","shape":[8,2,64,64,16,16],"tensor_name":"output_0_2"}],"platform":"AKG","process":"aicore"}

Loading…
Cancel
Save