Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#4173)
Browse files Browse the repository at this point in the history
<!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.6.7 →
v0.6.8](astral-sh/ruff-pre-commit@v0.6.7...v0.6.8)
- [github.com/pre-commit/mirrors-clang-format: v18.1.8 →
v19.1.0](pre-commit/mirrors-clang-format@v18.1.8...v19.1.0)
- https://github.com/pylint-dev/pylint/: v3.3.0 → v3.3.1
<!--pre-commit.ci end-->

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jinzhe Zeng <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and njzjz authored Oct 7, 2024
1 parent a0747b9 commit 2feb21c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ repos:
exclude: ^source/3rdparty
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.6.7
rev: v0.6.8
hooks:
- id: ruff
args: ["--fix"]
Expand All @@ -52,10 +52,10 @@ repos:
- id: blacken-docs
# C++
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.8
rev: v19.1.0
hooks:
- id: clang-format
exclude: ^source/3rdparty|source/lib/src/gpu/cudart/.+\.inc
exclude: ^(source/3rdparty|source/lib/src/gpu/cudart/.+\.inc|.+\.ipynb$)
# markdown, yaml, CSS, javascript
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
Expand Down Expand Up @@ -146,7 +146,7 @@ repos:
exclude: .pre-commit-config.yaml|source/lmp
# customized pylint rules
- repo: https://github.com/pylint-dev/pylint/
rev: v3.3.0
rev: v3.3.1
hooks:
- id: pylint
entry: env PYTHONPATH=source/checker pylint
Expand Down
12 changes: 8 additions & 4 deletions source/lib/include/gpu_cuda.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
#define gpuMemset cudaMemset

#define GPU_MAX_NBOR_SIZE 4096
#define DPErrcheck(res) \
{ DPAssert((res), __FILE__, __LINE__); }
#define DPErrcheck(res) \
{ \
DPAssert((res), __FILE__, __LINE__); \
}
inline void DPAssert(cudaError_t code,
const char *file,
int line,
Expand Down Expand Up @@ -54,8 +56,10 @@ inline void DPAssert(cudaError_t code,
}
}

#define nborErrcheck(res) \
{ nborAssert((res), __FILE__, __LINE__); }
#define nborErrcheck(res) \
{ \
nborAssert((res), __FILE__, __LINE__); \
}
inline void nborAssert(cudaError_t code,
const char *file,
int line,
Expand Down
12 changes: 8 additions & 4 deletions source/lib/include/gpu_rocm.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
#define gpuMemcpyDeviceToDevice hipMemcpyDeviceToDevice
#define gpuMemset hipMemset

#define DPErrcheck(res) \
{ DPAssert((res), __FILE__, __LINE__); }
#define DPErrcheck(res) \
{ \
DPAssert((res), __FILE__, __LINE__); \
}
inline void DPAssert(hipError_t code,
const char *file,
int line,
Expand All @@ -39,8 +41,10 @@ inline void DPAssert(hipError_t code,
}
}

#define nborErrcheck(res) \
{ nborAssert((res), __FILE__, __LINE__); }
#define nborErrcheck(res) \
{ \
nborAssert((res), __FILE__, __LINE__); \
}
inline void nborAssert(hipError_t code,
const char *file,
int line,
Expand Down

0 comments on commit 2feb21c

Please sign in to comment.