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

Introducing pre-commit configuration to call clang-format #404

Merged
merged 2 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ci:
autofix_prs: false


repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
# unlike most pre-commit tools, the version of this repository exactly
# matches the version of clang-format
rev: v17.0.1
hooks:
- id: clang-format
verbose: true
types_or: [c++, c, cuda]
args: ["-style=file", "--verbose"]

4 changes: 2 additions & 2 deletions src/utils/gpu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ static constexpr int maxWarpsPerBlock = 1024 / WARPSIZE;
#define hipLaunchKernelGGL(F, G, B, M, S, ...) F<<<G, B, M, S>>>(__VA_ARGS__)
#define __shfl_down(...) __shfl_down_sync(0xFFFFFFFF, __VA_ARGS__)

// Used to Wrap template kernels with more than one parameter in this to avoid errors. This is present in the HIP
// runtime but not the CUDA runtime
// Used to Wrap template kernels with more than one parameter in this to avoid errors. This is present in the HIP
// runtime but not the CUDA runtime
#define HIP_KERNEL_NAME(...) __VA_ARGS__
#endif // O_HIP

Expand Down
Loading