Skip to content

Commit

Permalink
[HotFix] Env Var set conflicts between #2543 and #2514 (#2571)
Browse files Browse the repository at this point in the history
  • Loading branch information
junliume authored Nov 30, 2023
1 parent 8605896 commit 295a9b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def rocmnode(name) {
return 'rocmtest && miopen && (' + name + ')'
return '(rocmtest || miopen) && (' + name + ')'
}

def miopenCheckout()
Expand Down
10 changes: 7 additions & 3 deletions test/gtest/sum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,20 @@
* SOFTWARE.
*
*******************************************************************************/
#include <miopen/env.hpp>
#include "sum.hpp"

MIOPEN_DECLARE_ENV_VAR_STR(MIOPEN_TEST_FLOAT_ARG)
MIOPEN_DECLARE_ENV_VAR_BOOL(MIOPEN_TEST_ALL)

std::string GetFloatArg()
{
static const auto tmp = miopen::GetEnv("MIOPEN_TEST_FLOAT_ARG");
const auto& tmp = miopen::GetStringEnv(ENV(MIOPEN_TEST_FLOAT_ARG));
if(tmp.empty())
{
return "";
}
return tmp.front();
return tmp;
}

struct SumTestFloat : SumTest<float>
Expand All @@ -41,7 +45,7 @@ struct SumTestFloat : SumTest<float>

TEST_P(SumTestFloat, SumTestFw)
{
if(miopen::IsEnvvarValueEnabled("MIOPEN_TEST_ALL") && (GetFloatArg() == "--float"))
if(miopen::IsEnabled(ENV(MIOPEN_TEST_ALL)) && (GetFloatArg() == "--float"))
{
RunTest();
Verify();
Expand Down

0 comments on commit 295a9b3

Please sign in to comment.