pytorch icon indicating copy to clipboard operation
pytorch copied to clipboard

Editing gen_jit_shape_functions to make lintrunner happy

Open Gamrix opened this issue 3 years ago • 2 comments

Stack from ghstack:

  • -> #79571
  • #83092
  • #82850

Somehow even with clang-format off, it was unhappy with this line

Lint for torch/csrc/jit/runtime/serialized_shape_function_registry.cpp:

Warning (CLANGFORMAT) format See https://clang.llvm.org/docs/ClangFormat.html. Run lintrunner -a to apply this patch.

You can run `lintrunner -a` to apply this patch.

2855  2855 |   return shape_mappings;
2856  2856 | }
2857  2857 |
2857       |-
2859  2858 | // clang-format on
2860  2859 |
2861  2860 | } // namespace jit

Note that there is no changes to serialized_shape_function_registry.cpp in this diff because I had to manually run lintrunner to make it format the code correctly in the previous diff so that we can land it.

Gamrix avatar Jun 14 '22 22:06 Gamrix

:link: Helpful links

:white_check_mark: No Failures (0 Pending)

As of commit 169a71b6d4 (more details on the Dr. CI page):

Expand to see more

:green_heart: :green_heart: Looks good so far! There are no failures yet. :green_heart: :green_heart:


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.

facebook-github-bot avatar Jun 14 '22 22:06 facebook-github-bot

Yes, this diff fixes the format so that future diffs do not need to be edited for manual linting. I was just bringing up that the previous diff in the stack needed manual changes so that I wouldn't make lintrunner unhappy.

Gamrix avatar Aug 09 '22 21:08 Gamrix

@pytorchmergebot merge --force "Previous commit in stack has a test error that is an infra error"

Gamrix avatar Aug 10 '22 18:08 Gamrix

@pytorchbot successfully started a merge job. Check the current status here

pytorchmergebot avatar Aug 10 '22 18:08 pytorchmergebot

Hey @Gamrix. You've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'. For changes that are 'topic: not user facing' there is no need for a release notes label.

github-actions[bot] avatar Aug 10 '22 18:08 github-actions[bot]