JuliaDebug / JuliaDebug/Cthulhu.jl

descend(sig; interp) vs descend(mi, interp)

Open
#424 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
709
Forks
46
Avg merge
1d 13h
Merged PRs (30d)
2

Description

GPUCompiler.jl is currently invoking Cthulhu by calling descend_code_warntype with a signature and an interpreter; this works fine. As GPUCompiler recently switched to MethodInstances, and I noticed that Cthulhu supports passing a MethodInstance directly, I tried invoking descend_code_warntype(::MethodInstance, interp), but got greeted with the following error:

ERROR: missing `Cthulhu.AbstractCursor` API:
`Cthulhu.CthulhuCursor` is required to implement the `lookup(interp::GPUCompiler.GPUInterpreter, curs::Cthulhu.CthulhuCursor, optimize::Bool)` interface.

I'm not sure what's expected to be implemented, but also: Why does this work when passing a signature, but not when passing a method instance? That seems like a strange difference.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the GPUCompiler call to Cthulhu's descend_code_warntype and the CthulhuCursor lookup API named in the error. Compare the signature and MethodInstance paths, then determine the required interface or behavior; done when MethodInstance invocation works consistently or the expected API requirement is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.