mirror of
https://github.com/RRZE-HPC/OSACA.git
synced 2025-12-16 09:00:05 +01:00
flake8 to ignore some errors and small style improvements
This commit is contained in:
@@ -774,7 +774,8 @@ def get_description(arch, rhs_comment=None):
|
|||||||
commented_description = ""
|
commented_description = ""
|
||||||
for line in descriptions[arch].split("\n"):
|
for line in descriptions[arch].split("\n"):
|
||||||
commented_description += ("{:<" + str(max_length) + "} # {}\n").format(
|
commented_description += ("{:<" + str(max_length) + "} # {}\n").format(
|
||||||
line, rhs_comment)
|
line, rhs_comment
|
||||||
|
)
|
||||||
description = commented_description
|
description = commented_description
|
||||||
|
|
||||||
return description
|
return description
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class KernelDG(nx.DiGraph):
|
|||||||
instruction_form["line_number"],
|
instruction_form["line_number"],
|
||||||
latency=instruction_form["latency"] - instruction_form["latency_wo_load"],
|
latency=instruction_form["latency"] - instruction_form["latency_wo_load"],
|
||||||
)
|
)
|
||||||
for dep in self.find_depending(instruction_form, kernel[i + 1:]):
|
for dep in self.find_depending(instruction_form, kernel[i + 1 :]):
|
||||||
edge_weight = (
|
edge_weight = (
|
||||||
instruction_form["latency"]
|
instruction_form["latency"]
|
||||||
if "latency_wo_load" not in instruction_form
|
if "latency_wo_load" not in instruction_form
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ def match_bytes(lines, index, byte_list):
|
|||||||
line_count += 1
|
line_count += 1
|
||||||
extracted_bytes += lines[index].directive.parameters
|
extracted_bytes += lines[index].directive.parameters
|
||||||
index += 1
|
index += 1
|
||||||
if extracted_bytes[0:len(byte_list)] == byte_list:
|
if extracted_bytes[0 : len(byte_list)] == byte_list:
|
||||||
return True, line_count
|
return True, line_count
|
||||||
return False, -1
|
return False, -1
|
||||||
|
|
||||||
@@ -219,7 +219,7 @@ def find_jump_labels(lines):
|
|||||||
if all(
|
if all(
|
||||||
[
|
[
|
||||||
line["instruction"].startswith(".")
|
line["instruction"].startswith(".")
|
||||||
for line in lines[labels[label][0]:labels[label][1]]
|
for line in lines[labels[label][0] : labels[label][1]]
|
||||||
if line["instruction"] is not None
|
if line["instruction"] is not None
|
||||||
]
|
]
|
||||||
):
|
):
|
||||||
@@ -243,7 +243,7 @@ def find_basic_blocks(lines):
|
|||||||
blocks = OrderedDict()
|
blocks = OrderedDict()
|
||||||
for label, label_line_idx in valid_jump_labels.items():
|
for label, label_line_idx in valid_jump_labels.items():
|
||||||
blocks[label] = [lines[label_line_idx]]
|
blocks[label] = [lines[label_line_idx]]
|
||||||
for line in lines[label_line_idx + 1:]:
|
for line in lines[label_line_idx + 1 :]:
|
||||||
terminate = False
|
terminate = False
|
||||||
blocks[label].append(line)
|
blocks[label].append(line)
|
||||||
# Find end of block by searching for references to valid jump labels
|
# Find end of block by searching for references to valid jump labels
|
||||||
@@ -272,7 +272,7 @@ def find_basic_loop_bodies(lines):
|
|||||||
loop_bodies = OrderedDict()
|
loop_bodies = OrderedDict()
|
||||||
for label, label_line_idx in valid_jump_labels.items():
|
for label, label_line_idx in valid_jump_labels.items():
|
||||||
current_block = [lines[label_line_idx]]
|
current_block = [lines[label_line_idx]]
|
||||||
for line in lines[label_line_idx + 1:]:
|
for line in lines[label_line_idx + 1 :]:
|
||||||
terminate = False
|
terminate = False
|
||||||
current_block.append(line)
|
current_block.append(line)
|
||||||
# Find end of block by searching for references to valid jump labels
|
# Find end of block by searching for references to valid jump labels
|
||||||
|
|||||||
Reference in New Issue
Block a user