framecode: Fix missing BasicCFBlock argument #1630
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updated for v0.16: The (renamed)
BasicCFBlock
class still requires 4 arguments in a different order and with none being optional. The new__init__
method as provided by@dataclass
looks like this:The current code still supplies 3 arguments and in a wrong order. This PR fixes that.
Original PR description (when I was still running on DaCe v0.15.1) follows.
With
optimizer.detect_control_flow == False
, this part of code causes an error later on:I identified this as
cflow.SingleState
requiring 4 arguments to its__init__
method with the last one being optional, i.e.:The current code incorrectly feeds 3 and did not trigger a
TypeError
due to the last one having a default value.This PR adds back the missing
parent
argument, although I'm not sure if thesdfg
object is correct. Local testing shows thatNone
suffices, though.