{% if language == "cn" %}
{% set title_ns = namespace(type='类别', desc='描述及建议', opti_set='性能优化算子集合', bound_set='bound算子集合', affinity_set='不亲和算子集合',
opti_refer=' 参考性能优化空间: ', bound_refer=' bound类型为: ', affinity_refer=' 不亲和类型为: ', title_desc='算子相关分析,参考如下: ') %}
{% else %}
{% set title_ns = namespace(type='Type', desc='Description and Suggestion', opti_set='set of performance optimization operators',
bound_set='set of bound operators', affinity_set='set of unaffine operators', opti_refer=' refer to Performance Optimization Space: ',
bound_refer=' bound type: ', affinity_refer=' type of disaffinity: ', title_desc=' Operator related analysis, referenced below: ') %}
{% endif %}
{% if format_result.cube[0]|length + format_result.cube[1]|length + format_result.cube[2]|length > 0 %}
MatMul{{ title_ns.title_desc }}
| {{ title_ns.type }} |
{{ title_ns.desc }} |
{% set opti_ns = namespace(total_opti='') %}
{% for opti in format_result.cube[0] %}
{% if not loop.first %}
{% set opti_ns.total_opti = opti_ns.total_opti ~ "
" ~ opti.op_name ~ " operator shape: " ~ opti.shape ~ " dtype: " ~ opti.dtype ~ title_ns.opti_refer ~ opti.optimization ~ "%" %}
{% else %}
{% set opti_ns.total_opti = opti.op_name ~ " operator shape: " ~ opti.shape ~ " dtype: " ~ opti.dtype ~ title_ns.opti_refer ~ opti.optimization ~ "%" %}
{% endif %}
{% endfor %}
{% if opti_ns.total_opti|length > 0 %}
| {{ title_ns.opti_set }} |
{{ opti_ns.total_opti | safe }} |
{% endif %}
{% set bound_ns = namespace(total_bound='') %}
{% for bound in format_result.cube[1] %}
{% if not loop.first %}
{% set bound_ns.total_bound = bound_ns.total_bound ~ "
" ~ bound.op_name ~ " operator shape: " ~ bound.shape ~ " dtype: " ~ bound.dtype ~ title_ns.bound_refer ~ bound.bound %}
{% else %}
{% set bound_ns.total_bound = bound.op_name ~ " operator shape: " ~ bound.shape ~ " dtype: " ~ bound.dtype ~ title_ns.bound_refer ~ bound.bound %}
{% endif %}
{% endfor %}
{% if bound_ns.total_bound|length > 0 %}
| {{ title_ns.bound_set }} |
{{ bound_ns.total_bound | safe }} |
{% endif %}
{% set affinity_ns = namespace(total_affinity='') %}
{% for affinity in format_result.cube[2] %}
{% if not loop.first %}
{% set affinity_ns.total_affinity = affinity_ns.total_affinity ~ "
" ~ affinity.op_name ~ " operator shape: " ~ affinity.shape ~ " dtype: " ~ affinity.dtype ~ title_ns.affinity_refer ~ affinity.suggestion %}
{% else %}
{% set affinity_ns.total_affinity = affinity.op_name ~ " operator shape: " ~ affinity.shape ~ " dtype: " ~ affinity.dtype ~ title_ns.affinity_refer ~ affinity.suggestion %}
{% endif %}
{% endfor %}
{% if affinity_ns.total_affinity|length > 0 %}
| {{ title_ns.affinity_set }} |
{{ affinity_ns.total_affinity | safe }} |
{% endif %}
{% endif %}
{% if format_result.fa[0]|length + format_result.fa[1]|length + format_result.fa[2]|length > 0 %}
FA{{ title_ns.title_desc }}
| {{ title_ns.type }} |
{{ title_ns.desc }} |
{% set opti_ns = namespace(total_opti='') %}
{% for opti in format_result.fa[0] %}
{% if not loop.first %}
{% set opti_ns.total_opti = opti_ns.total_opti ~ "
" ~ opti.op_name ~ " operator shape: " ~ opti.shape ~ " dtype: " ~ opti.dtype ~ title_ns.opti_refer ~ opti.optimization ~ "%" %}
{% else %}
{% set opti_ns.total_opti = opti.op_name ~ " operator shape: " ~ opti.shape ~ " dtype: " ~ opti.dtype ~ title_ns.opti_refer ~ opti.optimization ~ "%" %}
{% endif %}
{% endfor %}
{% if opti_ns.total_opti|length > 0 %}
| {{ title_ns.opti_set }} |
{{ opti_ns.total_opti | safe }} |
{% endif %}
{% set bound_ns = namespace(total_bound='') %}
{% for bound in format_result.fa[1] %}
{% if not loop.first %}
{% set bound_ns.total_bound = bound_ns.total_bound ~ "
" ~ bound.op_name ~ " operator shape: " ~ bound.shape ~ " dtype: " ~ bound.dtype ~ title_ns.bound_refer ~ bound.bound %}
{% else %}
{% set bound_ns.total_bound = bound.op_name ~ " operator shape: " ~ bound.shape ~ " dtype: " ~ bound.dtype ~ title_ns.bound_refer ~ bound.bound %}
{% endif %}
{% endfor %}
{% if bound_ns.total_bound|length > 0 %}
| {{ title_ns.bound_set }} |
{{ bound_ns.total_bound | safe }} |
{% endif %}
{% set affinity_ns = namespace(total_affinity='') %}
{% for affinity in format_result.fa[2] %}
{% if not loop.first %}
{% set affinity_ns.total_affinity = affinity_ns.total_affinity ~ "
" ~ affinity.op_name ~ " operator shape: " ~ affinity.shape ~ " dtype: " ~ affinity.dtype ~ title_ns.affinity_refer ~ affinity.suggestion %}
{% else %}
{% set affinity_ns.total_affinity = affinity.op_name ~ " operator shape: " ~ affinity.shape ~ " dtype: " ~ affinity.dtype ~ title_ns.affinity_refer ~ affinity.suggestion %}
{% endif %}
{% endfor %}
{% if affinity_ns.total_affinity|length > 0 %}
| {{ title_ns.affinity_set }} |
{{ affinity_ns.total_affinity | safe }} |
{% endif %}
{% endif %}
{% if format_result.vector[0]|length + format_result.vector[1]|length > 0 %}
Vector{{ title_ns.title_desc }}
| {{ title_ns.type }} |
{{ title_ns.desc }} |
{% set opti_ns = namespace(total_opti='') %}
{% for opti in format_result.vector[0] %}
{% if not loop.first %}
{% set opti_ns.total_opti = opti_ns.total_opti ~ "
" ~ opti.op_name ~ " operator shape: " ~ opti.shape ~ " dtype: " ~ opti.dtype ~ title_ns.opti_refer ~ opti.optimization ~ "%" %}
{% else %}
{% set opti_ns.total_opti = opti.op_name ~ " operator shape: " ~ opti.shape ~ " dtype: " ~ opti.dtype ~ title_ns.opti_refer ~ opti.optimization ~ "%" %}
{% endif %}
{% endfor %}
{% if opti_ns.total_opti|length > 0 %}
| {{ title_ns.opti_set }} |
{{ opti_ns.total_opti | safe }} |
{% endif %}
{% set bound_ns = namespace(total_bound='') %}
{% for bound in format_result.vector[1] %}
{% if not loop.first %}
{% set bound_ns.total_bound = bound_ns.total_bound ~ "
" ~ bound.op_name ~ " operator shape: " ~ bound.shape ~ " dtype: " ~ bound.dtype ~ title_ns.bound_refer ~ bound.bound %}
{% else %}
{% set bound_ns.total_bound = bound.op_name ~ " operator shape: " ~ bound.shape ~ " dtype: " ~ bound.dtype ~ title_ns.bound_refer ~ bound.bound %}
{% endif %}
{% endfor %}
{% if bound_ns.total_bound|length > 0 %}
| {{ title_ns.bound_set }} |
{{ bound_ns.total_bound | safe }} |
{% endif %}
{% endif %}