Binaryop_x86_avx2文件pow函数bug报告
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 23.8k
- Forks
- 4.5k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 37
Description
pow函数存在bug,具体:
struct binary_op_pow_pack8
{
__m256 operator()(const __m256& x, const __m256& y) const
{
return exp256_ps(_mm256_mul_ps(y, log256_ps(x)));
}
};
pow(x,y)的实现基于等价形式exp(y*ln(x)),此种情况仅对x>0成立;如果x<0则会出现Nan。
另外,arm实现也存在同样问题;vulkan不了解,暂时未发现。
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 with the binary_op_pow_pack8 operator shown in the issue and trace the corresponding ARM implementation; compare how pow handles negative x across the SIMD backends. Determine the intended behavior for negative bases, then add coverage for the affected cases and verify that the implementations no longer produce NaN solely because they use exp(y*log(x)).
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100