-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit bf668e9
Showing
391 changed files
with
162,236 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,165 @@ | ||
name: CI | ||
run-name: ${{ github.actor }} is building | ||
|
||
on: push | ||
|
||
jobs: | ||
# https://developer.nvidia.com/nvidia-development-tools-solutions-err_nvgpuctrperm-permission-issue-performance-counters | ||
GPU: | ||
if: github.actor == 'azimafroozeh' | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
platform: [ T4, V100 ] | ||
BUILD_TYPE: [ Release ] | ||
cxx: [ clang++ ] | ||
runs-on: ${{ matrix.platform }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
|
||
- name: Make directory build | ||
run: mkdir ${{github.workspace}}/build | ||
|
||
- name: Configure CMake | ||
run: cmake -DFLS_BUILD_GPU=ON -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/toolchains/T4.cmake -S ${{github.workspace}} -B ${{github.workspace}}/build | ||
env: | ||
CXX: ${{ matrix.cxx }} | ||
|
||
- name: Build | ||
run: cmake --build ${{github.workspace}}/build -j 8 | ||
|
||
- name: Report compression average bit width | ||
run: | | ||
echo "NOT Sorted" | ||
${{github.workspace}}/build/fastlanes/src/compress_ssb | ||
echo "Sorted" | ||
${{github.workspace}}/build/fastlanes/src/compress_ssb_sorted | ||
- name: FLS-GPU-opt q21 V3 | ||
run: | | ||
${{github.workspace}}/build/fastlanes/src/fls_q21_bitpacked_opt_v4 | ||
echo "SORTED + FOR ON ORDERDATE" | ||
ncu ${{github.workspace}}/build/fastlanes/src/fls_q21_bitpacked_opt_v4 | grep Duration | ||
- name: FLS-GPU-opt q31 V5 | ||
run: | | ||
${{github.workspace}}/build/fastlanes/src/fls_q31_bitpacked_opt_v5 | ||
echo "SORTED + FOR ON ORDERDATE" | ||
ncu ${{github.workspace}}/build/fastlanes/src/fls_q31_bitpacked_opt_v5 | grep Duration | ||
- name: FLS-GPU-opt q41 V3 V4 | ||
run: | | ||
${{github.workspace}}/build/fastlanes/src/fls_q41_bitpacked_opt_v3 | ||
echo "SORTED + FOR ON ORDERDATE" | ||
ncu ${{github.workspace}}/build/fastlanes/src/fls_q41_bitpacked_opt_v3 | grep Duration | ||
${{github.workspace}}/build/fastlanes/src/fls_q41_bitpacked_opt_v4 | ||
echo "SORTED + FOR ON ORDERDATE and CUSTKEY" | ||
ncu ${{github.workspace}}/build/fastlanes/src/fls_q41_bitpacked_opt_v4 | grep Duration | ||
- name: Test FLS + Crystal | ||
run: | | ||
${{github.workspace}}/build/fastlanes/src/fls_q11 1 | ||
echo "-- fls_q11 version 1 Passed!" | ||
${{github.workspace}}/build/fastlanes/src/fls_q11 2 | ||
echo "-- fls_q11 version 2 Passed!" | ||
${{github.workspace}}/build/fastlanes/src/fls_q21 1 | ||
echo "-- fls_q21 version 1 Passed!" | ||
${{github.workspace}}/build/fastlanes/src/fls_q21 2 | ||
echo "-- fls_q21 version 2 Passed!" | ||
${{github.workspace}}/build/fastlanes/src/fls_q21 3 | ||
echo "-- fls_q21 version 3 Passed!" | ||
${{github.workspace}}/build/fastlanes/src/fls_q31 1 | ||
echo "-- fls_q31 version 1 Passed!" | ||
${{github.workspace}}/build/fastlanes/src/fls_q31 2 | ||
echo "-- fls_q31 version 2 Passed!" | ||
${{github.workspace}}/build/fastlanes/src/fls_q31 3 | ||
echo "-- fls_q31 version 3 Passed!" | ||
${{github.workspace}}/build/fastlanes/src/fls_q31 4 | ||
echo "-- fls_q31 version 4 Passed!" | ||
${{github.workspace}}/build/fastlanes/src/fls_q41 1 | ||
echo "-- fls_q41 version 1 Passed!" | ||
${{github.workspace}}/build/fastlanes/src/fls_q41 2 | ||
echo "-- fls_q41 version 2 Passed!" | ||
# ${{github.workspace}}/build/fastlanes/src/fls_q31 3 | ||
# echo "-- fls_q31 version 3 Passed!" | ||
# ${{github.workspace}}/build/fastlanes/src/fls_q31 4 | ||
# echo "-- fls_q31 version 4 Passed!" | ||
# ${{github.workspace}}/build/fastlanes/src/fls_q31 4 | ||
# echo "-- fls_q31 version 4 Passed!" | ||
|
||
- name: NCU FLS + Crystal | ||
run: | | ||
echo "FLS Q11 version 1 : FastLanes-GPU" | ||
ncu ${{github.workspace}}/build/fastlanes/src/fls_q11 1 | grep Duration | ||
echo "FLS Q11 version 2 : FLS-GPU-opt" | ||
ncu ${{github.workspace}}/build/fastlanes/src/fls_q11 2 | grep Duration | ||
echo "FLS Q21 version 1 : FastLanes-GPU" | ||
ncu ${{github.workspace}}/build/fastlanes/src/fls_q21 1 | grep Duration | ||
echo "FLS Q21 version 2 : FLS-GPU-opt" | ||
ncu ${{github.workspace}}/build/fastlanes/src/fls_q21 2 | grep Duration | ||
echo "FLS Q21 version 3 : FLS-GPU-opt + predicate load on uncompressed data" | ||
ncu ${{github.workspace}}/build/fastlanes/src/fls_q21 3 | grep Duration | ||
echo "FLS Q31 version 1 : FastLanes-GPU" | ||
ncu ${{github.workspace}}/build/fastlanes/src/fls_q31 1 | grep Duration | ||
echo "FLS Q31 version 2 : Version 1 >> combination of shared + register" | ||
ncu ${{github.workspace}}/build/fastlanes/src/fls_q31 2 | grep Duration | ||
echo "FLS Q31 version 3 : 8 value at a time" | ||
ncu ${{github.workspace}}/build/fastlanes/src/fls_q31 3 | grep Duration | ||
echo "FLS Q31 version 4 : v3 + predicate load on uncompressed data" | ||
ncu ${{github.workspace}}/build/fastlanes/src/fls_q31 4 | grep Duration | ||
echo "FLS Q41 version 1 : FastLanes-GPU" | ||
ncu ${{github.workspace}}/build/fastlanes/src/fls_q41 1 | grep Duration | ||
echo "FLS Q41 version 2 : 8 value at a time + predicate load on uncompressed data" | ||
ncu ${{github.workspace}}/build/fastlanes/src/fls_q41 2 | grep Duration | ||
# echo "FLS Q31 version 3 : 8 value at a time" | ||
# ncu ${{github.workspace}}/build/fastlanes/src/fls_q31 3 | grep Duration | ||
# echo "FLS Q31 version 4 : v3 + predicate load on uncompressed data" | ||
# ncu ${{github.workspace}}/build/fastlanes/src/fls_q31 4 | grep Duration | ||
|
||
- name: NCU crystal | ||
run: | | ||
echo "-- crystal q11" | ||
ncu ${{github.workspace}}/build/crystal/src/crystal_q11 | grep Duration | ||
echo "-- crystal q21" | ||
ncu ${{github.workspace}}/build/crystal/src/crystal_q21 | grep Duration | ||
echo "-- crystal q31" | ||
ncu ${{github.workspace}}/build/crystal/src/crystal_q31 | grep Duration | ||
echo "-- crystal q41" | ||
ncu ${{github.workspace}}/build/crystal/src/crystal_q41 | grep Duration | ||
- name: NCU crystal OPT | ||
run: | | ||
echo "-- crystal-opt q11" | ||
ncu ${{github.workspace}}/build/crystal-opt/src/crystal_opt_q11 | grep Duration | ||
echo "-- crystal-opt q21" | ||
ncu ${{github.workspace}}/build/crystal-opt/src/crystal_opt_q21 | grep Duration | ||
echo "-- crystal-opt q31" | ||
ncu ${{github.workspace}}/build/crystal-opt/src/crystal_opt_q31 | grep Duration | ||
echo "-- crystal-opt q41" | ||
ncu ${{github.workspace}}/build/crystal-opt/src/crystal_opt_q41 | grep Duration | ||
- name: FLS-GPU-opt q11 v2 | ||
run: echo "Simdized TODO" | ||
# ${{github.workspace}}/build/fastlanes/src/fls_q11_bitpacked_opt_v2 | ||
# ncu ${{github.workspace}}/build/fastlanes/src/fls_q11_bitpacked_opt_v2 | grep Duration | ||
|
||
- name: FLS-GPU-opt q11 v3 | ||
run: | | ||
${{github.workspace}}/build/fastlanes/src/fls_q11_bitpacked_opt_v3 | ||
echo "v3 : Multiple check" | ||
ncu ${{github.workspace}}/build/fastlanes/src/fls_q11_bitpacked_opt_v3 | grep Duration | ||
- name: FLS-GPU-opt q11 v4 | ||
run: | | ||
${{github.workspace}}/build/fastlanes/src/fls_q11_bitpacked_opt_v4 | ||
echo "v1 with 8 value at a time **not complete yet**" | ||
ncu ${{github.workspace}}/build/fastlanes/src/fls_q11_bitpacked_opt_v4 | grep Duration |
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,6 @@ | ||
*.i | ||
*.ii | ||
*.gpu | ||
*.ptx | ||
*.cubin | ||
*.fatbin |
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,112 @@ | ||
cmake_minimum_required(VERSION 3.22) | ||
project(FastLanesGPU) | ||
|
||
set(CMAKE_CXX_STANDARD 20) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
set(CMAKE_CXX_EXTENSIONS OFF) | ||
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) | ||
|
||
# Requirements : ------------------------------------------------------------------------------------------------------- | ||
if (NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") | ||
message(FATAL_ERROR "Only Clang is supported!") | ||
endif () | ||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13) | ||
message(FATAL_ERROR "Only Clang >= 13 is supported!") | ||
endif () | ||
|
||
# FLAGS : -------------------------------------------------------------------------------------------------------------- | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror") | ||
if ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "x86") | ||
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") # FSST | ||
endif () | ||
|
||
#----------------------------------------------------------------------------------------------------------------------- | ||
include(FetchContent) | ||
include(CheckCXXCompilerFlag) | ||
include(CMakePrintHelpers) | ||
# https://stackoverflow.com/questions/56089330/cmake-creates-lots-of-targets-i-didnt-specify | ||
set_property(GLOBAL PROPERTY CTEST_TARGETS_ADDED 1) | ||
include(CTest) | ||
|
||
# GTEST : ------------------------------------------------------------------------------------------------------------ | ||
message("---------------------------------------------------------------------------------------------------------") | ||
message("- Building GTEST:") | ||
include(GoogleTest) | ||
# Gtest: ----------------------------------------------------------------------------------------------------------- | ||
FetchContent_Declare(googletest | ||
GIT_REPOSITORY https://github.com/google/googletest.git | ||
GIT_TAG e2239ee6043f73722e7aa812a459f54a28552929 # release-1.11.0 | ||
) | ||
# For Windows: Prevent overriding the parent project's compiler/linker settings | ||
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) | ||
FetchContent_MakeAvailable(googletest) | ||
|
||
enable_testing() | ||
|
||
# Silence clang-tidy warnings from googletest | ||
set_target_properties(gtest PROPERTIES CXX_CLANG_TIDY "") | ||
set_target_properties(gtest_main PROPERTIES CXX_CLANG_TIDY "") | ||
set_target_properties(gmock PROPERTIES CXX_CLANG_TIDY "") | ||
set_target_properties(gmock_main PROPERTIES CXX_CLANG_TIDY "") | ||
|
||
# Definitions: --------------------------------------------------------------------------------------------------------- | ||
add_compile_definitions(CMAKE_SOURCE_DIR="${CMAKE_SOURCE_DIR}") | ||
|
||
|
||
if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") | ||
message("There is no CUDA on Darwin") | ||
RETURN() | ||
endif () | ||
|
||
set(CMAKE_CUDA_ARCHITECTURES "native") | ||
enable_language(CUDA) | ||
set(CMAKE_CUDA_STANDARD 20) | ||
set(CMAKE_CUDA_STANDARD_REQUIRED ON) | ||
|
||
message("---------------------------------------------------------------------------------------------------------") | ||
message("-- CUDA:") | ||
cmake_print_variables(CUDA_INCLUDE_DIRS) | ||
cmake_print_variables(CUDA_LIBRARIES) | ||
cmake_print_variables(CUDA_FOUND) | ||
cmake_print_variables(CMAKE_CUDA_FLAGS) | ||
cmake_print_variables(CMAKE_CUDA_FLAGS_DEBUG) | ||
cmake_print_variables(CMAKE_CUDA_FLAGS_RELEASE) | ||
cmake_print_variables(CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES) | ||
cmake_print_variables(CMAKE_CUDA_COMPILER) | ||
cmake_print_variables(CMAKE_CUDA_COMPILER_VERSION) | ||
cmake_print_variables(CMAKE_CUDA_STANDARD) | ||
cmake_print_variables(CMAKE_CUDA_STANDARD_REQUIRED) | ||
cmake_print_variables(CMAKE_CXX_STANDARD) | ||
cmake_print_variables(CMAKE_CXX_COMPILER) | ||
cmake_print_variables(CMAKE_CXX_COMPILER_VERSION) | ||
cmake_print_variables(CMAKE_CXX_COMPILER_ID) | ||
cmake_print_variables(CMAKE_SOURCE_DIR) | ||
cmake_print_variables(CMAKE_BUILD_TYPE) | ||
|
||
# CUDA : --------------------------------------------------------------------------------------------------------------- | ||
# http://knottsgroup.groups.et.byu.net/labbook/index.php?n=Main.CompilingLAMMPSForGPU | ||
#set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} | ||
# -gencode=arch=compute_75,code=sm_75 | ||
# -gencode=arch=compute_75,code=compute_75" | ||
#) | ||
|
||
# Include : ------------------------------------------------------------------------------------------------------------ | ||
include_directories(${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}) | ||
include_directories(include) | ||
|
||
# Tools : -------------------------------------------------------------------------------------------------------------- | ||
add_subdirectory(tool) | ||
|
||
# Crystal : ------------------------------------------------------------------------------------------------------------ | ||
add_subdirectory(crystal) | ||
|
||
# FastLanes : ---------------------------------------------------------------------------------------------------------- | ||
add_subdirectory(fastlanes) | ||
|
||
#TileBased : ---------------------------------------------------------------------------------------------------------- | ||
add_subdirectory(tile_based) | ||
# try https://github.com/azimafroozeh/gpu-compression | ||
|
||
# Crystal-Opt : -------------------------------------------------------------------------------------------------------- | ||
add_subdirectory(crystal-opt) | ||
|
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Azim Afroozeh, Lotte Felius, CWI Database Architectures Group | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,40 @@ | ||
# FastLanesGPU: Accelerating GPU Data Processing using FastLanes Compression | ||
|
||
FastLanesGPU details can be found in the [publication](https://doi.org/10.1145/3662010.3663450). | ||
|
||
## Contents | ||
|
||
- [FastLanesGPU in a Nutshell](#fastlanesgpu-in-a-nutshell) | ||
- [Quickstart](#quickstart) | ||
- [Building and Running](#building-and-running) | ||
- [FastLanesGPU Primitives](#fastlanesgpu-primitives) | ||
- [Replicating Paper Experiments](#replicating-paper-experiments) | ||
- [Build](#build) | ||
- [Setup Data](#setup-data) | ||
- [Speed Tests](#speed-tests) | ||
|
||
## FastLanesGPU in a Nutshell | ||
|
||
## Quickstart | ||
|
||
## Building and Running | ||
|
||
Requirements: | ||
|
||
1) __Clang++__ 13 or higher | ||
2) __CMake__ 3.22 or higher | ||
|
||
## FastLanesGPU Primitives | ||
|
||
## Replicating Paper Experiments | ||
|
||
### Build | ||
|
||
```shell | ||
cmake . | ||
make | ||
``` | ||
|
||
### Setup Data | ||
|
||
|
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,3 @@ | ||
# Source : ------------------------------------------------------------------------------------------------------------- | ||
add_subdirectory(src) | ||
|
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,29 @@ | ||
Crystal-Opt GPU Library | ||
================= | ||
|
||
The Crystal-Opt library makes additional changes to the original Crystal library for better performance. The original Crystal library implements a collection of block-wide device functions that can be used to implement high performance implementations of SQL queries on GPUs. | ||
|
||
You can also refer to the original Crystal library and their papers [here](https://github.com/anilshanbhag/crystal). | ||
|
||
Usage | ||
---- | ||
|
||
``` | ||
# Generate the test data and transform into columnar layout | ||
# Substitute <SF> with appropriate scale factor (eg: 1) | ||
python util.py ssb <SF> gen | ||
python util.py ssb <SF> transform | ||
``` | ||
|
||
* Configure the benchmark settings | ||
``` | ||
cd src/ssb/ | ||
# Edit SF and BASE_PATH in ssb_utils.h | ||
``` | ||
|
||
* To run a query, say run q11 | ||
``` | ||
make bin/ssb/q11 | ||
./bin/ssb/q11 | ||
``` | ||
|
Oops, something went wrong.