-
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
[Debug only; Do not merge] Debug the ASAN error w/ Anderson2021 #7699
[Debug only; Do not merge] Debug the ASAN error w/ Anderson2021 #7699
Conversation
Provide a minimal reproducable test case where the Anderson2021 failed with segmentation fault. Primarily the L2 norm user defined function.
5bc3400
to
9e20f75
Compare
From some brief debugging, it appears that there are call site(s) that assume |
To see this without asan, insert
at lines 846, 2332, 2364, 2405 of LoopNest.cpp |
See #7703 |
So I think the issue here is:
Then, later in LoopNest::compute_features(), calls to helper functions blithely assume that a valid ThreadInfo exists, and crashiness ensues. I don't currently grok this code well enough to know whether we should just be creating the ThreadInfo in all cases, or doing something else later on. |
Yes, that's right. The code assumes that every Func is surrounded by a block loop and a thread loop, which means it assumes there is always a non-null 2 options I'll look into:
|
Thanks @aekul for the clarification. The author of the Anderson2021 also mentioned in Section 8 the lack of
I can anticipate an average Halide user will attempt to workaround the termination by RDom r(0, 5);
Func s;
s(x) += input(r.x); ... followed by bounding Func |
Yeah, I decided not to exit early and instead add better handling for scalars (#7726) so hopefully it should work with or without that kind of workaround |
This should be fixed as of top-of-tree, closing (please re-open if you still find errors) |
Provide a minimal reproducible test case where the Anderson2021 autoscheduler failed with segmentation fault. Primarily the L2 norm user defined function.
Contact me if you wish to rebase the changes on top of Halide
v16.0.0
.Expected ASAN error: