Skip to content

Commit f7c63dd

Browse files
committed
#1618 Fix issue and remove leftover comments
1 parent cda3eb1 commit f7c63dd

3 files changed

Lines changed: 2 additions & 13 deletions

File tree

src/psyclone/domain/common/transformations/alg_trans.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ def validate(self, node, options=None, **kwargs):
9292
f"rewriting the algorithm file with the invoke outside "
9393
f" this construct.")
9494

95-
9695
def apply(self, node, options=None, **kwargs):
9796
''' Apply transformation to the supplied PSyIR node.
9897

src/psyclone/generator.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -713,16 +713,6 @@ def main(arguments):
713713
keep_conditional_openmp_statements=args.
714714
keep_conditional_openmp_statements,
715715
free_form=free_form)
716-
# except GenerationError:
717-
# _, exc_value, _ = sys.exc_info()
718-
# print(f"Warning: {exc_value}")
719-
# # no invoke calls were found in the algorithm file so we do
720-
# # not need to process it, or generate any psy layer code, so
721-
# # output the original algorithm file and set the psy file to
722-
# # be empty
723-
# with open(args.filename, encoding="utf8") as alg_file:
724-
# alg = alg_file.read()
725-
# psy = ""
726716
except (OSError, IOError, ParseError, GenerationError,
727717
RuntimeError):
728718
_, exc_value, _ = sys.exc_info()

src/psyclone/tests/domain/common/transformations/alg_invoke_2_psy_call_trans_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ def test_ai2psycall_add_arg():
502502
# Invalid argument exception (Node parent is not a KernelFunctor)
503503
arg = UnaryOperation.create(
504504
UnaryOperation.Operator.PLUS, Literal("1.0", ScalarType.real_type()))
505-
with pytest.raises(TypeError) as info:
505+
with pytest.raises(GenerationError) as info:
506506
AlgInvoke2PSyCallTrans._add_arg(arg, [])
507507
assert ("Expected Algorithm-layer kernel arguments to be a Literal, "
508508
"Reference, type-bound Call or a CodeBlock but '+1.0' is of type "
@@ -512,7 +512,7 @@ def test_ai2psycall_add_arg():
512512
# Invalid argument exception (Node parent is a KernelFunctor)
513513
_ = KernelFunctor.create(
514514
DataTypeSymbol("my_kernel", ScalarType.real_type()), [arg])
515-
with pytest.raises(TypeError) as info:
515+
with pytest.raises(GenerationError) as info:
516516
AlgInvoke2PSyCallTrans._add_arg(arg, [])
517517
assert ("Expected Algorithm-layer kernel arguments to be a Literal, "
518518
"Reference, type-bound Call or a CodeBlock but '+1.0' passed "

0 commit comments

Comments
 (0)