-
Notifications
You must be signed in to change notification settings - Fork 1.5k
build: Use FBThrift instead of Apache Thrift (#16019) #16019
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
Open
peterenescu
wants to merge
5
commits into
facebookincubator:main
Choose a base branch
from
peterenescu:export-D90723225
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,755
−13,554
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
6c854fd
feat: Support reading PARQUET files with zero offset (#16456)
mblanco-denodo caff634
Refactor thrift deserialization
czentgr 32fff2e
fix(build): Address build errors with new thrift types
czentgr f50a7b5
fix: Switch to CompactV1Protocol and fix clang-tidy errors
czentgr d8d9201
Temp commit for CI images
czentgr 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,140 @@ | ||
| # Copyright (c) Facebook, Inc. and its affiliates. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| name: Ubuntu Benchmark | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - .github/workflows/benchmark.yml | ||
| - scripts/ci/benchmark-requirements.txt | ||
| - scripts/setup-ubuntu.sh | ||
|
|
||
| push: | ||
| branches: [main] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.head_ref || github.sha }} | ||
| cancel-in-progress: true | ||
|
|
||
| defaults: | ||
| run: | ||
| shell: bash | ||
|
|
||
| jobs: | ||
| benchmark: | ||
| if: github.repository == 'facebookincubator/velox' | ||
| runs-on: 8-core-ubuntu-22.04 | ||
| env: | ||
| CCACHE_DIR: ${{ github.workspace }}/ccache/ | ||
| CCACHE_BASEDIR: ${{ github.workspace }} | ||
| BINARY_DIR: ${{ github.workspace }}/benchmarks/ | ||
| CONTENDER_OUTPUT_PATH: ${{ github.workspace }}/benchmark-results/contender/ | ||
| INSTALL_PREFIX: ${{ github.workspace }}/dependencies | ||
| steps: | ||
|
|
||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| path: velox | ||
|
|
||
| persist-credentials: false | ||
|
|
||
| - name: Restore Dependencies | ||
| uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | ||
| id: restore-deps | ||
| with: | ||
| path: ${{ env.INSTALL_PREFIX }} | ||
| key: dependencies-benchmark-${{ hashFiles('velox/scripts/setup-ubuntu.sh') }} | ||
|
|
||
| - name: Install apt dependencies | ||
| env: | ||
| UV_TOOL_BIN_DIR: /usr/local/bin | ||
| run: | | ||
| source velox/scripts/setup-ubuntu.sh | ||
| install_apt_deps | ||
|
|
||
| - name: Install compiled dependencies | ||
| if: ${{ steps.restore-deps.outputs.cache-hit != 'true' }} | ||
| env: | ||
| CCACHE_DISABLE: 'true' | ||
| run: | | ||
| source velox/scripts/setup-ubuntu.sh | ||
| run_and_time install_fmt | ||
| run_and_time install_protobuf | ||
| run_and_time install_boost | ||
| run_and_time install_fast_float | ||
| run_and_time install_folly | ||
| run_and_time install_fizz | ||
| run_and_time install_wangle | ||
| run_and_time install_mvfst | ||
| run_and_time install_fbthrift | ||
| run_and_time install_stemmer | ||
| run_and_time install_arrow | ||
|
|
||
| - name: Save Dependencies | ||
| if: ${{ steps.restore-deps.outputs.cache-hit != 'true' }} | ||
| uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | ||
| with: | ||
| path: ${{ env.INSTALL_PREFIX }} | ||
| key: dependencies-benchmark-${{ hashFiles('velox/scripts/setup-ubuntu.sh') }} | ||
|
|
||
| - name: Restore ccache | ||
| uses: apache/infrastructure-actions/stash/restore@3354c1565d4b0e335b78a76aedd82153a9e144d4 | ||
| id: restore-cache | ||
| with: | ||
| clean: true | ||
| path: ccache | ||
| key: ccache-benchmark | ||
|
|
||
| - name: Clear CCache Statistics | ||
| run: | | ||
| ccache -sz | ||
|
|
||
| - name: Build Contender Benchmarks | ||
| working-directory: velox | ||
| run: | | ||
| n_cores=$(nproc) | ||
| make benchmarks-basic-build NUM_THREADS=$n_cores MAX_HIGH_MEM_JOBS=$n_cores MAX_LINK_JOBS=$n_cores | ||
| mkdir -p ${BINARY_DIR}/contender/ | ||
| cp -r --verbose _build/release/velox/benchmarks/basic/* ${BINARY_DIR}/contender/ | ||
|
|
||
| - name: CCache after | ||
| run: | | ||
| ccache -vs | ||
|
|
||
| - name: Save ccache" | ||
| uses: apache/infrastructure-actions/stash/save@3354c1565d4b0e335b78a76aedd82153a9e144d4 | ||
| with: | ||
| path: ccache | ||
| key: ccache-benchmark | ||
|
|
||
| - name: Install benchmark dependencies | ||
| run: | | ||
| python3 -m pip install -r velox/scripts/ci/benchmark-requirements.txt | ||
|
|
||
| - name: Run Benchmarks - Contender | ||
| working-directory: velox | ||
| run: | | ||
| make benchmarks-basic-run \ | ||
| EXTRA_BENCHMARK_FLAGS="--binary_path ${BINARY_DIR}/contender/ --output_path ${CONTENDER_OUTPUT_PATH}" | ||
|
|
||
| - name: Upload result artifact | ||
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | ||
| with: | ||
| path: benchmark-results | ||
| name: benchmark-results | ||
| retention-days: 5 |
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 |
|---|---|---|
|
|
@@ -66,6 +66,12 @@ jobs: | |
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Cache ccache | ||
| uses: apache/infrastructure-actions/stash/restore@3354c1565d4b0e335b78a76aedd82153a9e144d4 | ||
| with: | ||
| path: ${{ env.CCACHE_DIR }} | ||
| key: ccache-macos-1-macos-15-${{ matrix.type }} | ||
|
|
||
| - name: Install Dependencies | ||
| env: | ||
| HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 'TRUE' | ||
|
|
@@ -76,6 +82,17 @@ jobs: | |
| install_velox_deps_from_brew | ||
| install_gflags | ||
| install_glog | ||
| # We can use Homebrew's FBThrift once Homebrew's Folly | ||
| # enables 128bit integer support. We need to fix | ||
| # https://github.com/facebook/folly/issues/1666 for it. | ||
| install_boost | ||
| install_fmt | ||
| install_fast_float | ||
| install_folly | ||
|
Collaborator
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. The setup script for macOS also installs fast_float just like for Linux. So you probably need that here too. |
||
| install_fizz | ||
| install_wangle | ||
| install_mvfst | ||
| install_fbthrift | ||
| # Needed for faiss to find BLAS | ||
| install_faiss_deps | ||
| install_double_conversion | ||
|
|
@@ -88,15 +105,8 @@ jobs: | |
| fi | ||
| echo "$INSTALL_PREFIX/bin" >> $GITHUB_PATH | ||
|
|
||
| - name: Cache ccache | ||
| uses: apache/infrastructure-actions/stash/restore@3354c1565d4b0e335b78a76aedd82153a9e144d4 | ||
| with: | ||
| path: ${{ env.CCACHE_DIR }} | ||
| key: ccache-macos-1-macos-15-${{ matrix.type }} | ||
|
|
||
| - name: Configure Build | ||
| env: | ||
| fmt_SOURCE: BUNDLED #brew fmt11 is not supported | ||
| faiss_SOURCE: BUNDLED #brew faiss is not supported | ||
| CMAKE_POLICY_VERSION_MINIMUM: '3.5' | ||
| run: | | ||
|
|
||
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
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.
Arrow was updated from Arrow 15 to Arrow 18. I see some issues with dependencies of Arrow for testing and boost in the CI. Looks like this patch was supposedly fixing this?
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.
Oh, sorry. I missed the upgrade.
Yes. It's for fixing arrow-testing and Boost but it's incompleted yet.
I tried fixing it with the patch when I have time but I couldn't fix it entirely. I will retry it when I have time again but I don't have enough time for now. Sorry. If the patch has any trouble, you can remove the patch. I may re-add something when I retry.
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.
@kou Yes, we will have to review this.