Skip to content

Commit

Permalink
Merge pull request #1581 from yut23/add_autodiff
Browse files Browse the repository at this point in the history
Add autodiff library
  • Loading branch information
zingale authored Jun 14, 2024
2 parents e56bbf1 + 11fd505 commit 30469dd
Show file tree
Hide file tree
Showing 158 changed files with 41,305 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .codespellrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[codespell]
skip = .git,*.ipynb,*.bib,*.ps,*~
skip = .git,*.ipynb,*.bib,*.ps,*~,./util/autodiff
ignore-words = .codespell-ignore-words


4 changes: 2 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ indent_style = tab
indent_size = unset


[util/gcem/**]
# don't mess with the gcem subtree
[util/{autodiff,gcem}/**]
# don't mess with the autodiff or gcem subtrees
indent_style = unset
indent_size = unset
trim_trailing_whitespace = unset
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/check_ifdefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ def check_file(filename):
if "tmp_build_dir" in f.parts:
# skip generated files
continue
if f.parts[:2] == ("util", "autodiff"):
# skip third-party autodiff files
continue
ierr, defines = check_file(f)
all_defines += defines
total_errors += ierr
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/style/check_tabs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ find . -type d \( -name .git \
-o -path ./paper \
-o -name build -o -name install \
-o -name tmp_build_dir -o -name tmp_install_dir \
-o -path ./util/autodiff \
\) -prune -o \
-type f \( \( -name "*.H" -o -name "*.h" -o -name "*.hh" -o -name "*.hpp" \
-o -name "*.c" -o -name "*.cc" -o -name "*.cpp" -o -name "*.cxx" \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/style/check_trailing_whitespaces.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ find . -type d \( -name .git \
-o -path ./paper \
-o -name build -o -name install \
-o -name tmp_build_dir -o -name tmp_install_dir \
-o -path ./util/gcem \
-o -path ./util/gcem -o -path ./util/autodiff \
\) -prune -o \
-type f \( \( -name "*.H" -o -name "*.h" -o -name "*.hh" -o -name "*.hpp" \
-o -name "*.c" -o -name "*.cc" -o -name "*.cpp" -o -name "*.cxx" \
Expand Down
3 changes: 3 additions & 0 deletions util/Make.package
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ ifeq ($(USE_REACT),TRUE)
CEXE_headers += linpack.H
endif

INCLUDE_LOCATIONS += $(MICROPHYSICS_HOME)/util/autodiff
DEFINES += -DAUTODIFF_DEVICE_FUNC=AMREX_GPU_HOST_DEVICE

INCLUDE_LOCATIONS += $(MICROPHYSICS_HOME)/util/gcem/include
CEXE_headers += gcem.hpp
8 changes: 8 additions & 0 deletions util/autodiff/.arquive/benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
include_directories(${CMAKE_SOURCE_DIR})

file(GLOB_RECURSE CPPFILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)

foreach(CPPFILE ${CPPFILES})
get_filename_component(CPPNAME ${CPPFILE} NAME_WE)
add_executable(${CPPNAME} ${CPPFILE})
endforeach()
4 changes: 4 additions & 0 deletions util/autodiff/.arquive/benchmarks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Currently broken

What is planned here is the benchmark of
autodiff algorithms against themselves and also against other implementations.
Loading

0 comments on commit 30469dd

Please sign in to comment.