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

I Need A Reason! #29

Open
willow-ahrens opened this issue Mar 22, 2019 · 5 comments
Open

I Need A Reason! #29

willow-ahrens opened this issue Mar 22, 2019 · 5 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@willow-ahrens
Copy link
Contributor

This is a feature request for reasoning to be given when functions fail to inline. It would probably require a little bit of hacking to base, but something like the vectorization summaries that llvm provides about "This function didn't inline and why" would be really helpful. For example, "this function hit the recursion limiter," "this function has an unassigned type parameter", or "this function contains an error" would all be great things to know about why a function didn't inline, so that I can go and fix it.

@vchuravy
Copy link
Member

The unassigned type-parameter we can check in Cthulhu, but Keno started to add a remarks framework to base in JuliaLang/julia#31000 which would have helped with the recursion heuristic limiter.

@vchuravy
Copy link
Member

For checking unassigned type-parameters we can mirror CUDANative JuliaGPU/CUDAnative.jl#382

@DilumAluthge
Copy link
Contributor

+1

I would love to see this feature added to Cthulhu. I often have a hard time figuring out why a function wasn't inlined.

Perhaps we could also print the cost (as per the inlining cost-model) next to each function?

@timholy
Copy link
Member

timholy commented Jul 28, 2021

Closed by #160

@timholy timholy closed this as completed Jul 28, 2021
@vchuravy
Copy link
Member

I think we still need an interface to export the inference remarks

function Compiler.add_remark!(interp::CthulhuInterpreter, sv::InferenceState, msg)

@vchuravy vchuravy reopened this Jul 28, 2021
@vchuravy vchuravy added enhancement New feature or request help wanted Extra attention is needed labels Jul 28, 2021
@aviatesk aviatesk self-assigned this Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants