MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / read_compile_log

Function read_compile_log

tools/compile_analysis.py:8–26  ·  view source on GitHub ↗
(file_path)

Source from the content-addressed store, hash-verified

6
7
8def read_compile_log(file_path):
9 # Regex pattern to match lines with "value: __ ms"
10 pattern = r'([\w: ]+):\s*([\d.]+(?:e[+-]?\d+)?)ms'
11
12 data = []
13
14 # Read the file and find matches
15 with open(file_path, 'r') as file:
16 for line in file:
17 match = re.search(pattern, line)
18 if match:
19 operation = match.group(1).strip()
20 try:
21 value = float(match.group(2))
22 data.append({'Operation': operation, 'Value': value})
23 except:
24 print(f"Invalid Float: {match.group(2)}")
25
26 return data
27
28
29def filter_data(data, quantile):

Callers 1

Calls 3

printFunction · 0.50
groupMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected