-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add op remainder for all platform #4912
base: master
Are you sure you want to change the base?
Conversation
|
remainder 应该实现在 binaryop 里的... |
Codecov Report
@@ Coverage Diff @@
## master #4912 +/- ##
==========================================
- Coverage 89.81% 89.76% -0.05%
==========================================
Files 306 306
Lines 86875 86997 +122
==========================================
+ Hits 78024 78091 +67
- Misses 8851 8906 +55
|
ci 很多编译失败,需要修复 |
目前在x86上根据Torch提供的计算公式进行实现,但貌似结果没法对齐(test_binaryop挂): |
是这里的 roundf( x / y ) 和 div floor 不一样吧 |
遇到了一个奇怪的问题,复现步骤如下:
struct binary_op_remainder
{
float operator()(const float& x, const float& y) const
{
return 0.0f;
}
};
struct binary_op_remainder
{
float func(const float& x, const float& y) const
{
return 0.0f;
}
#if __SSE2__
__m128 func_pack4(const __m128& x, const __m128& y) const
{
__m128 res = _mm_setzero_ps();
return res;
}
#if __AVX__
__m256 func_pack8(const __m256& x, const __m256& y) const
{
__m256 res = _mm256_setzero_ps();
return res;
}
#if __AVX512F__
__m512 func_pack16(const __m512& x, const __m512& y) const
{
__m512 res = _mm512_setzero_ps();
return res;
}
#endif // __AVX512F__
#endif // __AVX__
#endif // __SSE2__ |
test layer gpu failed 表明 vulkan 的实现没有和 binaryop.cpp 对齐 |
原来如此,非常感谢! |
ci 很多测试失败了 qaq |
Remainder
全平台实现