-
Couldn't load subscription status.
- Fork 3.9k
ARROW-4372: [C++] Embed precompiled bitcode in the gandiva library #3484
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
Closed
Closed
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
86e7e5b
run pyarrow tests in manylinux CI build
kszucs 97fe94b
fix requirements-test.txt path
kszucs 00d98e0
try to bundle bytecode files
kszucs dbf5b1c
embed precompiled bitcode as char array; load precompiled IR from string
kszucs f2205d0
gandiva jni
kszucs 19200c3
don't run wheel tests twice; cmake format
kszucs cb69625
silent maven download msgs
kszucs 169f43a
build gandiva in cpp docker image
kszucs b0b1117
conda llvmdev
kszucs d480c83
use const string ref for now
kszucs 42391b1
don't pass precompiled bitcode all around the constructors
kszucs 5841dcd
remove commented code
kszucs fa19529
properly construct llvm:StringRef
kszucs 7deb359
fix REGEX; remove byteCodeFilePath from java configuration object
kszucs a88cd37
cmake format
kszucs af78be2
don't bundle irhelpers in the jar
kszucs 79abc0e
mark .cc file as generated
kszucs 09d829a
build wheels for a single python distribution at a time; adjust travi…
kszucs 5d75adb
initialize jni loader
kszucs 0d29b31
remove not existing resources from gandiva's pom
kszucs d3cb058
fix wheel building script
kszucs 54fc653
don't export
kszucs 0bb07a7
better bash split
kszucs 18c5488
install wheel from dist dir
kszucs 7c88d61
only build python 3.6 wheel
kszucs 3e4ec2a
unterminated llvm:MemoryBuffer; fix check_import.py path
kszucs 2372f3d
fix requirements path; disable other CI tests
kszucs 71233c7
test 2.7,16 wheel
kszucs b399496
test py27mu and py36m wheels
kszucs 1aa19f1
reenable travis builds
kszucs d5531d9
test imports inside the wheel container
kszucs fd5e3fe
use latest docker image tag
kszucs c573a56
use env variables insude the container
kszucs 3b1da30
use sudo
kszucs 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -67,12 +67,32 @@ foreach(SRC_FILE ${PRECOMPILED_SRCS}) | |
| endforeach() | ||
|
|
||
| # link all of the bitcode files into a single bitcode file. | ||
| add_custom_command(OUTPUT ${GANDIVA_BC_OUTPUT_PATH} | ||
| COMMAND ${LLVM_LINK_EXECUTABLE} -o ${GANDIVA_BC_OUTPUT_PATH} | ||
| add_custom_command(OUTPUT ${GANDIVA_PRECOMPILED_BC_PATH} | ||
| COMMAND ${LLVM_LINK_EXECUTABLE} -o ${GANDIVA_PRECOMPILED_BC_PATH} | ||
| ${BC_FILES} | ||
| DEPENDS ${BC_FILES}) | ||
|
|
||
| add_custom_target(precompiled ALL DEPENDS ${GANDIVA_BC_OUTPUT_PATH}) | ||
| # write a cmake script to replace precompiled bitcode file's content into a .cc file | ||
| file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/WritePrecompiledCC.cmake" "\ | ||
| file(READ \"${GANDIVA_PRECOMPILED_BC_PATH}\" HEXCONTENT HEX) | ||
| string(REGEX REPLACE | ||
| \"([0-9a-f][0-9a-f])\" | ||
| \"'\\\\\\\\x\\\\1',\" | ||
|
||
| GANDIVA_PRECOMPILED_BITCODE_CHARS | ||
| \"\${HEXCONTENT}\") | ||
| configure_file(${GANDIVA_PRECOMPILED_CC_IN_PATH} | ||
| ${GANDIVA_PRECOMPILED_CC_PATH}) | ||
| ") | ||
|
|
||
| # add the previous command to the execution chain | ||
| add_custom_command(OUTPUT ${GANDIVA_PRECOMPILED_CC_PATH} | ||
| COMMAND ${CMAKE_COMMAND} -P | ||
| "${CMAKE_CURRENT_BINARY_DIR}/WritePrecompiledCC.cmake" | ||
| DEPENDS ${GANDIVA_PRECOMPILED_CC_IN_PATH} | ||
| ${GANDIVA_PRECOMPILED_BC_PATH}) | ||
|
|
||
| add_custom_target(precompiled ALL | ||
| DEPENDS ${GANDIVA_PRECOMPILED_BC_PATH} ${GANDIVA_PRECOMPILED_CC_PATH}) | ||
|
|
||
| function(add_precompiled_unit_test REL_TEST_NAME) | ||
| get_filename_component(TEST_NAME ${REL_TEST_NAME} NAME_WE) | ||
|
|
||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
Aren't we crashy when Tensorflow is loaded in the same process?
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.
I guess this is supposed to test that.
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.
We should not crash, there is some special safeaguarding code for that.
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.
But it doesn't always work, see https://issues.apache.org/jira/browse/ARROW-4272
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 shouldn't we remove this import?
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 should We? If We want to test that both arrow and tensorflow can live in the same interperter.
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.
As you prefer... but it will probably fail at one point or the other, because Tensorflow publishes rogue wheels.