Skip to content

Conversation

@DDEle
Copy link
Contributor

@DDEle DDEle commented Jan 6, 2025

@pytorch-bot
Copy link

pytorch-bot bot commented Jan 6, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/144225

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 67c2d5d with merge base 094ca31 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@DDEle
Copy link
Contributor Author

DDEle commented Jan 6, 2025

@pytorchbot label "topic: not user facing"

@@ -2252,6 +2252,12 @@ def _formula_transposed(ln: int, p: int, d: int, k: int, s: int, op: int) -> int
ret_shape.append(
_formula(dims[i], padding[i], dilation[i], kernel_size[i], stride[i])
)
torch._check(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
torch._check(
torch._check_value(

To make it a ValueError

Copy link
Contributor Author

@DDEle DDEle Jan 7, 2025

Choose a reason for hiding this comment

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

Thanks for the suggestion. Updated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just reverted the change.

The problem is, the TORCH_CHECK in cpp/cuda kernels propagate as Python RuntimeError. As this PR was meant to align the behavior of eager and inductor, I guess that it is better to use RuntimeError for now?

if (output_width < 1 || output_height < 1) {
TORCH_CHECK(false,
"Given input size per channel: (",
input_height,
" x ",
input_width,
"). Calculated output spatial size per channel: (",
output_height,
" x ",
output_width,
"). Output size is too small");
}

TORCH_CHECK(false,
"Given input size per channel: (",

TORCH_CHECK(false,
"Given input size per channel: (",

...

@DDEle DDEle requested a review from Skylion007 January 7, 2025 01:54
@DDEle DDEle force-pushed the inductor-ckeck-conv-output branch from c6fd875 to 67c2d5d Compare January 8, 2025 05:38
@DDEle
Copy link
Contributor Author

DDEle commented Jan 9, 2025

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Jan 9, 2025
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

6 participants