MCPcopy Create free account
hub / github.com/microsoft/BitNet / parse_throughput

Method parse_throughput

utils/tune_gemm_config.py:93–108  ·  view source on GitHub ↗

Parse pp128 throughput from output

(self, output)

Source from the content-addressed store, hash-verified

91 return result.stdout
92
93 def parse_throughput(self, output):
94 """Parse pp128 throughput from output"""
95 # 匹配 pp128: | pp128 | 501.06 ± 11.37 |
96 pp_pattern = r'\|\s+pp128\s+\|\s+([\d.]+)\s+±\s+([\d.]+)\s+\|'
97 pp_match = re.search(pp_pattern, output)
98
99 if pp_match:
100 pp_throughput = float(pp_match.group(1))
101 pp_std_dev = float(pp_match.group(2))
102
103 return {
104 'pp_throughput': pp_throughput,
105 'pp_std_dev': pp_std_dev
106 }
107
108 return None
109
110 def test_configuration(self, act_parallel, row_block_size, col_block_size, parallel_size):
111 """Test single configuration"""

Callers 1

test_configurationMethod · 0.95

Calls

no outgoing calls

Tested by 1

test_configurationMethod · 0.76