-
Notifications
You must be signed in to change notification settings - Fork 325
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
120 lines (112 loc) · 4.38 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
120 lines (112 loc) · 4.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# Pre-commit (https://pre-commit.com) configuration for assorted lint checks.
#
# See https://pre-commit.com/hooks.html for more hooks.
# Top level exclusions from all hooks. Some of these could be moved into more
# specific exclusions like check-yaml and clang-format, but for large generated
# files even simple hooks like trailing-whitespace can be expensive.
#
# Note the yaml multiline literal and (?x) regex flag used here, see
# https://pre-commit.com/#regular-expressions.
exclude: |
(?x)
# ==========================================================================
# Opted-out projects
# To opt-in, remove your project from the exclusions.
# See CONTRIBUTING.md for detailed instructions.
# ==========================================================================
projects/composablekernel/.*|
projects/hipblas/.*|
projects/hipblaslt/.*|
projects/hipblas-common/.*|
projects/hipcub/.*|
projects/hipfft/.*|
projects/hiprand/.*|
projects/hipsolver/.*|
projects/hipsparse/.*|
projects/hipsparselt/.*|
projects/hiptensor/.*|
projects/rocblas/.*|
projects/rocfft/.*|
projects/rocprim/.*|
projects/rocsolver/.*|
projects/rocsparse/.*|
projects/rocthrust/.*|
projects/rocwmma/.*|
shared/mxdatagenerator/.*|
shared/origami/.*|
shared/rocroller/.*|
shared/tensile/.*|
# ==========================================================================
# Permanent exclusions
# ==========================================================================
# Auto-generated GitHub Agentic Workflow lock files
\.github/workflows/.*\.lock\.yml$|
# Binary files
projects/hipdnn/.*\.bin$|
# Generated hipDNN FlatBuffers headers
projects/hipdnn/flatbuffers_sdk/include/hipdnn_flatbuffers_sdk/data_objects/.*_generated\.h|
# Reference data (auto-generated)
dnn-providers/integration-tests/integration_test_bundles/.*|
# Generated files (see rocrand/tools/ _generator.cpp files)
projects/rocrand/library/.*constants\.(cpp|h)|
projects/rocrand/library/.*precomputed\.(cpp|h)|
# MIOpen exclusion list
projects/miopen/.*\.s$|
projects/miopen/.*\.inc$|
projects/miopen/.*\.model$|
# RPP exclusion list
projects/rpp/utilities/test_suite/TEST_IMAGES/three_images_yuv/.*|
projects/rpp/utilities/test_suite/REFERENCE_OUTPUT/yuv_to_rgb/.*|
projects/rpp/utilities/test_suite/REFERENCE_OUTPUT/yuv_to_rgb_cubic_v/.*|
projects/rpp/utilities/test_suite/REFERENCE_OUTPUT/yuv_to_rgb-linear_v/.*
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
exclude: |
(?x)
^projects/hipdnn/\.clang-format$|
^projects/miopen/\.clang-format$|
^dnn-providers/miopen-provider/\.clang-format$|
^dnn-providers/hipblaslt-provider/\.clang-format$|
^dnn-providers/hip-kernel-provider/\.clang-format$|
^dnn-providers/integration-tests/\.clang-format$
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 25.12.0
hooks:
- id: black
language_version: python3
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.4
hooks:
- id: clang-format
name: clang-format (C/C++/ObjC)
entry: clang-format -i -style=file
files: '\.(c|cpp|cc|h|hpp|m|mm|cl)$|\.(h|hpp|cpp)\.in$'
- repo: local
hooks:
- id: flatc-hipdnn
name: flatc (hipDNN)
entry: python projects/hipdnn/scripts/run_flatc.py
language: python
files: ^projects/hipdnn/(data_sdk|flatbuffers_sdk)/schemas/.*\.fbs$
pass_filenames: true
- id: gtest-format-miopen
name: GTest naming conventions (MIOpen)
entry: python projects/miopen/test/utils/gtest_formating_checks.py
language: python
files: ^projects/miopen/test/gtest/.*\.cpp$
pass_filenames: false
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.10
hooks:
- id: cmake-lint
# MIOpen CMake files have not been audited for cmake-lint compliance yet.
exclude: ^projects/miopen/.*
# cmake-format is disabled due to undesirable formatting.
# We can investigate changing the configuration before re-enabling or using an alternative tool.
# - id: cmake-format