Skip to content

call tensor-only kernels from prototype kernels if possible #5455

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

Closed
wants to merge 1 commit into from

Conversation

pmeier
Copy link
Collaborator

@pmeier pmeier commented Feb 22, 2022

Addresses the first part of #5421 (comment). The idea behind this change is to make it more clear that our low-level kernels are tensor only and thus cannot use the same route as PIL images in the dispatch. There are two caveats:

  1. Some old kernels are only implemented for tensors and thus the kernel is implemented in torchvision.transforms.functional directly:
    • erase
    • normalize
  2. Some kernels are composite and thus don't have a PIL or tensor implementation and thus are also only implemented in torchvision.transforms.functional
    • center_crop
    • resized_crop
    • ten_crop
    • five_crop

@facebook-github-bot
Copy link

facebook-github-bot commented Feb 22, 2022

💊 CI failures summary and remediations

As of commit 47ed932 (more details on the Dr. CI page):


  • 1/1 failures introduced in this PR

🕵️ 1 new failure recognized by patterns

The following CI failures do not appear to be due to upstream breakages:

See CircleCI build lint_python_and_config (1/1)

Step: "Install pre-commit hooks" (full log | diagnosis details | 🔁 rerun)

ERROR: Command errored out with exit status 1: ...mpjx2nnnxd Check the logs for full command output.
          docstring, version = get_docstring_and_version_via_import(target)
        File "/tmp/pip-build-env-qewtmp8m/overlay/lib/python3.7/site-packages/flit_core/common.py", line 171, in get_docstring_and_version_via_import
          spec.loader.exec_module(m)
        File "<frozen importlib._bootstrap_external>", line 728, in exec_module
        File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
        File "/home/circleci/.cache/pre-commit/repos5s0yky8/ufmt/__init__.py", line 6, in <module>
          from .__version__ import __version__
      ModuleNotFoundError: No module named 'flit_core.dummy'
      ----------------------------------------
    WARNING: Discarding file:///home/circleci/.cache/pre-commit/repos5s0yky8. Command errored out with exit status 1: /home/circleci/.cache/pre-commit/repos5s0yky8/py_env-python3.7/bin/python /home/circleci/.cache/pre-commit/repos5s0yky8/py_env-python3.7/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpjx2nnnxd Check the logs for full command output.
    ERROR: Command errored out with exit status 1: /home/circleci/.cache/pre-commit/repos5s0yky8/py_env-python3.7/bin/python /home/circleci/.cache/pre-commit/repos5s0yky8/py_env-python3.7/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpjx2nnnxd Check the logs for full command output.
    
Check the log at /home/circleci/.cache/pre-commit/pre-commit.log


Exited with code exit status 3


This comment was automatically generated by Dr. CI (expand for details).

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

Click here to manually regenerate this comment.

@datumbox
Copy link
Contributor

As discussed offline with @pmeier we will close this PR and move it to the changes directly to #5421 so that everything is in one place.

@datumbox datumbox closed this Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants