forked from facebookincubator/velox
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
14 changed files
with
258 additions
and
21 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
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,68 @@ | ||
# Copyright (c) Facebook, Inc. and its affiliates. | ||
# Copyright (c) Rivos, 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. | ||
--- a/folly/Conv.h | ||
+++ b/folly/Conv.h | ||
@@ -286,8 +286,8 @@ namespace detail { | ||
template <class... T> | ||
using LastElement = type_pack_element_t<sizeof...(T) - 1, T...>; | ||
|
||
-#ifdef _MSC_VER | ||
-// MSVC can't quite figure out the LastElementImpl::call() stuff | ||
+#if defined(_MSC_VER) || defined(__CUDACC__) | ||
+// MSVC and NVCC can't quite figure out the LastElementImpl::call() stuff | ||
// in the base implementation, so we have to use tuples instead, | ||
// which result in significantly more templates being compiled, | ||
// though the runtime performance is the same. | ||
--- a/folly/synchronization/RelaxedAtomic.h | ||
+++ b/folly/synchronization/RelaxedAtomic.h | ||
@@ -98,7 +98,7 @@ struct relaxed_atomic_base : protected std::atomic<T> { | ||
}; | ||
|
||
template <typename T> | ||
-struct relaxed_atomic_integral_base : private relaxed_atomic_base<T> { | ||
+struct relaxed_atomic_integral_base : protected relaxed_atomic_base<T> { | ||
private: | ||
using atomic = std::atomic<T>; | ||
using base = relaxed_atomic_base<T>; | ||
@@ -108,7 +108,9 @@ struct relaxed_atomic_integral_base : private relaxed_atomic_base<T> { | ||
|
||
using base::relaxed_atomic_base; | ||
using base::operator=; | ||
+#ifndef __CUDACC__ | ||
using base::operator T; | ||
+#endif | ||
using base::compare_exchange_strong; | ||
using base::compare_exchange_weak; | ||
using base::exchange; | ||
@@ -206,7 +208,9 @@ struct relaxed_atomic : detail::relaxed_atomic_base<T> { | ||
|
||
using base::relaxed_atomic_base; | ||
using base::operator=; | ||
+#ifndef __CUDACC__ | ||
using base::operator T; | ||
+#endif | ||
}; | ||
|
||
template <typename T> | ||
@@ -220,7 +224,9 @@ struct relaxed_atomic<T*> : detail::relaxed_atomic_base<T*> { | ||
|
||
using detail::relaxed_atomic_base<T*>::relaxed_atomic_base; | ||
using base::operator=; | ||
+#ifndef __CUDACC__ | ||
using base::operator T*; | ||
+#endif | ||
|
||
T* fetch_add(std::ptrdiff_t arg) noexcept { | ||
return atomic::fetch_add(arg, std::memory_order_relaxed); |
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,72 @@ | ||
# Copyright (c) 2022 by Rivos Inc. | ||
# Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
include: | ||
- project: 'rv/it/int/rivos-sdk' | ||
ref: rivos/main | ||
file: '/packager/gitlab-ci-packaging-helper.yml' | ||
|
||
variables: | ||
GIT_STRATEGY: clone | ||
GIT_SUBMODULE_STRATEGY: recursive | ||
RIG_PATH: "/rivos/rig" | ||
|
||
.common-build: | ||
script: | ||
- > | ||
apt-get update -qq && | ||
DEBIAN_FRONTEND=noninteractive | ||
apt-get install -qq -y | ||
bison | ||
build-essential | ||
flex | ||
libboost-atomic-dev | ||
libboost-context-dev | ||
libboost-date-time-dev | ||
libboost-filesystem-dev | ||
libboost-program-options-dev | ||
libboost-regex-dev | ||
libboost-system-dev | ||
libboost-thread-dev | ||
libdouble-conversion-dev | ||
libevent-dev | ||
libgmock-dev | ||
liblzo2-dev | ||
tzdata | ||
ninja-build | ||
cmake | ||
git | ||
libssl-dev | ||
curl | ||
libz-dev | ||
liblz4-dev | ||
libsnappy-dev | ||
libzstd-dev | ||
- > | ||
cmake -S . -B build | ||
-GNinja | ||
-DCMAKE_BUILD_TYPE=Release | ||
-DCMAKE_INSTALL_PREFIX=install | ||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON | ||
-DVELOX_BUILD_MINIMAL=OFF | ||
-DVELOX_BUILD_TESTING=ON | ||
-DVELOX_ENABLE_BENCHMARKS=ON | ||
-DVELOX_ENABLE_GPU=ON | ||
-DCMAKE_CUDA_ARCHITECTURES="90" | ||
- ninja -C build install | ||
|
||
nvidia-build: | ||
stage: build | ||
image: nvidia/cuda:12.2.2-devel-ubuntu22.04 | ||
tags: ["nvidia-a30"] | ||
dependencies: ["prepare-version"] | ||
script: | ||
- !reference [.common-build, script] | ||
artifacts: | ||
when: always | ||
paths: | ||
- build/Testing | ||
- install | ||
reports: | ||
junit: build/Testing/*.xml |
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
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
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