Skip to content
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

ENH Enables No-batch for *Pad1d Modules #61060

Closed

Conversation

thomasjpfan
Copy link
Contributor

Toward #60585

This PR adds a single_batch_reference_fn that uses the single batch implementation to check no-batch.

@thomasjpfan thomasjpfan added module: nn Related to torch.nn triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels Jun 30, 2021
@thomasjpfan thomasjpfan requested a review from albanD as a code owner June 30, 2021 18:29
@thomasjpfan thomasjpfan added this to In Progress in torch.nn via automation Jun 30, 2021
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Jun 30, 2021

💊 CI failures summary and remediations

As of commit a4e0fea (more details on the Dr. CI page and at hud.pytorch.org/pr/61060):



1 failure not recognized by patterns:

Job Step Action
GitHub Actions Windows CI (pytorch-win-vs2019-cpu-py3) / test (default, 2, 2, windows.4xlarge) Checkout PyTorch 🔁 rerun

❄️ 1 failure tentatively classified as flaky

but reruns have not yet been triggered to confirm:

See CircleCI build pytorch_linux_bionic_cuda10_2_cudnn7_py3_9_gcc7_test1 (1/1)

Step: "Set Up CI Environment After attach_workspace" (full log | diagnosis details | 🔁 rerun) ❄️

E: Failed to fetch http://mirrors.lug.mtu.edu/u...c17423c0862 404 Not Found [IP: 38.229.66.100 80]
OK
+ curl -s -L https://nvidia.github.io/nvidia-docker/ubuntu20.04/nvidia-docker.list
+ sudo tee /etc/apt/sources.list.d/nvidia-docker.list
deb https://nvidia.github.io/libnvidia-container/stable/ubuntu18.04/$(ARCH) /
#deb https://nvidia.github.io/libnvidia-container/experimental/ubuntu18.04/$(ARCH) /
deb https://nvidia.github.io/nvidia-container-runtime/stable/ubuntu18.04/$(ARCH) /
#deb https://nvidia.github.io/nvidia-container-runtime/experimental/ubuntu18.04/$(ARCH) /
deb https://nvidia.github.io/nvidia-docker/ubuntu18.04/$(ARCH) /
+ sudo apt-get update -qq
W: --force-yes is deprecated, use one of the options starting with --allow instead.
E: Failed to fetch http://mirrors.lug.mtu.edu/ubuntu/dists/focal-updates/main/cnf/by-hash/SHA256/02b3a578709e5f4ac01eaca36897dc34320ae3dab94e337c3a62bc17423c0862  404  Not Found [IP: 38.229.66.100 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.


Exited with code exit status 100

Retrieving test reports
must specify at least one container source
No test reports found!
CONTAINER ID   NAME      CPU %     MEM USAGE / LIMIT   MEM %     NET I/O   BLOCK I/O   PIDS
Jul 20 20:58:27 "docker exec" requires at least 2 arguments.

Preview docs built from this PR

This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@albanD albanD removed their request for review July 9, 2021 16:44
Copy link
Contributor

@jbschlosser jbschlosser left a comment

Choose a reason for hiding this comment

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

Looking good! Couple minor comments below

@@ -44,8 +44,7 @@ inline Tensor pad(const Tensor& input,
"Padding mode \"",
torch::enumtype::get_enum_name(mode),
"\" doesn't take in value argument");
if (input.dim() == 3) {
TORCH_CHECK(pad.size() == 2, "3D tensors expect 2 values for padding");
if (pad.size() == 2 and (input.dim() == 2 or input.dim() == 3)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

There's a TORCH_CHECK call below in the final else branch that needs a slightly tweaked error message now

Copy link
Contributor

Choose a reason for hiding this comment

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

@thomasjpfan Whoops, I missed this before, but it looks like some python syntax snuck in here:

  • and -> &&
  • or -> ||

torch/nn/functional.py Show resolved Hide resolved
torch/testing/_internal/common_nn.py Outdated Show resolved Hide resolved
Copy link
Contributor

@jbschlosser jbschlosser left a comment

Choose a reason for hiding this comment

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

LGTM!

@facebook-github-bot
Copy link
Contributor

@jbschlosser has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@jbschlosser has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

torch.nn automation moved this from In Progress to Done Jul 21, 2021
@facebook-github-bot
Copy link
Contributor

@jbschlosser merged this pull request in 48af9de.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed Merged module: nn Related to torch.nn open source triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
torch.nn
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants