已合并
merge_proto: 合并算子原型时保留REG_OP前的注释 #3635
songkai111创建于 6月29日
merge_proto: 合并算子原型时保留REG_OP前的注释 #3635
已合并
songkai111创建于 6月29日
1 个文件变更+1-0
@@ -17,6 +17,7 @@ import argparse
17 17 
18 18 
19OP_DEF_PATTERN = re.compile(19OP_DEF_PATTERN = re.compile(
20+ r"(?P<comment>[ \t]*/\*\*?(?:[^*]|\*(?!/))*?\*/[ \t]*\n\s*)?"
20 r"(?P<guard>[ \t]*#\s*ifndef\s+\w+[^\n]*\n"21 r"(?P<guard>[ \t]*#\s*ifndef\s+\w+[^\n]*\n"
21 r"[ \t]*#\s*define\s+\w+[^\n]*\n\s*)?"22 r"[ \t]*#\s*define\s+\w+[^\n]*\n\s*)?"
22 r"REG_OP\((?P<opname>.+?)\)"23 r"REG_OP\((?P<opname>.+?)\)"