-
Notifications
You must be signed in to change notification settings - Fork 74k
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
[oneDNN] Fix conv3d_backprop_filter_v2_grad_test_cpu test failure when oneDNN … #55940
[oneDNN] Fix conv3d_backprop_filter_v2_grad_test_cpu test failure when oneDNN … #55940
Conversation
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.
Thank you for the fix!
@@ -370,6 +370,14 @@ class MklConvCustomBackpropFilterOp | |||
// a correct way to get filter shape. These operator-specific calls | |||
// allow this class to handle this case. | |||
TensorShape src_tf_shape = MakeInputTfShape(context, src_tensor); | |||
const string& op_type = this->type_string(); | |||
if ((op_type.find("3D") != std::string::npos) && |
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.
If the fix is only specific to Conv3DBackpropFilterV2
, why don't we just check for the full string?
if ((op_type.find("3D") != std::string::npos) && | |
if (op_type == "Conv3DBackpropFilterV2") |
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.
@penpornk - thanks for the quick response. In the oneDNN enabled build, the op is replaced by mkl op, there are currently two mkl ops (_MklConv3DBackpropFilterV2, line 745, _MklNativeConv3DBackpropFilterV2, line 763) need to be checked. I used this checking instead of the exact op name similar as what is done in commit 174c509 for the eigen kernel.
Please let me know if you want me to make the change or stay with current code. Thanks
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.
Thank you for the explanation! I forgot about the native and non-native versions. Let's keep the current code. :)
@@ -370,6 +370,14 @@ class MklConvCustomBackpropFilterOp | |||
// a correct way to get filter shape. These operator-specific calls | |||
// allow this class to handle this case. | |||
TensorShape src_tf_shape = MakeInputTfShape(context, src_tensor); | |||
const string& op_type = this->type_string(); | |||
if ((op_type.find("3D") != std::string::npos) && |
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.
Thank you for the explanation! I forgot about the native and non-native versions. Let's keep the current code. :)
Two test are failed, I am trying to look at the details, but not sure if the failure is related to this PR change. For the Code Check-Changed Files, I couldn't see what exactly failed. |
…is enabled
The commit https://github.com/intel-innersource/frameworks.ai.tensorflow.private-tensorflow/commit/174c5096f303d5be7ed2ca2662b08371bff4ab88 introduced a new test case ( testBadFilterShape) in the conv3d_backprop_filter_v2_grad_test.py. This test case has a bad filter shape and expects the corresponding kernel to check for this condition. Update the mkl kernel to add the check for invalid filter shape.