Skip to content

Fix checkfail of tf.raw_ops.AvgPool with negative kernel size in Debug builds - #63089

Closed
SuryanarayanaY wants to merge 2 commits into
masterfrom
SuryanarayanaY-patch-14
Closed

SuryanarayanaY wants to merge 2 commits into
masterfrom
SuryanarayanaY-patch-14

Conversation

@SuryanarayanaY

Copy link
Copy Markdown
Collaborator

Currently shape inference step of tf.raw_ops.AvgPool allows 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

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
@google-ml-butler google-ml-butler Bot added the size:XS CL Change Size: Extra Small label Feb 29, 2024
@google-ml-butler google-ml-butler Bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Feb 29, 2024
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Feb 29, 2024
@gbaned gbaned added the comp:core issues related to core part of tensorflow label Mar 4, 2024
Comment on lines +892 to +895
if (val < 0 && val != InferenceContext::kUnknownDim) {
return errors::InvalidArgument("Dimension must be non-negative or equal to ",
"InferenceContext::kUnknownDim but got ", val,".");
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@gbaned

gbaned commented Mar 18, 2024

Copy link
Copy Markdown
Contributor

Hi @SuryanarayanaY Can you please check @mihaimaruseac's comments ? Thank you!

@gbaned gbaned added stat:awaiting response Status - Awaiting response from author and removed ready to pull PR ready for merge process labels Mar 18, 2024
@github-actions

github-actions Bot commented Apr 2, 2024

Copy link
Copy Markdown

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.

@github-actions github-actions Bot added the stale This label marks the issue/pr stale - to be closed automatically if no activity label Apr 2, 2024
@gbaned

gbaned commented Apr 16, 2024

Copy link
Copy Markdown
Contributor

Hi @SuryanarayanaY Any update on this PR? Please. Thank you!

@google-ml-butler google-ml-butler Bot removed stale This label marks the issue/pr stale - to be closed automatically if no activity stat:awaiting response Status - Awaiting response from author labels Apr 16, 2024
@gbaned

gbaned commented Apr 26, 2024

Copy link
Copy Markdown
Contributor

Hi @SuryanarayanaY Any update on this PR? Please. Thank you!

@gbaned gbaned added the stat:awaiting response Status - Awaiting response from author label Apr 26, 2024
@github-actions

Copy link
Copy Markdown

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.

@github-actions github-actions Bot added the stale This label marks the issue/pr stale - to be closed automatically if no activity label May 11, 2024
@github-actions

Copy link
Copy Markdown

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.

@github-actions github-actions Bot closed this May 25, 2024
@google-ml-butler google-ml-butler Bot removed the stat:awaiting response Status - Awaiting response from author label May 25, 2024
@mihaimaruseac
mihaimaruseac deleted the SuryanarayanaY-patch-14 branch May 25, 2024 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:core issues related to core part of tensorflow size:XS CL Change Size: Extra Small stale This label marks the issue/pr stale - to be closed automatically if no activity

Projects

Status: Closed/Rejected

Development

Successfully merging this pull request may close these issues.

4 participants