-
Notifications
You must be signed in to change notification settings - Fork 88
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
Fix mod op compile issue on GPU #3086
Conversation
This build is not recommended to merge 🔴 |
🔴bert_large_uncased_fp16: FAILED: MIGraphX is not within tolerance - check verbose output |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #3086 +/- ##
===========================================
- Coverage 91.82% 91.82% -0.01%
===========================================
Files 486 486
Lines 18991 18990 -1
===========================================
- Hits 17438 17437 -1
Misses 1553 1553 ☔ View full report in Codecov by Sentry. |
We should add a function to do the mod on the GPU correctly instead of falling back to float. Maybe something like: template <class T, class U>
constexpr auto mod(T a, U b)
{
if constexpr(is_integral<T>{} and is_integral<U>{})
return a % b;
return vec_transform(a, b)([](auto x0, auto x1) {
return fmod(remainder(x0, x1) + x1, x1);
});
} |
@umangyadav @pfultz2 I've updated the code according to what @pfultz2 mentioned. |
Lifting the failing int8, uint8 and int32 data types to float to workaround the problem described in #2268 (comment)