-
Notifications
You must be signed in to change notification settings - Fork 720
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
Use cmake install to copy cpp api related files #7200
Merged
Merged
Changes from 62 commits
Commits
Show all changes
71 commits
Select commit
Hold shift + click to select a range
89a81d3
install cpp api
mosout afd6b85
install mlir related files
mosout a5a134b
clean
mosout 9e26e27
Merge remote-tracking branch 'upstream/master' into install_cpp_api
mosout d95533d
Merge remote-tracking branch 'upstream/master' into install_cpp_api
mosout 75b16e1
handle third party dependences
mosout 10f9aa3
support cpack
mosout d83d953
Merge remote-tracking branch 'upstream/master' into install_cpp_api
mosout 2ff0bb7
fix
mosout c8aeb45
Merge remote-tracking branch 'upstream/master' into install_cpp_api
mosout f6c55f0
Update oneflow.cmake
jackalcooper 4ba5efd
fix
mosout 5a19411
Merge remote-tracking branch 'origin/install_cpp_api' into install_cp…
mosout a3554d5
fix compiling error
mosout 785544d
refine
jackalcooper 5b1d550
add exe test as deps
jackalcooper 8c1c37f
install third party
mosout 6b75ff9
Merge remote-tracking branch 'origin/install_cpp_api' into install_cp…
mosout 00b140b
refine
jackalcooper d062e87
Merge remote-tracking branch 'origin/install_cpp_api' into install_cp…
mosout a6664a7
refine
mosout c667be6
revert install dir
mosout ac64e89
install third party
mosout a60d52c
refine
mosout 511eb57
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow into …
jackalcooper 235d3d1
refine rpath
jackalcooper 7617880
set cpack dir
mosout 2bb4313
Merge remote-tracking branch 'origin/install_cpp_api' into install_cp…
mosout 0da5f84
Merge remote-tracking branch 'upstream/master' into install_cpp_api
mosout 5c89675
set version for cpack on ci
mosout 7aa23ed
update ci exe test
mosout 49782b2
fix
mosout 0e997c7
Merge branch 'master' into install_cpp_api
mosout 6a8c41d
refine
mosout 68df3cc
Merge remote-tracking branch 'origin/install_cpp_api' into install_cp…
mosout 7cb596e
fix
mosout 3eb7d69
Merge branch 'master' into install_cpp_api
mosout e336f99
Merge branch 'master' into install_cpp_api
oneflow-ci-bot 17848e4
fix xla download
mosout 785ddc5
Merge remote-tracking branch 'origin/install_cpp_api' into install_cp…
mosout 56e1f44
refine
mosout 71aed89
addcheck
jackalcooper 396c852
refine
jackalcooper 30187d7
fix xla
mosout b324b99
Merge remote-tracking branch 'origin/install_cpp_api' into install_cp…
mosout 64b926e
Merge branch 'master' into install_cpp_api
oneflow-ci-bot a268079
fix unzip
mosout b9b9498
Merge remote-tracking branch 'origin/install_cpp_api' into install_cp…
mosout 10580c5
Merge branch 'master' into install_cpp_api
oneflow-ci-bot 249b580
fix cpp api test
mosout 2b4b334
Merge remote-tracking branch 'origin/install_cpp_api' into install_cp…
mosout 6105295
Merge remote-tracking branch 'upstream/master' into install_cpp_api
mosout 1e1853c
Merge branch 'master' into install_cpp_api
oneflow-ci-bot 8261edf
Merge branch 'master' into install_cpp_api
oneflow-ci-bot a39b81f
Merge branch 'master' into install_cpp_api
oneflow-ci-bot 5983ad7
Merge branch 'master' into install_cpp_api
oneflow-ci-bot c69861e
comment out a deconv2d test
mosout 42783cb
Merge remote-tracking branch 'origin/install_cpp_api' into install_cp…
mosout 05564d8
Merge branch 'master' into install_cpp_api
oneflow-ci-bot 1223228
Merge branch 'master' into install_cpp_api
oneflow-ci-bot 6637f64
Merge branch 'master' into install_cpp_api
jackalcooper a15c72b
Merge branch 'master' into install_cpp_api
oneflow-ci-bot 40407cb
Merge branch 'master' into install_cpp_api
oneflow-ci-bot 9f1adf5
fix
mosout f2bad89
Merge remote-tracking branch 'origin/install_cpp_api' into install_cp…
mosout 3a4a522
fix glog link
mosout fbc16a6
Merge branch 'master' into install_cpp_api
oneflow-ci-bot a35cc81
Merge branch 'master' into install_cpp_api
oneflow-ci-bot 9c674df
Merge branch 'master' into install_cpp_api
oneflow-ci-bot 9139f30
Merge branch 'master' into install_cpp_api
oneflow-ci-bot 5b4e6a6
Merge branch 'master' into install_cpp_api
oneflow-ci-bot 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 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 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 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,32 @@ | ||
source scl_source enable devtoolset-7 | ||
set -ex | ||
export PATH=/usr/lib64/ccache:$PATH | ||
gcc --version | ||
ld --version | ||
# clean python dir | ||
cd ${ONEFLOW_CI_SRC_DIR} | ||
${ONEFLOW_CI_PYTHON_EXE} -m pip install -i https://mirrors.aliyun.com/pypi/simple --user -r ci/fixed-dev-requirements.txt | ||
cd python | ||
git clean -nXd -e \!dist -e \!dist/** | ||
git clean -fXd -e \!dist -e \!dist/** | ||
# cmake config | ||
mkdir -p ${ONEFLOW_CI_BUILD_DIR} | ||
cd ${ONEFLOW_CI_BUILD_DIR} | ||
find ${ONEFLOW_CI_BUILD_DIR} -name CMakeCache.txt | ||
find ${ONEFLOW_CI_BUILD_DIR} -name CMakeCache.txt -delete | ||
if [ ! -f "$ONEFLOW_CI_CMAKE_INIT_CACHE" ]; then | ||
echo "$ONEFLOW_CI_CMAKE_INIT_CACHE does not exist." | ||
exit 1 | ||
fi | ||
export PATH="${PATH}:$(dirname ${ONEFLOW_CI_PYTHON_EXE})" | ||
export PYTHON_BIN_PATH=${ONEFLOW_CI_PYTHON_EXE} | ||
cmake -S ${ONEFLOW_CI_SRC_DIR} -C ${ONEFLOW_CI_CMAKE_INIT_CACHE} -DPython3_EXECUTABLE=${ONEFLOW_CI_PYTHON_EXE} | ||
|
||
# cmake build | ||
cd ${ONEFLOW_CI_BUILD_DIR} | ||
cmake --build . -j $(nproc) | ||
|
||
# build pip | ||
cd ${ONEFLOW_CI_SRC_DIR} | ||
cd python | ||
${ONEFLOW_CI_PYTHON_EXE} setup.py bdist_wheel |
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
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
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
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
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
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.
这里为什么要这样写呢,这样不保险。还是提取个函数来check吧,除了 BUILD_CUDA 还有 xla 等情况
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.
我来改一下
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.
我看了下编译xla的时候也会编译nccl 这样写应该没问题吧 之前xla的编译也是过了的
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.
我也不知道为什么,现在其他的xla编译全挂了,怀疑和这里有关。不能因为能编译就可以认为没问题了,主要是考虑以后其他人加新的库并不知道这里为什么要多一个if(BUILD_CUDA),所以多一个用来check的函数比较好