-
Notifications
You must be signed in to change notification settings - Fork 85
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
WIP: Experimental/corbett/jit #1333
Closed
Closed
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ece63c9
should be full impl for kernels/sparsity kernels for both standard an…
wrtobin 599f4ca
switching to full JIT and doing some small cleanup
wrtobin c340fa4
attempted unifying jit/template classes into a single specialized cla…
wrtobin 301734c
adding header info to template params, needed for compilation, basic …
wrtobin 8016eeb
resolve mpi issues, jitti-active build passing integration tests on q…
wrtobin 5860e90
missed from last commit
wrtobin ea0ab5c
add full-jit cmake option
wrtobin 16068c3
all regression tests passing, though multiple passes can be required …
wrtobin 9bc353d
submodule update I'll have to revert before the merge can go in
wrtobin d610d60
missing file
wrtobin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
src/coreComponents/finiteElement/kernelInterface/kernelJIT.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#include "KernelBase.hpp" | ||
#include "kernelJITCompileCommands.hpp" // generated by cmake / jit python script / contains needed macros | ||
|
||
namespace geosx | ||
{ | ||
namespace finiteElement | ||
{ | ||
|
||
#if defined( GEOSX_USE_CUDA ) | ||
constexpr bool compilerIsNVCC = true; | ||
#else | ||
constexpr bool compilerIsNVCC = false; | ||
#endif | ||
|
||
jitti::CompilationInfo getKernelCompilationInfo( const string & header ) | ||
{ | ||
jitti::CompilationInfo info; | ||
info.compileCommand = kernelJIT_COMPILE_COMMAND; | ||
info.compilerIsNVCC = compilerIsNVCC; | ||
info.linker = kernelJIT_LINKER; | ||
info.linkArgs = kernelJIT_LINK_ARGS; | ||
info.headerFile = header; | ||
info.templateFunction = "geosx::finiteElement::buildKernelAndInvoke"; | ||
return info; | ||
} | ||
|
||
jitti::CompilationInfo getSparsityCompilationInfo( const string & header ) | ||
{ | ||
jitti::CompilationInfo info; | ||
info.compileCommand = kernelJIT_COMPILE_COMMAND; | ||
info.compilerIsNVCC = compilerIsNVCC; | ||
info.linker = kernelJIT_LINKER; | ||
info.linkArgs = kernelJIT_LINK_ARGS; | ||
info.headerFile = header; | ||
info.templateFunction = "geosx::finiteElement::buildSparsityAndInvoke"; | ||
return info; | ||
} | ||
} | ||
} | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So my idea is that for each kernel header we'd have a source that includes the header and has the method to get the
jitti::CompilationInfo
(s) for the kernel(s) in the header. That way if the kernel (header) changes and the user rebuilds GEOSX then the compile time in the compilation info gets updated and so things will be re-jitted.I think with this implementation it won't rejit if say the solid mechanics kernels are modified and GEOSX is rebuilt, only if some dependency of
KernelBase.hpp
is modified.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that is probably true in the current implementation.
This is the first thing I'll take a look at changing from the current implementation, and then I'll look at adding in the compile-time pre-jit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good.