Autobatching fails: active_batched[0:abmax] == 0 -> curr_prof == -1
- Dominant language
- C++
- Stars
- 3.4k
- Forks
- 701
- PR merge metrics
- No merged PRs in 30d
Description
I have a setup that works fine without autobatching. When enabling, I get a SIGSEV at `exec.cc:599`.
The loop at `exec.cc:584` ff tries to find curr_prof by iterating from 1 to `abmax` (which is 363 in my example)
`active_batched` has 806 elements, about the first half is 0. Crucially, all its elements from 1 to 363 are zero, therefore the if clause at `exec.cc:586` is never met and `curr_prof` is never set.
`curr_prof` is then used for lookups and everything breaks apart.
I don't know enough about the code to understand what the data should look like. I also don't have a minimal example because this is all tied into a big java/scala program.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the autobatching path in exec.cc, especially lines 584-599, and inspect how curr_prof and active_batched are expected to be populated. Reproduce the SIGSEV if possible with the reported Java/Scala setup, then identify the expected behavior when the scan finds no active profile. Done means autobatching no longer reaches the failing lookup and the behavior is covered by an appropriate regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, java, scala
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100