mirror of
https://github.com/RRZE-HPC/OSACA.git
synced 2026-01-05 10:40:06 +01:00
enhanced length warning
This commit is contained in:
@@ -287,8 +287,8 @@ def inspect(args, output_file=sys.stdout):
|
||||
print_length_warning = False
|
||||
else:
|
||||
kernel = reduce_to_section(parsed_code, isa)
|
||||
# Print warning if kernel is larger than threshold
|
||||
print_length_warning = True if len(kernel) > 200 else False
|
||||
# Print warning if kernel has no markers and is larger than threshold (100)
|
||||
print_length_warning = True if len(kernel) == len(parsed_code) and len(kernel) > 100 else False
|
||||
machine_model = MachineModel(arch=arch)
|
||||
semantics = ArchSemantics(machine_model)
|
||||
semantics.add_semantics(kernel)
|
||||
|
||||
@@ -177,7 +177,7 @@ class TestCLI(unittest.TestCase):
|
||||
# WARNING for length
|
||||
self.assertTrue(output.getvalue().count('WARNING') == 1)
|
||||
args = parser.parse_args(
|
||||
['--lines', '100-299', '--ignore-unknown', self._find_test_file(kernel)]
|
||||
['--lines', '100-199', '--ignore-unknown', self._find_test_file(kernel)]
|
||||
)
|
||||
output = StringIO()
|
||||
osaca.run(args, output_file=output)
|
||||
|
||||
Reference in New Issue
Block a user