mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-26 05:05:16 -04:00
Add support for Torch which is needed by NequIP
This commit is contained in:
parent
72b5337cad
commit
fcb0f647ee
12 changed files with 856 additions and 7 deletions
|
|
@ -193,7 +193,11 @@ def process_file(fn: str, allow_modifications: bool) -> None:
|
|||
run_remote_tool("clangformat", fn)
|
||||
|
||||
if re.match(r".*\.(cc|cpp|cxx|hcc|hpp|hxx)$", fn):
|
||||
raise Exception(f"C++ is not supported.")
|
||||
if fn.endswith("/torch_c_api.cpp"):
|
||||
# Begrudgingly tolerated because PyTorch has no C API.
|
||||
run_remote_tool("clangformat", fn)
|
||||
else:
|
||||
raise Exception(f"C++ is not supported.")
|
||||
|
||||
if re.match(r"(.*/PACKAGE)|(.*\.py)$", fn):
|
||||
ast.parse(orig_content, filename=fn)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue