Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add header files to ClangEnzyme target #2062

Merged
merged 4 commits into from
Oct 18, 2024
Merged

Conversation

jandrej
Copy link
Contributor

@jandrej jandrej commented Aug 30, 2024

No description provided.

@@ -208,6 +208,13 @@ target_compile_options(ClangEnzymeFlags INTERFACE "-fplugin=$<TARGET_FILE:ClangE
add_custom_target(ClangEnzymeDummy "" DEPENDS ClangEnzyme-${LLVM_VERSION_MAJOR})
add_dependencies(ClangEnzymeFlags ClangEnzymeDummy)

set_property(TARGET ClangEnzyme-${LLVM_VERSION_MAJOR}
PROPERTY PUBLIC_HEADER
${PROJECT_SOURCE_DIR}/include/enzyme/enzyme
Copy link
Member

@wsmoses wsmoses Aug 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also can we add a warning to the top of the file:
// These files are auto-generated and should not be generated. They are installed by Enzyme to represent the internal behavior of the compiler which are not impacted by a source modification.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to the top of the file

you mean the top of the line or the top of the include files?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to the top of the include files

@jandrej
Copy link
Contributor Author

jandrej commented Aug 30, 2024

We probably also need to change the capitalization to be consistent with the files. There's a clash between enzyme and Enzyme as the top directory at the moment.

@wsmoses
Copy link
Member

wsmoses commented Aug 31, 2024

We probably also need to change the capitalization to be consistent with the files. There's a clash between enzyme and Enzyme as the top directory at the moment.

I don't quite follow here, the installed file should be in some /include dir no?

@jandrej
Copy link
Contributor Author

jandrej commented Aug 31, 2024

We probably also need to change the capitalization to be consistent with the files. There's a clash between enzyme and Enzyme as the top directory at the moment.

I don't quite follow here, the installed file should be in some /include dir no?

Yes they are in include/Enzyme/$HEADER while the internal files include from include/enzyme/$HEADER.

@wsmoses
Copy link
Member

wsmoses commented Aug 31, 2024 via email

@jandrej
Copy link
Contributor Author

jandrej commented Aug 31, 2024

It depends on what you want it to look like from the source level where the files are included. Doing

#include <enzyme/enzyme>

seems like a clean solution to me (which would require only renaming the install directory)

@wsmoses
Copy link
Member

wsmoses commented Aug 31, 2024 via email

@jandrej
Copy link
Contributor Author

jandrej commented Aug 31, 2024

They should, but no headers were installed previously. Also if they are installed they're in Enzyme/enzyme which isn't portable in terms of capitalization.

@wsmoses
Copy link
Member

wsmoses commented Aug 31, 2024

we don't presently install any "Enzyme" (the library) headers, iirc -- so can we not have that directory, and only the runtime one?

@jandrej
Copy link
Contributor Author

jandrej commented Sep 1, 2024

To clarify, current main branch has this

install(TARGETS LLVMEnzyme-${LLVM_VERSION_MAJOR}
EXPORT EnzymeTargets
LIBRARY DESTINATION lib COMPONENT shlib
PUBLIC_HEADER DESTINATION "${INSTALL_INCLUDE_DIR}/Enzyme"
COMPONENT dev)
where PUBLIC_HEADER DESTINATION is wrong. The changes in this PR don't address this yet.

Copy link
Member

@wsmoses wsmoses left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sgtm

@jandrej
Copy link
Contributor Author

jandrej commented Oct 11, 2024

ping @wsmoses

@wsmoses
Copy link
Member

wsmoses commented Oct 11, 2024

oh didn't realize you don't have merge rights. Set it to automerge.

@ZuseZ4
Copy link
Member

ZuseZ4 commented Oct 11, 2024

@wsmoses that won't work, since there are outdated required checks that won't run. You'll need to merge manually.

@jandrej
Copy link
Contributor Author

jandrej commented Oct 17, 2024

ping @wsmoses

@wsmoses wsmoses disabled auto-merge October 18, 2024 02:37
@wsmoses wsmoses merged commit 7f5a11d into EnzymeAD:main Oct 18, 2024
18 of 27 checks passed
jedbrown added a commit that referenced this pull request Nov 1, 2024
* main: (49 commits)
  Fix iv of constant (#2141)
  Update benchmarks (#2035)
  Implement tgamma derivative (#2140)
  tgamma error improvement (#2139)
  Improve cache index error message (#2138)
  Fixes warnings and adds missing header guards (#2124)
  mlir: cache and reuse reverse funcs (#2133)
  mlir: implement forward mode for func.call (#2134)
  mlir: Func call reverse diff (#2127)
  Update build_tarballs.jl
  Fix combined temp cache for reverse (#2131)
  Improve runtime activity err message (#2132)
  Fix undef value storage (#2129)
  Adapt to const tblgen (#2128)
  Add gcloaded TT (#2125)
  Fix blas decl updater indexing (#2123)
  Add header files to ClangEnzyme target (#2062)
  Improve unknown function error messages (#2120)
  Fix handle sync (#2122)
  Support more Julia 1.11 functions (#2121)
  ...
jedbrown added a commit that referenced this pull request Nov 1, 2024
* main: (49 commits)
  Fix iv of constant (#2141)
  Update benchmarks (#2035)
  Implement tgamma derivative (#2140)
  tgamma error improvement (#2139)
  Improve cache index error message (#2138)
  Fixes warnings and adds missing header guards (#2124)
  mlir: cache and reuse reverse funcs (#2133)
  mlir: implement forward mode for func.call (#2134)
  mlir: Func call reverse diff (#2127)
  Update build_tarballs.jl
  Fix combined temp cache for reverse (#2131)
  Improve runtime activity err message (#2132)
  Fix undef value storage (#2129)
  Adapt to const tblgen (#2128)
  Add gcloaded TT (#2125)
  Fix blas decl updater indexing (#2123)
  Add header files to ClangEnzyme target (#2062)
  Improve unknown function error messages (#2120)
  Fix handle sync (#2122)
  Support more Julia 1.11 functions (#2121)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants