forked from GridTools/gt4py
-
Notifications
You must be signed in to change notification settings - Fork 0
Backend refactoring fixes #2
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
Draft
gronerl
wants to merge
17
commits into
gronerl:tmp_original
Choose a base branch
from
egparedes:backend_refactoring_fixes
base: tmp_original
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Backend refactoring fixes #2
gronerl
wants to merge
17
commits into
gronerl:tmp_original
from
egparedes:backend_refactoring_fixes
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Split stencil building into concerns. * Add CachingStrategy interface and classes - handle the fingerprinting concerns - handle constructing names and file paths that might depend on fingerprints - handle cache storage and consistency checks - add tests for caching strategies * Add StencilBuilder class - orchestrate backend and caching instances to generate and optionally compile a stencil - add unit tests for stencil builder - add regression test for stencil property caching * Change Backend and it's subclasses - change class methods to methods - abstract methods are now enforced - move methods that deal with caching to CachingStrategy - add constructor with StencilBuilder instance * Typing: add some protocols for stencil definition functions - requires the typing-extensions distribution for python < 3.8 * Compliance: - remove backend/dawn_backends.py and backend/gt_backends.py from pre-commit exclude lists - flake8: ignore N803, allow capital letters in method names (needed for visitors) - flake8: ignore W503, allow line break before binary operator (needed due to black formatter) Co-authors: Enrique G. Paredes <18477+egparedes@users.noreply.github.com>
Added the -Wno-sign-compare flag in C++ test reference. This warning caused problems with vscode.
…kends (GridTools#125) List of changes: - Add function names to list of gtscript builtins and update frontend - Modified IR definition to support the list of functions (NativeFunction node) - Modify CallInliner to keep calls to builtin functions - Add implementations of NativeFunction to all backends - Add tests Co-authors: @eddie-c-davis @twicki
An option to generate code silencing "division by zero" (and similar warnings) with the NumPy backend, since most of the time the results of these warnings appear inside conditionals and they are not actually used. Motivating example: ``` @GTScript.stencil(rebuild=True, backend="numpy") def copy_stencil(in_storage: gtscript.Field[float], out_storage: gtscript.Field[float]): with computation(PARALLEL), interval(...): out_storage = 0 if in_storage[0,0,0] > 0: out_storage = 1 / in_storage ``` Related issue: GridTools#133. Changes: - Add "ignore_np_errstate" option - Add warning tests for debug and numpy backends
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
tmp, to get full diff of 2 joint PRs