mirror of
https://github.com/RRZE-HPC/OSACA.git
synced 2026-01-05 02:30:08 +01:00
improved performance of arch_semantics and reg dependency matching
This commit is contained in:
@@ -398,9 +398,7 @@ class ArchSemantics(ISASemantics):
|
||||
|
||||
def g(obj, value):
|
||||
obj[item] = value
|
||||
|
||||
else:
|
||||
|
||||
def g(obj, *values):
|
||||
for item, value in zip(items, values):
|
||||
obj[item] = value
|
||||
@@ -416,7 +414,9 @@ class ArchSemantics(ISASemantics):
|
||||
@staticmethod
|
||||
def get_throughput_sum(kernel):
|
||||
"""Get the overall throughput sum separated by port of all instructions of a kernel."""
|
||||
port_pressures = [instr['port_pressure'] for instr in kernel]
|
||||
# ignoring all lines with throughput == 0.0, because there won't be anything to sum up
|
||||
# typically comment, label and non-instruction lines
|
||||
port_pressures = [instr['port_pressure'] for instr in kernel if instr['throughput'] != 0.0]
|
||||
# Essentially summing up each columns of port_pressures, where each column is one port
|
||||
# and each row is one line of the kernel
|
||||
# round is necessary to ensure termination of ArchsSemantics.assign_optimal_throughput
|
||||
|
||||
Reference in New Issue
Block a user