-
Notifications
You must be signed in to change notification settings - Fork 244
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
Vasilii made test_execute_primitive resilient to MIOPEN_FIND_ENFORCE #3662
Conversation
Is this not already fixed by @bghimireamd's change here? If we still have spots setting the FIND_ENFORCE environment during testing without properly clearing it, then we need to find and fix that spot I think. Otherwise, we could hit huge increases to testing runtime, and volatility in the single gtest binary. |
We're not sure. I had in my notes that I repro'd the failure last week, but I couldn't repro it today. I'm going to do some testing with and without the single binary this evening to learn more, and I've asked Bibek what has been done. In any case, this is a good fail-safe. Increasing test robustness is one of my primary concerns. |
I've verified this crash does still exist with PR 3653. Continuing to investigate whether it might occur in CQE. |
Still affecting QA. |
|
The ExecutePrimitive test now follows black-box better without requiring modifications to the test itself. |
src/include/miopen/env_debug.hpp
Outdated
@@ -46,6 +46,29 @@ MIOPEN_INTERNALS_EXPORT void UpdateEnvVariable(std::string_view name, std::strin | |||
// MT-Unsafe | |||
MIOPEN_INTERNALS_EXPORT void ClearEnvVariable(std::string_view name); | |||
|
|||
class EnvVarSanitizer |
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.
similar class is here https://github.com/ROCm/MIOpen/blob/develop/test/gtest/gtest_common.hpp#L43. Can we reuse that class?
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.
Sure, I'll add functionality to clear the var to it
20fd6b7
to
5b36341
Compare
|
||
if(prev_env) | ||
{ | ||
lib_env::clear(env_name); |
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.
It might be a good idea to provide logging/exception if clearing the variable fails.
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.
I checked under the hood and I'd say the existing mechanism is sufficient. It already has strict enforcement on valid env names:
Line 207 in 20ddfa7
MIOPEN_THROW(miopenStatusNotImplemented, "Environment variable not found: " + name); |
Glad you mentioned that--I hadn't dived into this code before and it seems the env lists may have gotten out of sync.
Addressing a failure in https://ontrack-internal.amd.com/browse/SWDEV-524093
Fix for CPU_ExecutePrimitive_NONE* tests were sensitive to MIOPEN_FIND_ENFORCE being set in the environment. This was only affecting CQE tests.