mirror of
https://github.com/RRZE-HPC/OSACA.git
synced 2026-01-04 10:10:08 +01:00
performance improvement of throughput summation
This commit is contained in:
@@ -416,9 +416,8 @@ class ArchSemantics(ISASemantics):
|
||||
@staticmethod
|
||||
def get_throughput_sum(kernel):
|
||||
"""Get the overall throughput sum separated by port of all instructions of a kernel."""
|
||||
tp_sum = reduce(
|
||||
(lambda x, y: [sum(z) for z in zip(x, y)]),
|
||||
[instr['port_pressure'] for instr in kernel],
|
||||
)
|
||||
tp_sum = [round(x, 2) for x in tp_sum]
|
||||
port_pressures = [instr['port_pressure'] for instr in kernel]
|
||||
# Essentially summing up each columns of port_pressures, where each column is one port
|
||||
# round is necessary to ensure termination of ArchsSemantics.assign_optimal_throughput
|
||||
tp_sum = [round(sum(col), 2) for col in zip(*port_pressures)]
|
||||
return tp_sum
|
||||
|
||||
Reference in New Issue
Block a user