Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat[next][dace]: refactoring #1685

Merged
merged 4 commits into from
Oct 10, 2024
Merged

Conversation

edopao
Copy link
Contributor

@edopao edopao commented Oct 10, 2024

Implements some refactoring changes discussed during review of #1683.

@edopao edopao marked this pull request as ready for review October 10, 2024 07:06
Copy link
Contributor

@philip-paul-mueller philip-paul-mueller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I very much like the new Dataflow input concept.
There are some changes, but it is generally good.

@@ -40,7 +40,8 @@ def __init__(self, program: dace.CompiledSDFG):
]

def __call__(self, *args: Any, **kwargs: Any) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def __call__(self, *args: Any, **kwargs: Any) -> None:
def __call__(self, *args: Any, **kwargs: Any) -> bool:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must be None, to comply with the protocol definition:

class CompiledProgram(Protocol):
    """Executable python representation of a program."""

    def __call__(self, *args: Any, **kwargs: Any) -> None: ...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, for some reason I read the assert as a return.

@@ -104,7 +105,7 @@ def decorated_program(
*args: Any,
offset_provider: common.OffsetProvider,
out: Any = None,
) -> Any:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment above, must be bool.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, I have to assert also on the result of fast_call


@abc.abstractmethod
def connect(self, me: dace.nodes.MapEntry) -> None:
pass
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the coding guide says that you have to use ... here, but I am not sure.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked it up, according to the first point of this section it needs to be ....

Copy link
Contributor

@philip-paul-mueller philip-paul-mueller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is one pass that is not changed into ... I made a note there.
Otherwise, LGTM.

@@ -40,7 +40,8 @@ def __init__(self, program: dace.CompiledSDFG):
]

def __call__(self, *args: Any, **kwargs: Any) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, for some reason I read the assert as a return.


@abc.abstractmethod
def connect(self, me: dace.nodes.MapEntry) -> None:
pass
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked it up, according to the first point of this section it needs to be ....

@edopao edopao merged commit 92e83f3 into GridTools:main Oct 10, 2024
31 checks passed
@edopao edopao deleted the dace-gtir-refactoring branch October 10, 2024 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants