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

Improve inference for paths leading to similar #1980

Merged
merged 4 commits into from
Sep 5, 2020

Conversation

timholy
Copy link
Member

@timholy timholy commented Aug 23, 2020

The companion PR to JuliaLang/julia#37163

The message in the first commit mentions this, but perhaps worth repeating: using Vector rather than Array in certain places allows inference to know that size(A) is a Tuple{Int}, and that ends up fixing some otherwise hard-to-solve problems in inference with the similar pipeline.

@timholy
Copy link
Member Author

timholy commented Aug 23, 2020

Looks like this will require some of my unmerged work on BitArray inference and API, so obviously hold off on merging this.

@timholy timholy closed this Aug 26, 2020
@timholy timholy reopened this Aug 26, 2020
@timholy
Copy link
Member Author

timholy commented Aug 26, 2020

Too hasty, that commit hadn't hit nightly yet. Should be OK tomorrow.

@KristofferC KristofferC reopened this Aug 27, 2020
@KristofferC
Copy link
Member

#1984 made a merge conflict with this, sorry.

@timholy
Copy link
Member Author

timholy commented Aug 27, 2020

No worries.

Pkg doesn't really use multidimensional arrays, and the extra info
about dimensionality allows better inference for output array
allocation.
Inference struggles a bit with the original implementations, but the
new ones work successfully.
@timholy
Copy link
Member Author

timholy commented Sep 5, 2020

Given @staticfloat's upcoming Artifacts stdlib, should I modify this in any way?

@KristofferC KristofferC merged commit ede7b07 into master Sep 5, 2020
@KristofferC KristofferC deleted the teh/similar_inference branch September 5, 2020 14:11
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

Successfully merging this pull request may close these issues.

2 participants