op_compat_info.cc.j2 754 字节
Newer Older
1 2 3 4 5 6 7
#include "paddle/fluid/translator/op_compat_info.h"

namespace paddle {
namespace translator {
    
OpNameNormalizer::OpNameNormalizer() {
    op_name_mappings = {
8
        {% for legacy_name, normalized_name in op_name_pairs.items() %}
9 10 11
        { "{{legacy_name}}", "{{normalized_name}}" },
        {% endfor %}
    };
12 13 14 15 16 17 18 19 20 21 22 23
    op_arg_name_mappings = {
        {% for op_name, arg_name_mappings in op_arg_name_pairs.items() %}
        { 
            "{{op_name}}", 
            {
                {% for normalized_name, legacy_name in arg_name_mappings.items() %}
                { "{{normalized_name}}", "{{legacy_name}}" },
                {% endfor %}
            }, 
        },
        {% endfor %}
    };
24 25 26 27
}

} // namespace translator
}// namespace paddle