DBM: introduced OpenCL support (#3321)

This commit is contained in:
Hans Pabst 2024-03-15 16:41:35 +01:00 committed by GitHub
parent b59d163280
commit aa4adac34c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 402 additions and 86 deletions

View file

@ -6,7 +6,7 @@ The precommit system consists of the following tools that analyze and format the
- [prettify](../prettify/) to format Fortran files.
- [analyze_src](../conventions/analyze_src.py) to check copyright banners and a few other things.
- [ast.parse](https://docs.python.org/3/library/ast.html) to check Python syntax.
- [clang-format](https://clang.llvm.org/docs/ClangFormat.html) to format C and Cuda files.
- [clang-format](https://clang.llvm.org/docs/ClangFormat.html) to format C, Cuda, and OpenCL files.
- [black](https://github.com/psf/black) to format Python scripts.
- [shfmt](https://github.com/mvdan/sh) to format Shell scripts.
- [shellcheck](https://github.com/koalaman/shellcheck) to analyze Shell scripts.

View file

@ -21,7 +21,9 @@ FLAG_EXCEPTIONS = (
r"\$\{.*\}\$",
r"__.*__",
r"CUDA_VERSION",
r"DBM_LIBXSMM_PREFETCH",
r"DBM_VALIDATE_AGAINST_DBCSR",
r"OPENCL_DBM_SOURCE_MULTIPLY_OPENCL",
r"FD_DEBUG",
r"GRID_DO_COLLOCATE",
r"INTEL_MKL_VERSION",
@ -58,7 +60,6 @@ FLAG_EXCEPTIONS = (
r"LIBXSMM_VERSION2",
r"LIBXSMM_VERSION3",
r"LIBXSMM_VERSION4",
r"DBM_LIBXSMM_PREFETCH",
)
FLAG_EXCEPTIONS_RE = re.compile(r"|".join(FLAG_EXCEPTIONS))

View file

@ -194,7 +194,7 @@ def process_file(fn: str, allow_modifications: bool) -> None:
run_local_tool("./tools/doxify/doxify.sh", fn)
run_prettify(fn)
if re.match(r".*\.(c|cu|h)$", fn):
if re.match(r".*\.(c|cu|cl|h)$", fn):
run_remote_tool("clangformat", fn)
if re.match(r".*\.(cc|cpp|cxx|hcc|hpp|hxx)$", fn):