-
Notifications
You must be signed in to change notification settings - Fork 53
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 Memory Model and Internal TRSM failure #852
base: develop
Are you sure you want to change the base?
Conversation
#ifndef USE_INTERNAL_TRSM | ||
EXPECT_GT(size, 2000000); | ||
#else | ||
// internal trsm does not use scratch memory | ||
EXPECT_LT(size, 2000000); | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @AGonzales-amd, those changes fix the failure, but I am afraid that they are not improving the test. The real problem is that this test is making assumptions about the implementation of getrf
, and this is brittle: Unless it is absolutely necessary, we should not allow tests to make any assumptions about internal implementations. Implementations can change and render those assumptions redundant (which is exactly what is happening when getrf
uses our TRSM
).
A more appropriate solution would be to completely remove any calls to getrf
that expect it to allocate an implementation dependent amount of memory, and make sure that the test itself sets everything it needs, explicitly.
#else | ||
// internal trsm does not use scratch memory | ||
EXPECT_EQ(status, rocblas_status_success); | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor questions: Is there a rocsolver function so the user can know say 100MB will be sufficient for the dgetrf rocsolver call for a certain matrix size, or this is just trial-and-error or keep doubling the size until it works? Perhaps when using rocblas managed mode, there is a way to query the max memory pool size used? Perhaps the user can use rocblas managed mode, then later switch to user owned mode (but knowing the max pool size used in rocblas) for higher performance?
This PR fixes the
checkin_misc_MEMORY_MODEL.user_managed
test failure whenROCSOLVER_USE_INTERNAL_BLAS
is set and internal trsm is used forrocsolver_dgetrf_strided_batched
.