Autodiff framework never runs functions that have size zero outputs
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 839
- Forks
- 220
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 14
Description
Description
With a lot of our matrix functions we are allowing size zero inputs and expecting size zero outputs.
Sometimes these size zero edge cases give segfaults or other unexpected things, and should be checked.
Right now the autodiff test framework is only evaluating autodiff'd functions if the output is non-zero size. Check here.
Current Version:
v4.0.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at test/unit/math/test_ad.hpp around line 476, where autodiff functions are evaluated only when the output has non-zero size. Trace the surrounding test framework and adjust its coverage so functions producing size-zero outputs are evaluated as well; done means these edge cases are checked without being skipped.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100