-
Notifications
You must be signed in to change notification settings - Fork 54
fix[next]: Fix different static args after with_backend
#2475
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -26,10 +26,10 @@ class CompilationOptions: | |||||
| # mostly important for testing. Users should not rely on it. | ||||||
| enable_jit: bool = dataclasses.field(default_factory=lambda: config.ENABLE_JIT_DEFAULT) | ||||||
|
|
||||||
| #: if the user requests static params, they will be used later to initialize CompiledPrograms | ||||||
| static_params: Sequence[str] | None = ( | ||||||
| None # TODO: describe that this value will eventually be a sequence of strings | ||||||
| ) | ||||||
| #: If the user requests static params, they will be used later to initialize CompiledPrograms. | ||||||
| #: By default the set of static params is set when compiling for the first time, e.g. on call | ||||||
| #: when jitting is enabled, or on a call to `compile`. | ||||||
| static_params: Sequence[str] | None = None | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Question: wouldn't it be simpler to just default to an empty tuple?
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I first changed it to be |
||||||
|
|
||||||
| # TODO(ricoh): replace with common.OffsetProviderType once the temporary pass doesn't require the runtime information | ||||||
| #: A dictionary holding static/compile-time information about the offset providers. | ||||||
|
|
||||||
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.
Question: do you understand why the
castis used/needed here after theassert?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.
Unclear:
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.
Ah, I get it. mypy does not understand the
all()inside theassert. A custom typeguard would be needed here, but it can be done in a different PR.