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

Convert stmt_html output to use stmt_viz output #7516

Merged
merged 5 commits into from
Apr 18, 2023

Conversation

steven-johnson
Copy link
Contributor

Per discussion on #7507, this entirely removes the "classic" stmt_html output and replaces it with the "new" StmtToViz output. Using compile_to_lowered_stmt or requesting stmt_html will now always output the new output, and requesting stmt_viz output is no longer legal.

(Note that this builds on top of #7515, which must be submitted first.)

It's not clear to me whether #7507 (comment) is a blocker for this change, or a request to add back already-lost functionality.

TL;DR: if we request `stmt_viz` without `assembly`, just generate the latter to a temp file that we dispose of later; this wasn't feasible before since we were previously requiring the assembly output to be generated with the same directory and basename as stmt_viz, but that was fixed.
Per discussion on #7507, this entirely removes the "classic" stmt_html output and replaces it with the "new" StmtToViz output. Using `compile_to_lowered_stmt` or requesting `stmt_html` will now always output the new output, and requesting `stmt_viz` output is no longer legal.

(Note that this builds on top of #7515, which must be submitted first.)

It's not clear to me whether #7507 (comment) is a blocker for this change, or a request to add back already-lost functionality.
@steven-johnson steven-johnson added the buildbot_test_everything Buildbots should run all available tests on this PR (unless build_test_nothing is set). label Apr 17, 2023
@abadams
Copy link
Member

abadams commented Apr 17, 2023

It's a request to add back lost functionality. Things that used to be in codegen have crept into lowering (e.g. compiling shaders), making the .stmt output lower and lower level over time. We should roll it back a little to before those passes.

Base automatically changed from srj/assembly-temp to main April 17, 2023 22:22
@steven-johnson
Copy link
Contributor Author

It's a request to add back lost functionality

OK, in that case we should probably be good to go in landing this.

Copy link
Contributor

@maaz139 maaz139 left a comment

Choose a reason for hiding this comment

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

StmtToHtml.h needs to be removed from the Makefile, otherwise looks good to me!

bool has_assembly = std::find(emit_flags.begin(), emit_flags.end(), "assembly") != emit_flags.end();

user_assert(!has_stmt_viz || has_assembly)
<< "Output flag `stmt_viz` requires the `assembly` flag to also be set.";
user_assert(!has_stmt_html || has_assembly)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this still needed considering #7515 has landed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, good catch! Removed.

@steven-johnson steven-johnson merged commit 42e71f2 into main Apr 18, 2023
@steven-johnson steven-johnson added the release_notes For changes that may warrant a note in README for official releases. label Apr 18, 2023
steven-johnson added a commit that referenced this pull request Apr 18, 2023
…#7520)

* Don't accidentally embed .s files in .a files when emitting stmt_html

Followup fix for #7516

* format
ardier pushed a commit to ardier/Halide-mutation that referenced this pull request Mar 3, 2024
* Allow emitting `stmt_viz` without specifying `assembly`

TL;DR: if we request `stmt_viz` without `assembly`, just generate the latter to a temp file that we dispose of later; this wasn't feasible before since we were previously requiring the assembly output to be generated with the same directory and basename as stmt_viz, but that was fixed.

* Convert stmt_html output to use stmt_viz output

Per discussion on halide#7507, this entirely removes the "classic" stmt_html output and replaces it with the "new" StmtToViz output. Using `compile_to_lowered_stmt` or requesting `stmt_html` will now always output the new output, and requesting `stmt_viz` output is no longer legal.

(Note that this builds on top of halide#7515, which must be submitted first.)

It's not clear to me whether halide#7507 (comment) is a blocker for this change, or a request to add back already-lost functionality.

* Update Makefile

* Update Generator.cpp
ardier pushed a commit to ardier/Halide-mutation that referenced this pull request Mar 3, 2024
…halide#7520)

* Don't accidentally embed .s files in .a files when emitting stmt_html

Followup fix for halide#7516

* format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
buildbot_test_everything Buildbots should run all available tests on this PR (unless build_test_nothing is set). 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.

None yet

3 participants