-
Notifications
You must be signed in to change notification settings - Fork 319
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 Python interface for compilation and one single interface for compilation and running process #1690
Add Python interface for compilation and one single interface for compilation and running process #1690
Conversation
Signed-off-by: Jiaqing Chen <jchen501@asu.edu>
Signed-off-by: Jiaqing Chen <jchen501@asu.edu>
Signed-off-by: Jiaqing Chen <jchen501@asu.edu>
Can one of the admins verify this patch? |
@Jiaqing-ASU great, will review once #1683 has landed... thanks for working on this |
Please allow some time for me to modify some of the code in this PR after #1683 has landed. I will make this PR |
PR landed now, so you can update your changes with the latest main branch. |
Signed-off-by: Jiaqing Chen <jchen501@asu.edu>
…x-mlir into python-interface
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
1 similar comment
Can one of the admins verify this patch? |
@jenkins-droid test this please |
Signed-off-by: Jiaqing Chen <jchen501@asu.edu>
Can one of the admins verify this patch? |
updating branch |
Signed-off-by: Jiaqing Chen <jchen501@asu.edu>
Can one of the admins verify this patch? |
updated the branch to run all cis |
@AlexandreEichenberger Thanks for the merge. I guess this will pass the tests since it works in my environment. However, this are still several things of the new constructor need to be modify. I am working on this. Maybe you could review this later. Many thanks. |
yes, ping me when you feel its in a state where reviewing it make sense. |
Signed-off-by: Jiaqing Chen <jchen501@asu.edu>
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Signed-off-by: Jiaqing Chen <jchen501@asu.edu>
…x-mlir into python-interface
Can one of the admins verify this patch? |
1 similar comment
Can one of the admins verify this patch? |
Signed-off-by: Jiaqing Chen <jchen501@asu.edu>
Can one of the admins verify this patch? |
Hello @sstamenova. Thanks for your guidance to solve
As those files cannot be linked into |
${ONNX_MLIR_SRC_ROOT}/include | ||
$<TARGET_PROPERTY:onnx,INCLUDE_DIRECTORIES> | ||
) | ||
target_link_libraries(PyCompileAndRuntime |
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.
Why aren't you linking this against PyCompile and PyRuntime?
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.
Because PyCompile
and PyRuntime
are not normal C++ libraries. Furthermore, they are not even normal shared libraries
which means this solution I have tried before does not work. I have also tried another solution to combine two pybind11-wrapped projects. It also does not work either as it is a little bit different from our situation. We need to have two objects of PyCompile and PyRuntime inside the new class and then use the functions inside the objects instead of just calling functions from another pybind11-generated Python binding. Also, I did not get enough information from the llvm-project pybind11_add_module. Maybe I am looking into some wrong places.
Signed-off-by: Jiaqing Chen <jchen501@asu.edu>
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
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.
LGTM, thanks for the great work @Jiaqing-ASU .
Extra redundancy can be removed at some later time in a subsequent PR once we figure how to do it.
Jenkins Linux amd64 Build #8319 [push] Add Python interface for... started at 10:31 |
Jenkins Linux s390x Build #8335 [push] Add Python interface for... started at 11:31 |
Jenkins Linux ppc64le Build #7386 [push] Add Python interface for... started at 11:32 |
Jenkins Linux amd64 Build #8319 [push] Add Python interface for... passed after 1 hr 25 min |
Jenkins Linux s390x Build #8335 [push] Add Python interface for... passed after 1 hr 32 min |
Jenkins Linux ppc64le Build #7386 [push] Add Python interface for... passed after 1 hr 40 min |
…pilation and running process (onnx#1690) * Add compiler interface to python Signed-off-by: Jiaqing Chen <jchen501@asu.edu> Co-authored-by: Alexandre Eichenberger <alexe@us.ibm.com>
…pilation and running process (onnx#1690) * Add compiler interface to python Signed-off-by: Jiaqing Chen <jchen501@asu.edu> Co-authored-by: Alexandre Eichenberger <alexe@us.ibm.com>
An ONNX model can be compiled directly using the
onnx-mlir -O3 --EmitLib
command. The resulting library can then be executed using Python. At times, it might be convenient to also compile a model directly in Python. We explores the Python methods to do so. And we also design an interface to package the compilation and operation of the model.