Repository navigation
Fix checkfail of tf.raw_ops.AvgPool with negative kernel size in Debug builds - #63089
SuryanarayanaY wants to merge 2 commits into
Conversation
Currently shape inference step of tf.raw_ops.AvgPool allows negative kernel size.But in debug build it works as the check is DCHECK which works only in debug build. Removed DCHECK and added general conditional check for same. Ref issue #63034
| if (val < 0 && val != InferenceContext::kUnknownDim) { | ||
| return errors::InvalidArgument("Dimension must be non-negative or equal to ", | ||
| "InferenceContext::kUnknownDim but got ", val,"."); | ||
| } |
There was a problem hiding this comment.
Actually, you cannot do that here. This is a constructor, see line 194 for the type definition.
What you need to do is to make a static function that can return a value or a status (or return a status after building a outval value) and put the check there. Then callers need to be updated to call that method instead of the constructor.
|
Hi @SuryanarayanaY Can you please check @mihaimaruseac's comments ? Thank you! |
|
This PR is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you. |
|
Hi @SuryanarayanaY Any update on this PR? Please. Thank you! |
|
Hi @SuryanarayanaY Any update on this PR? Please. Thank you! |
|
This PR is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you. |
|
This PR was closed because it has been inactive for 14 days since being marked as stale. Please reopen if you'd like to work on this further. |
Currently shape inference step of
tf.raw_ops.AvgPoolallows negative kernel size.But in debug build it aborts with checkfail as there is DCHECK which works only in debug build. Replaced DCHECK with general conditional check.Ref issue #63034