-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Deprecate vs Remove stmt_html
output for Halide 16?
#7507
Comments
I think it's ok to remove it, but we may want to alias |
This takes the approach of "Remove completely" vs "Deprecate for Halide 16" -- it's not at all clear if this is what the consensus is, but putting it there for consideration.
One thing to consider: compared to stmt_html, how long does it take to generate? And also, how long does it take to open it in a browser? |
I propose that to a user of the releases, it should just appear as if the html output got better. So we don't introduce any "viz" names at all (which already collide with HalideTraceViz), and just swap in the new html output and delete the old one at the same time. |
Tagging @maaz139 as his input would be welcomed here |
The new HTML is definitely slower to load. In general, html files above ~15mb were not working well in my experiments. I think there are ways to improve the HTML performance and it would be worth doing so if people are actively using the feature and running into this issue. Other than performance, I don't see a reason to keep the old html file around. I would advocate silently swapping the new viz.html for the old html tags as Andrew suggested. |
Chiming in... As an Nvidia GPU programmer, I am in favor of the new The strength of The figure below shows how a generic code |
Thanks for the feedback Antony! I agree, StmtViz should show IR code now that we have a separate assembly tab. I'll open an issue and look into it. |
For that to happen we'd have to emit the .stmt file before the offload gpu pass, e.g. in Lower.cpp around line 441. I guess we'd have to stash that earlier stmt in the Module somewhere for use in the .stmt outputs. |
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.
* 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 #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. * Update Makefile * Update Generator.cpp
As written, this issue is fixed, closing. (I presume we'll open a new issue for @antonysigma's request) |
I want the original HTML statement file back. The new version is SUPER slow in the webbrowser. |
Perhaps we can add lazy rendering for the visualization / assembly tabs. This should, in theory, restore the page responsiveness and load times to previous levels until the user explicitly requests the rendering of the new tabs. |
Out of curiosity, what browser / hardware etc are you using? (I'm not aware that anyone else involved in the review of this noticed a meaningful slowdown, so it may be something specific to your setup that we can address somehow) |
An 48GB memory, 8-core machine. Running Mozilla Firefox 115.0.2 Lemme try this in Chromium real quick... Feel free to try this for yourself: |
@mcourteaux I am afraid the Halide team (as well as me) are not too familiar with the Javascript and ES6. Have you considered reaching out to the original author of the PR? Core HTML5 developers tend to bundle all scripts with toolchains like the Chiming in... Could you please post a screenshot of the waterfall diagram representing the load times? This is what I have on my machine, rendering the same HTML you uploaded earlier: |
Aha! I caught a very useful profile! I'll upload it here. Trace-20230726T110312.json.zip |
I'll move this to a new issue and tag the right people. |
Opened #7712 |
* 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
With #7421 having landed, there is really not much use for the
stmt_html
output any more.Ordinarily I'd say we should deprecate it, but (1) it will be hard to emit useful deprecation warnings for all use cases, and (2) I don't recall seeing a single use of it inside Google for several years now -- I wouldn't be surprised if the same is true externally.
So, taking a straw poll here -- does it make more sense to just rip off the band-aid, so to speak, and remove it entirely for Halide 16?
The text was updated successfully, but these errors were encountered: