We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f3d938 commit 963e364Copy full SHA for 963e364
python/paddle/profiler/profiler_statistic.py
@@ -13,6 +13,7 @@
13
# limitations under the License.
14
import collections
15
from enum import Enum
16
+import re
17
18
from paddle.fluid.core import TracerEventType
19
@@ -1317,10 +1318,11 @@ def format_ratio(ratio, indent=0):
1317
1318
append(header_sep)
1319
append(row_format.format(*headers))
1320
1321
+ kernel_name_pattern = re.compile('(.+?)(<.*>)(\(.*\))')
1322
for row_values in all_row_values:
- indx = row_values[0].find('(')
- if indx != -1:
1323
- name = row_values[0][:indx]
+ match = kernel_name_pattern.match(row_values[0])
1324
+ if match:
1325
+ name = match.group(1) + match.group(2)
1326
else:
1327
name = row_values[0]
1328
if len(name) > name_column_width:
0 commit comments