Skip to content

Commit

Permalink
Add clang-format check to CI
Browse files Browse the repository at this point in the history
This PR adds a check to the CI right after checking out the Torch-MLIR
repository to make sure that the changes in the PR don't require any
`git clang-format` modifications.
  • Loading branch information
ramiro050 committed Jan 30, 2024
1 parent 1d6aca3 commit 8894f8d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with: submodules: true
- name: Validate GitHub Actions yaml files
run: |
yamllint ./.github/workflows/ ./.github/actions/
- name: Check clang-format
run: |
./externals/llvm-project/clang/tools/clang-format/git-clang-format origin/main --diff
2 changes: 1 addition & 1 deletion lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static bool isNoneOrFloatDtype(MLIRContext *context, Value dtype) {
static Type computeReductionType(PatternRewriter &rewriter, Operation *op,
BaseTensorType tensorType, Value dim,
bool keepDim) {
SmallVector<int64_t> sizes;
SmallVector<int64_t> sizes;
int64_t dimInt;
if (tensorType.hasSizes()) {
ArrayRef<int64_t> inputShape = tensorType.getSizes();
Expand Down

0 comments on commit 8894f8d

Please sign in to comment.