-
Notifications
You must be signed in to change notification settings - Fork 49
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
Conversation
There was a problem hiding this 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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def __call__(self, *args: Any, **kwargs: Any) -> None: | |
def __call__(self, *args: Any, **kwargs: Any) -> bool: |
There was a problem hiding this comment.
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: ...
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
src/gt4py/next/program_processors/runners/dace_fieldview/gtir_builtin_translators.py
Outdated
Show resolved
Hide resolved
|
||
@abc.abstractmethod | ||
def connect(self, me: dace.nodes.MapEntry) -> None: | ||
pass |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 ...
.
src/gt4py/next/program_processors/runners/dace_fieldview/gtir_dataflow.py
Outdated
Show resolved
Hide resolved
src/gt4py/next/program_processors/runners/dace_fieldview/gtir_dataflow.py
Outdated
Show resolved
Hide resolved
src/gt4py/next/program_processors/runners/dace_fieldview/gtir_dataflow.py
Outdated
Show resolved
Hide resolved
src/gt4py/next/program_processors/runners/dace_fieldview/gtir_dataflow.py
Outdated
Show resolved
Hide resolved
src/gt4py/next/program_processors/runners/dace_fieldview/gtir_builtin_translators.py
Show resolved
Hide resolved
src/gt4py/next/program_processors/runners/dace_fieldview/gtir_builtin_translators.py
Show resolved
Hide resolved
There was a problem hiding this 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: |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 ...
.
Implements some refactoring changes discussed during review of #1683.