-
Notifications
You must be signed in to change notification settings - Fork 242
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
[gTests]Fix GTEST_SKIP kills all gtests in miopen_gtest #3220
Changes from 1 commit
625d36e
50e5b13
80eb793
2f31c82
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -150,46 +150,47 @@ struct GPU_ConvBiasActivFwd_FP32 | |
}; | ||
|
||
TEST_P(GPU_ConvBiasActivFwd_FP32, DISABLED_DriveAPI) | ||
{ | ||
tensor<float> z{}; | ||
const float alpha = 1.0f; | ||
const auto status = miopenConvolutionBiasActivationForward(&get_handle(), | ||
&alpha, | ||
&input.desc, | ||
in_dev.get(), | ||
&weights.desc, | ||
wei_dev.get(), | ||
conv_desc, | ||
algo, | ||
nullptr, | ||
0, | ||
&alpha, | ||
&z.desc, | ||
nullptr, | ||
&bias.desc, | ||
bias_dev.get(), | ||
activ_desc, | ||
&output.desc, | ||
out_dev.get()); | ||
EXPECT_EQ(status, miopenStatusSuccess); | ||
} | ||
|
||
void GatherCBATestCases(std::vector<CBATestCase>& cba_test_cases) | ||
{ | ||
const auto dev_name = get_handle().GetDeviceName(); | ||
#if WORKAROUND_ISSUE_2212 | ||
if(!miopen::StartsWith(dev_name, "gfx11") && !miopen::StartsWith(dev_name, "gfx94")) | ||
#endif | ||
{ | ||
cba_test_cases.push_back(CBATestCase{ | ||
16, 128, 16, 16, 128, 3, 3, 0, 0, 1, 1, 1, 1, miopenActivationRELU, miopenConvolution}); | ||
|
||
tensor<float> z{}; | ||
const float alpha = 1.0f; | ||
const auto status = miopenConvolutionBiasActivationForward(&get_handle(), | ||
&alpha, | ||
&input.desc, | ||
in_dev.get(), | ||
&weights.desc, | ||
wei_dev.get(), | ||
conv_desc, | ||
algo, | ||
nullptr, | ||
0, | ||
&alpha, | ||
&z.desc, | ||
nullptr, | ||
&bias.desc, | ||
bias_dev.get(), | ||
activ_desc, | ||
&output.desc, | ||
out_dev.get()); | ||
EXPECT_EQ(status, miopenStatusSuccess); | ||
} | ||
else | ||
{ | ||
GTEST_SKIP() << " Skipping fusion test on unsupported ASIC"; | ||
} | ||
} | ||
|
||
void GatherCBATestCases(std::vector<CBATestCase>& cba_test_cases) | ||
{ | ||
cba_test_cases.push_back(CBATestCase{ | ||
16, 128, 16, 16, 128, 3, 3, 0, 0, 1, 1, 1, 1, miopenActivationRELU, miopenConvolution}); | ||
} | ||
|
||
// Extra layer of indirection introduced since GTEST_SKIP() cannot be called from non-void function. | ||
std::vector<CBATestCase> GetTestValues() | ||
{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we could combine these into a single method that returns the testcases, and I think the comment isn't applicable anymore with this fix. std::vector<CBATestCase> GetTestValues()
{
return {{ 16, 128, 16, 16, 128, 3, 3, 0, 0, 1, 1, 1, 1, miopenActivationRELU, miopenConvolution }};
} There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
@BrianHarrisonAMD , thanks for the comments. Cleaned up code |
||
|
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.
Can we move the skip to the start of SetUp(), and use the device flags for skipping instead?
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's a part of overall gtest improvements https://github.com/ROCm/MIOpen/wiki/GTest-development#early-skip
Probably we should add some tickets here #3140
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.
@BrianHarrisonAMD , thanks for the comments. Code updated