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

disable array bounds check when optimized #239

Closed
wants to merge 4 commits into from

Conversation

matthiasdiener
Copy link
Collaborator

@matthiasdiener matthiasdiener commented Jul 24, 2023

@matthiasdiener matthiasdiener self-assigned this Jul 24, 2023
Base automatically changed from def-opts-loopy to main July 25, 2023 16:00
@matthiasdiener matthiasdiener marked this pull request as ready for review July 25, 2023 16:13
@@ -41,7 +43,9 @@

_DEFAULT_LOOPY_OPTIONS = lp.Options(
no_numpy=True,
return_dict=True)
return_dict=True,
enforce_array_accesses_within_bounds="no_check" if sys.flags.optimize
Copy link
Owner

Choose a reason for hiding this comment

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

I'm a bit hesitant about this, because I feel it encourages everyone to run with -O all the time, negating the benefit of possible runtime checks.

I think a possibly better approach might be to just turn off bounds checking for kernels generated by pytato wholesale, as long as no hand-written loopy kernels appear in the DAG.

@matthiasdiener
Copy link
Collaborator Author

Closing in favor of inducer/pytato#449.

@matthiasdiener matthiasdiener deleted the array-check-no-opt branch July 26, 2023 18:43
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