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

Add a warning if a Generator declares any Outputs before the final Input (Fixes #7669) #7697

Merged
merged 3 commits into from
Jul 24, 2023

Conversation

steven-johnson
Copy link
Contributor

See #7669 for details

attn @Copper280z

@steven-johnson steven-johnson requested a review from abadams July 21, 2023 18:05
internal_assert(param->generator == nullptr || param->generator == generator);
param->generator = generator;
filter_generator_params.push_back(param);
const char *const io_order_warning = "Generators will always produce code that orders all Inputs before all Outputs; "
Copy link
Member

Choose a reason for hiding this comment

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

The warning should probably include instructions to override that method if you explicitly want to have outputs declared before inputs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if I entirely agree with this -- part of me wants to push back and say that anyone who really needs it will figure it out. But I'm probably overthinking it...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

PTAL

@steven-johnson steven-johnson merged commit 128bcdf into main Jul 24, 2023
@steven-johnson steven-johnson deleted the srj/gen-order branch July 24, 2023 17:44
@steven-johnson steven-johnson added the release_notes For changes that may warrant a note in README for official releases. label Jul 24, 2023
steven-johnson added a commit that referenced this pull request Jul 24, 2023
Accidentally checked in #7697 with the failure mode as error, not warning
steven-johnson added a commit that referenced this pull request Jul 24, 2023
Accidentally checked in #7697 with the failure mode as error, not warning
ardier pushed a commit to ardier/Halide-mutation that referenced this pull request Mar 3, 2024
…put (Fixes halide#7669) (halide#7697)

* Add a warning if a Generator declares any Outputs before the final Input (Fixes halide#7669)

See halide#7669 for details

* Update abstractgeneratortest_generator.cpp

* Add note about allow_out_of_order_inputs_and_outputs() to warning
ardier pushed a commit to ardier/Halide-mutation that referenced this pull request Mar 3, 2024
Accidentally checked in halide#7697 with the failure mode as error, not warning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_notes For changes that may warrant a note in README for official releases.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants