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

GCC 11 and 12 have pathological compile time on test_fuzz_expression_code_gen output #686

Closed
inducer opened this issue Oct 2, 2022 · 8 comments

Comments

@inducer
Copy link
Owner

inducer commented Oct 2, 2022

I was debugging this CI failure, and what I discovered is that gcc 11 and 12 (as used on the beers) have pathologically long compile times on the output of, say,

python test_expression.py 'test_fuzz_expression_code_gen(cl._csc, "complex", 4, lp.ExecutableCTarget)'

after the merge of inducer/pymbolic#110.

Sample generated code is in this gist: https://gist.github.com/inducer/802e227e86e3ff4fd95aa0fefae462fe

gcc -c post-110.c

won't finish in reasonable time for me, but pre-110.c will. Also, gcc 10 is nearly instantaneous on both.

I think the main thing that's affecting this inducer/pymbolic@12569d5.

Nb: Github actions is unaffected, as (I think) the gcc there is older, possibly 10.

@inducer
Copy link
Owner Author

inducer commented Oct 2, 2022

The easy way out of this would be to just go back to flattening, but I'd kind of like to move away from that... floating point math is not associative after all.

@kaushikcfd
Copy link
Collaborator

kaushikcfd commented Oct 2, 2022

Can reproduce this. Even happens with -O0 flags. perf top shows walk_tree_1 routine in GCC is where it takes forever. To be honest, the expression isn't that big at all, probably some regression in gcc-11+.

@inducer
Copy link
Owner Author

inducer commented Oct 3, 2022

@inducer
Copy link
Owner Author

inducer commented Oct 3, 2022

cc @wence- (You guys might get bitten by this.)

@inducer inducer changed the title GCC 11 and 12 have pathological compile time on pycl test_expression.py 'test_fuzz_expression_code_gen output GCC 11 and 12 have pathological compile time on test_fuzz_expression_code_gen output Oct 3, 2022
@inducer
Copy link
Owner Author

inducer commented Oct 3, 2022

#687 is probably as far as that will go.

@inducer
Copy link
Owner Author

inducer commented Oct 3, 2022

I'll go ahead and close this. It's arguably not our bug.

@inducer
Copy link
Owner Author

inducer commented Oct 3, 2022

https://gitlab.tiker.net/inducer/loopy/-/jobs/467837 #687 has CI run times back down to normal levels.

@wence-
Copy link
Contributor

wence- commented Oct 3, 2022

cc @wence- (You guys might get bitten by this.)

Thanks, cc @dham and @connorjward too

@inducer inducer closed this as completed Oct 3, 2022
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

No branches or pull requests

3 participants