-
Notifications
You must be signed in to change notification settings - Fork 17
Add all-in-one driver for compile-and-execute #97
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
Conversation
I agree with you. The code was copied from legacy. Now I have updated the coding style to CamelCase. |
} | ||
compute = *expectCompute; | ||
} | ||
llvm::ArrayRef<uint64_t> foldBufferIds; |
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.
Better to unify the element dtypes here with the Globals in MLIR module. "__num_orig_num_args", "__fold_args" and "__compute_args" are i32, and "__fold_buffer_ids" is i64.
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.
__fold_buffer_ids is the UID of a buffer, so we use i64. __num_orig_num_args
and others are i32 because we won't meet too many args in the same function if it is reasonable. We use i32 for __fold_args
and __compute_args
for performance because it save half of space and cache (!!) at each execution time.
unittests/CMakeLists.txt
Outdated
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.
Do we need another one tests folder?
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.
The folder tests
is for MLIR-related FileCheck-based tests and unittests
is for MLIR-related C++ gtests. The convention of tests
and unittests
is borrowed from MLIR upstream - they use these folders too.
I have several pending PRs to put the C++-based gtests in unittests
folder.
…ijie/mainfunc_wrapper
Hi, all! I have removed the constant cache related code. This PR now only contains all-in-one The constant cache related code is moved to branch |
…ijie/mainfunc_wrapper
compute(realargs.data()); | ||
} | ||
|
||
// directly call compute(). args should be an array of void*. args[i] should |
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.
//
-> ///
For usage see unittest.
Also add a wrapper for
mlir::ExecutionEngine
for further developing of constant cache.