-
Notifications
You must be signed in to change notification settings - Fork 505
ORC-1356: [C++] Use Intel AVX-512 instructions to accelerate the Rle-bit-packing decode #1375
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
Merged
Merged
Changes from all commits
Commits
Show all changes
110 commits
Select commit
Hold shift + click to select a range
58c3ab6
Use AVX512 to optimize bit-packing decode functions. This will improve
wpleonardo acbc214
Fix some conficts.
wpleonardo 293d863
Fix some conflicts.
wpleonardo e7a9119
Fix the code format.
wpleonardo cfde08f
Modify TestRleVectorDecoder.cc to match the new format.
wpleonardo 8341943
Fix a mistake on function name
wpleonardo e840649
Modified code into namespace orc
wpleonardo c7962d5
Modify function name to fix a build issue.
wpleonardo 495a620
Modify code format.
wpleonardo 5c937e6
Fix a build issue about int64 has different printf format between mac…
wpleonardo a87c281
Fix build issue on windows.
wpleonardo d8fcbe6
Fix some code format issue and function name.
wpleonardo 668335c
1. Modified the code format;
wpleonardo 46daa2d
1. Use clang-format to modify the code format of TestRleVectorDecoder.cc
wpleonardo 415d1eb
1. Use clang-format -style=google to format code style of TestRleVect…
wpleonardo cd2f71d
1. Use clang-format to modify the code style of c++/test/TestRleVecto…
f9ee0b4
Use clang-format to modify code style of files:
6f8cb56
1.Add an Env parameter "ENABLE_RUNTIME_AVX512" to open or close AVX51…
wpleonardo c1c2448
Update CMakeLists.txt
wpleonardo edf164f
Update CMakeLists.txt
wpleonardo f360582
Merge pull request #3 from wpleonardo/fix_comments
wpleonardo 743ac84
1.Add the dynamic dispatch function to distribute avx512 and default …
6bc9035
Delete some comments in code.
ca3af78
Fix some comments.
eeafccf
Fix some comments
1beb9b5
Merge pull request #4 from wpleonardo/fix_comments
wpleonardo d9c562b
1.Modified the CMakelists, delete the part of aarch64 and ORC_RUNTIME…
0cf5620
Modified the macro name
08e32f4
Merge pull request #5 from wpleonardo/fix_comments
wpleonardo 8a6b9f7
Merge pull request #6 from wpleonardo/fix_comments
wpleonardo 1b8301f
1.Fixed build error on macos
1924ecf
Merge pull request #7 from wpleonardo/fix_comments
wpleonardo 3c4f2b8
Merge pull request #8 from wpleonardo/fix_comments
wpleonardo b1759a1
Merge pull request #9 from wpleonardo/fix_comments
wpleonardo dc81e79
Merge pull request #10 from wpleonardo/fix_comments
wpleonardo b37c7dd
Fixed the build error on macos.
23dd7ff
Fix the build error on macos, and code format.
6a6f491
Fix build error on macos.
b2abf44
Fix build error on macos
36f06aa
Fix a build error about "%ld" and "%lld" on macos.
3db8d1a
Merge pull request #11 from wpleonardo/fix_comments
wpleonardo 15db3d1
Use std::cout instead of printf function
d77c81b
Merge pull request #12 from wpleonardo/fix_comments
wpleonardo 42cc703
Fix build error on macos.
4fbe1d7
Merge pull request #13 from wpleonardo/fix_comments
wpleonardo 9d86e3d
Macos doesn't support AVX512 fully. So skip Macos to support AVX512 d…
75e4cfa
Add the comments about arch=native compile option.
284a9a4
Merge pull request #14 from wpleonardo/fix_comments
wpleonardo 2c9f93f
Merge pull request #15 from wpleonardo/fix_comments
wpleonardo d21705c
Merge pull request #16 from wpleonardo/fix_comments
wpleonardo 197f2e6
Add the cpu flags information in the cmake process.
1d050af
Modified the cmake check of supoorting AVX512.
10b7009
Merge pull request #17 from wpleonardo/fix_comments
wpleonardo a239e47
When user set BUILD_ENABLE_AVX512=on, but the compiler cannot support…
b2b6aff
Add the comment about -mtune=native in cmake process.
6f06b79
Merge pull request #18 from wpleonardo/fix_comments
wpleonardo a0aa823
Merge pull request #19 from wpleonardo/fix_comments
wpleonardo d7112e9
1.Add the new CI action to test AVX512 feature.
5b38980
Change the build_type back to Debug, keep consistent with the original.
2ad64bc
Merge pull request #20 from wpleonardo/fix_comments
wpleonardo 6768165
Fix an error about _mm512_load_si512 on some CPU core when running wi…
d383035
Merge pull request #21 from wpleonardo/fix_comments
wpleonardo ce7f6de
Most hotspot of function RleDecoderV2::resetBufferStart locates in sa…
8f6806b
Modified some cmake options and status message
e27be9e
Delete macro ORC_HAVE_RUNTIME_AVX512. Modified CMakeLists.txt to choo…
fe5b6c7
Merge pull request #22 from wpleonardo/fix_comments
wpleonardo 5b0e66d
Modified the code format.
8c99fcd
1.Delete the redundancy code in CpuInfo file
0f1adda
Add the cpu flags print on windows.
440d6d1
Merge pull request #23 from wpleonardo/fix_comments
wpleonardo 070ca0f
Update cmake_modules/ConfigSimdLevel.cmake
wgtmac 21de59a
1. Code format change in c++/src/Bpacking.hh
ae0d5c2
Code format change about c++/src/CpuInfoUtil.cc
3f47d1c
Merge pull request #24 from wpleonardo/fix_comments
wpleonardo 1fdfe54
1. Deleted some useless header files included in source file
3f156b4
1. Code format about c++/src/BpackingAvx512.cc
4b166ee
1. Delete the redundant buffer array in class UnpackAvx512
3c21f2e
Use macros to replace some number
wpleonardo 27d5b40
Change RleDecoderV2::readLongs return type back to void.
7cea68e
Added "how to build&use AVX512 in ORC" in README.md
3be42ee
1.Modified the description about how to use AVX512 in README.md
11ceeaa
When compiler doesn't support AVX512, but customer set BUILD_ENABLE_A…
277d9be
1. Update link information about apple avx512 in CMakeLists.txt
305a317
Fix an error about if judgement in windows CI test
4debd50
Add the align header and tailer code in the process of bit-unpacking.
62d373c
Fix an error in the CI test yaml file on windows platform.
3dca1d7
Modified the AVX512 enable description in the README.md
e23ca29
Add "shell: bash" in the CI test on windows, and make CI commands run…
1a32212
1. In function alignHeaderBoundary and alignTailerBoundary, rename pa…
fc2c288
Change the parameter bitMaxSize type to const uint32_t
3468df0
Change some parameter's type to const
wpleonardo 93feaf9
1. Changed the parameters bufferStart, bufferEnd, bitsLeft and curByt…
3b831f2
Merge pull request #39 from wpleonardo/fix_comments
wpleonardo 1deb2cf
Merge pull request #40 from wpleonardo/fix_comments
wpleonardo b48ec06
1. Modified vectorUnpack16,vectorUnpack24,vectorUnpack32 to support a…
b89870a
Added the comments of function alignHeaderBoundary and alignTailerBou…
fe09a92
Delete useless header file
596835d
Merge branch 'main' into fix_comments
e236773
Code format change
321ab63
Merge pull request #41 from wpleonardo/fix_comments
wpleonardo df6fe45
Add a parameter comments
ce77b50
Merge pull request #42 from wpleonardo/fix_comments
wpleonardo 6c84d8d
Merge pull request #43 from wpleonardo/fix_comments
wpleonardo f3ff215
Change the invoking way about bufferstart,bufferend parameters.
af96de9
1. Code format change
d6fd57d
Merge pull request #44 from wpleonardo/fix_comments
wpleonardo 0bfc862
Modified cmakefile about the checking of AVX512.
e584a42
Because check_cxx_source_run will be hung on windows, change check_cx…
4d261eb
Change check_cxx_source_runs back to CHECK_CXX_SOURCE_COMPILES
1f2085e
Merge pull request #45 from wpleonardo/fix_comments
wpleonardo 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -93,3 +93,18 @@ To build only the C++ library: | |
| % make test-out | ||
|
|
||
| ``` | ||
|
|
||
| To build the C++ library with AVX512 enabled: | ||
|
Member
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. Please check if this looks good to you. @stiga-huang |
||
| ```shell | ||
| export ORC_USER_SIMD_LEVEL=AVX512 | ||
| % mkdir build | ||
| % cd build | ||
| % cmake .. -DBUILD_JAVA=OFF -DBUILD_ENABLE_AVX512=ON | ||
| % make package | ||
| % make test-out | ||
| ``` | ||
| Cmake option BUILD_ENABLE_AVX512 can be set to "ON" or (default value)"OFF" at the compile time. At compile time, it defines the SIMD level(AVX512) to be compiled into the binaries. | ||
|
|
||
| Environment variable ORC_USER_SIMD_LEVEL can be set to "AVX512" or (default value)"NONE" at the run time. At run time, it defines the SIMD level to dispatch the code which can apply SIMD optimization. | ||
|
|
||
| Note that if ORC_USER_SIMD_LEVEL is set to "NONE" at run time, AVX512 will not take effect at run time even if BUILD_ENABLE_AVX512 is set to "ON" at compile time. | ||
Large diffs are not rendered by default.
Oops, something went wrong.
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,34 @@ | ||
| /** | ||
| * Licensed to the Apache Software Foundation (ASF) under one | ||
| * or more contributor license agreements. See the NOTICE file | ||
| * distributed with this work for additional information | ||
| * regarding copyright ownership. The ASF licenses this file | ||
| * to you 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. | ||
| */ | ||
|
|
||
| #ifndef ORC_BPACKING_HH | ||
| #define ORC_BPACKING_HH | ||
|
|
||
| #include <cstdint> | ||
|
|
||
| namespace orc { | ||
| class RleDecoderV2; | ||
|
|
||
| class BitUnpack { | ||
| public: | ||
| static void readLongs(RleDecoderV2* decoder, int64_t* data, uint64_t offset, uint64_t len, | ||
| uint64_t fbs); | ||
| }; | ||
| } // namespace orc | ||
|
|
||
| #endif |
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.
Uh oh!
There was an error while loading. Please reload this page.