Skip to content

Commit

Permalink
Merge pull request #404 from mabruzzo/precommit
Browse files Browse the repository at this point in the history
Introducing pre-commit configuration to call clang-format
  • Loading branch information
evaneschneider authored Jul 3, 2024
2 parents adaea02 + 17cf218 commit cb3d2d5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
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

0 comments on commit cb3d2d5

Please sign in to comment.