-
Notifications
You must be signed in to change notification settings - Fork 336
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
Build light weight PyRuntime without llvm or onnx-mlir #3044
Changes from 1 commit
4ab6256
49034b5
45b1d9d
0ee214f
beff2e3
28584dd
a92ccc2
2037d8d
8ecd7ff
79ab54f
0bd61d2
0694678
0d049a5
8c8a17f
8ff28b1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Signed-off-by: Chen Tong <chentong@us.ibm.com>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,6 @@ option(ONNX_MLIR_ENABLE_WERROR "Enable warnings as errors." OFF) | |
option(ONNX_MLIR_SUPPRESS_THIRD_PARTY_WARNINGS "Suppress warning in third_party code." ON) | ||
option(ONNX_MLIR_ENABLE_JAVA "Set to ON for building the Java runtime, tools, and tests" ON) | ||
option(ONNX_MLIR_ENABLE_PYRUNTIME_LIT "Set to ON for building Python driver of running the compiled model without llvm-project." OFF) | ||
#unset(ONNX_MLIR_ENABLE_PYRUNTIME_LIT CACHE) | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
|
||
|
@@ -213,10 +212,6 @@ if (ONNX_MLIR_SUPPRESS_THIRD_PARTY_WARNINGS) | |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSUPPRESS_THIRD_PARTY_WARNINGS") | ||
endif() | ||
|
||
if (ONNX_MLIR_ENABLE_STABLEHLO) | ||
add_compile_definitions(ONNX_MLIR_ENABLE_STABLEHLO) | ||
endif() | ||
|
||
if (ONNX_MLIR_ENABLE_PYRUNTIME_LIT) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see this (and above): there are some dir that added on both path. Is it that the order of them is important? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only the |
||
add_subdirectory(src) | ||
else() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
message(STATUS "ONNX_MLIR_ENABLE_PYRUNTIME_LIT: ${ONNX_MLIR_ENABLE_PYRUNTIE_LIT}") | ||
if (ONNX_MLIR_ENABLE_PYRUNTIME_LIT) | ||
function(llvm_update_compile_flags name) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add a one liner comment on why this function is defined here. |
||
endfunction() | ||
|
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.
Maybe the name should be explained: if off, then no pyruntime is build? Or its build anyway, but when on, then it's only the pyruntime? Or when off, pyruntime is build one way, but when off, its build another way?
Maybe the name could be a bit more explicit, depending on what the answer is from the question above.
minor question:
_LIT
is it for "_LIGHT"?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.
When this option is off, the pyruntime is built with onnx-mlir and llvm-project, as it was previously.
When this option is on, only the pyruntime is built without llvm-project.
Yes, LIT for LIGHT.