Skip to content

Conversation

FFFrog
Copy link
Collaborator

@FFFrog FFFrog commented Mar 4, 2025

Stack from ghstack (oldest at bottom):

APis involved are as followed:

  • adaptive_avg_pool2d
  • adaptive_avg_pool3d
  • binary_cross_entropy
  • col2im

ISSUE Related:
#148404

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Mar 4, 2025

🔗 Helpful Links

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

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

❌ 2 Cancelled Jobs

As of commit 0c301b9 with merge base 56b03df (image):

CANCELLED JOBS - The following jobs were cancelled. Please retry:

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

@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label Mar 4, 2025
FFFrog added a commit that referenced this pull request Mar 4, 2025
APis involved are as followed:

- adaptive_avg_pool2d
- adaptive_avg_pool3d
- binary_cross_entropy
- col2im

ISSUE Related:
#148404

ghstack-source-id: abd7f6c
Pull Request resolved: #148405
[ghstack-poisoned]
FFFrog added a commit that referenced this pull request Mar 17, 2025
APis involved are as followed:

- adaptive_avg_pool2d
- adaptive_avg_pool3d
- binary_cross_entropy
- col2im

ISSUE Related:
#148404

ghstack-source-id: d0fb81e
Pull Request resolved: #148405
@FFFrog FFFrog requested a review from ezyang March 27, 2025 07:50
Copy link
Contributor

@zou3519 zou3519 left a comment

Choose a reason for hiding this comment

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

Honestly speaking I don't know what this PR does or what the linked issue is trying to do. Could you explain more please?

@FFFrog
Copy link
Collaborator Author

FFFrog commented Apr 9, 2025

Of course, @zou3519

As shown below:

pytorch/torch/nn/functional.py

Lines 1370 to 1382 in 2e7c9d3

def adaptive_avg_pool2d(input: Tensor, output_size: BroadcastingList2[int]) -> Tensor:
r"""Apply a 2D adaptive average pooling over an input signal composed of several input planes.
See :class:`~torch.nn.AdaptiveAvgPool2d` for details and output shape.
Args:
output_size: the target output size (single integer or
double-integer tuple)
"""
if has_torch_function_unary(input):
return handle_torch_function(adaptive_avg_pool2d, (input,), input, output_size)
_output_size = _list_with_default(output_size, input.size())
return torch._C._nn.adaptive_avg_pool2d(input, _output_size)

torch._C._nn.adaptive_avg_pool2d provides the basic functionality of torch.nn. functional.adaptive_avg_pool2d, but lacks code hints for torch._C._nn.adaptive_avg_pool2d. Similar to _C.__init__.pyi, we need to add code hints for _C._nn._pyi. Since part of _nn.pyi is automatically generated by codegen, I made some changes to tools/pyi/gen_pyi.py.

@zou3519
Copy link
Contributor

zou3519 commented Apr 9, 2025

Can we add tests for this?

@FFFrog
Copy link
Collaborator Author

FFFrog commented Apr 9, 2025

Can we add tests for this?

Yes, in theory, we can add tests for this.

However, this test is a little special: we cannot write test cases for it directly, but can only write scripts to dynamically filter specific attributes in torch._C._nn and compare them with the pre-made entries in tools/pyi/gen_pyi.py to see if there are any missing ones.

If you think the above solution is feasible, then I can complete this test case together with the final PR that fills in these code hints.

@FFFrog
Copy link
Collaborator Author

FFFrog commented Apr 14, 2025

Hey @zou3519
Could you help to check it again? Thank you.

@FFFrog FFFrog requested a review from albanD April 17, 2025 02:38
@FFFrog
Copy link
Collaborator Author

FFFrog commented Jun 12, 2025

Hey @zou3519,could you help to check it again?

@ezyang
Copy link
Contributor

ezyang commented Jun 13, 2025

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Jun 13, 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

@pytorchmergebot
Copy link
Collaborator

@ezyang
Copy link
Contributor

ezyang commented Jun 13, 2025

@pytorchbot merge -r

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

[ghstack-poisoned]
pytorchmergebot pushed a commit that referenced this pull request Jun 13, 2025
APis involved are as followed:

- adaptive_avg_pool2d
- adaptive_avg_pool3d
- binary_cross_entropy
- col2im

ISSUE Related:
#148404

ghstack-source-id: a494288
Pull Request resolved: #148405
@pytorchmergebot
Copy link
Collaborator

Successfully rebased gh/fffrog/49/orig onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via ghstack checkout https://github.com/pytorch/pytorch/pull/148405)

@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

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 2 mandatory check(s) failed. The first few are:

Dig deeper by viewing the failures on hud

Details for Dev Infra team Raised by workflow job

Failing merge rule: Core Maintainers

[ghstack-poisoned]
[ghstack-poisoned]
FFFrog added a commit that referenced this pull request Jun 13, 2025
APis involved are as followed:

- adaptive_avg_pool2d
- adaptive_avg_pool3d
- binary_cross_entropy
- col2im

ISSUE Related:
#148404

ghstack-source-id: 70bd663
Pull Request resolved: #148405
@FFFrog
Copy link
Collaborator Author

FFFrog commented Jun 13, 2025

@pytorchbot merge

@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

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 2 jobs have failed, first few of them are: trunk / linux-jammy-rocm-py3.10 / test (default, 2, 2, linux.rocm.gpu.2), trunk / linux-jammy-rocm-py3.10 / test (default, 1, 2, linux.rocm.gpu.2)

Details for Dev Infra team Raised by workflow job

@FFFrog
Copy link
Collaborator Author

FFFrog commented Jun 14, 2025

@pytorchbot merge

@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

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 2 jobs have failed, first few of them are: trunk / linux-jammy-rocm-py3.10 / test (default, 2, 2, linux.rocm.gpu.2), trunk / linux-jammy-rocm-py3.10 / test (default, 1, 2, linux.rocm.gpu.2)

Details for Dev Infra team Raised by workflow job

@FFFrog
Copy link
Collaborator Author

FFFrog commented Jun 14, 2025

@pytorchbot merge -i

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged while ignoring the following 2 checks: trunk / linux-jammy-rocm-py3.10 / test (default, 2, 2, linux.rocm.gpu.2), trunk / linux-jammy-rocm-py3.10 / test (default, 1, 2, linux.rocm.gpu.2)

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

@github-actions github-actions bot deleted the gh/fffrog/49/head branch July 15, 2025 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request Merged open source topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants