Skip to content
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

[WIP] scan_copy_if #6593

Closed
wants to merge 50 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
c9ba1f3
wip avro reader
cwharris Oct 9, 2020
40c9b46
wip avro reader: zero-length string reads
cwharris Oct 9, 2020
17433ac
wip
cwharris Oct 10, 2020
c58e857
csv row/column count operator
cwharris Oct 12, 2020
944ae78
CsvReaderTest
cwharris Oct 12, 2020
78c093a
wip general accumulate
cwharris Oct 12, 2020
8b806dd
csv find test
cwharris Oct 12, 2020
676b245
csv gather positions
cwharris Oct 13, 2020
0c863b9
inclusive_scan_copy_if
cwharris Oct 13, 2020
4ab40e3
inclusive_scan_copy_if
cwharris Oct 13, 2020
44689f3
wip
cwharris Oct 13, 2020
3acba53
inclusive_scan_copy_if working w/tests
cwharris Oct 14, 2020
57ce1be
reorganize scan_copy_if tests
cwharris Oct 14, 2020
3f2f058
getting closer
cwharris Oct 14, 2020
3de995c
wip
cwharris Oct 15, 2020
3715209
InclusiveScanCopyIfPolicy
cwharris Oct 15, 2020
cae1d4a
wip
cwharris Oct 15, 2020
86facc7
inclusive_scan_copy_if done
cwharris Oct 15, 2020
c66ea8e
rename to inclusive_copy_if
cwharris Oct 15, 2020
d4778f1
string matcher
cwharris Oct 15, 2020
39816e1
Merge branch 'branch-0.17' of github.com:rapidsai/cudf into inclusive…
cwharris Oct 16, 2020
5e5e104
wip
cwharris Oct 18, 2020
f76a727
wip
cwharris Oct 18, 2020
0408a38
wip, bugged
cwharris Oct 19, 2020
d80616c
Merge branch 'branch-0.17' of github.com:rapidsai/cudf into scan_selc…
cwharris Oct 20, 2020
eaa954d
use full warp (32 threads) for scan_select_if kernel, because cub req…
cwharris Oct 20, 2020
cc59fac
wip
cwharris Oct 20, 2020
9d8ab98
wip
cwharris Oct 21, 2020
a969207
wip
cwharris Oct 21, 2020
6334853
working 100?
cwharris Oct 21, 2020
d07760d
working with big numbers. :D
cwharris Oct 21, 2020
165f00c
finally working. problem was unioned temp storage overlapping :(
cwharris Oct 21, 2020
7498375
working. again. for real this time.
cwharris Oct 22, 2020
781ca9c
can scan, select, and scatter via 128 threads with 16 items each agai…
cwharris Oct 22, 2020
7e81dc5
move temp storage more local (block scope) and add "mode of operation".
cwharris Oct 22, 2020
f1536fb
broken because assigning values to indices. need to have two output i…
cwharris Oct 22, 2020
753a5f8
broken because assigning values to indices. need to have two output i…
cwharris Oct 22, 2020
aa56db3
refactor, but race condition (or other bug)?
cwharris Oct 23, 2020
28f4dcb
working for 1 << 17 inputs (all false predicate).
cwharris Oct 24, 2020
e2e5b36
fixed major overlapping tile states bug.
cwharris Oct 24, 2020
cda1789
scan_select_if benchmark
cwharris Oct 25, 2020
75ccd7e
Merge branch 'branch-0.17' of github.com:rapidsai/cudf into scan_sele…
cwharris Oct 25, 2020
ac84e7a
cleanup
cwharris Oct 25, 2020
c2d1e5e
cleanup
cwharris Oct 25, 2020
0742ada
cleanup
cwharris Oct 25, 2020
45dfb5f
reorg + csv test
cwharris Oct 26, 2020
c7b0e00
Merge branch 'branch-0.17' of github.com:rapidsai/cudf into scan_sele…
cwharris Oct 26, 2020
5cdd099
changelog #6593
cwharris Oct 26, 2020
11d2953
rename scan_select_if to scan_copy_if
cwharris Oct 26, 2020
3e5a6eb
use iterator traits instead of accessing value_type directly. change …
cwharris Oct 27, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
- PR #6564 Load JNI library dependencies with a thread pool
- PR #6573 Create `cudf::detail::byte_cast` for `cudf::byte_cast`
- PR #6597 Use thread-local to track CUDA device in JNI
- PR #6593 Add scan_copy_if helper function

## Bug Fixes

Expand Down
8 changes: 8 additions & 0 deletions cpp/benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ set(GATHER_BENCH_SRC

ConfigureBench(GATHER_BENCH "${GATHER_BENCH_SRC}")

###################################################################################################
# - scan_copy_if benchmark ------------------------------------------------------------------------

set(SCAN_COPY_IF_BENCH_SRC
"${CMAKE_CURRENT_SOURCE_DIR}/algorithm/scan_copy_if_benchmark.cu")

ConfigureBench(SCAN_COPY_IF_BENCH "${SCAN_COPY_IF_BENCH_SRC}")

###################################################################################################
# - scatter benchmark -----------------------------------------------------------------------------

Expand Down
64 changes: 64 additions & 0 deletions cpp/benchmarks/algorithm/scan_copy_if_benchmark.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
* Copyright (c) 2020, NVIDIA CORPORATION.
*
* 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.
*/

#include <benchmarks/fixture/benchmark_fixture.hpp>
#include <benchmarks/synchronization/synchronization.hpp>

#include <cudf/algorithm/scan_copy_if.cuh>

#include <cudf_test/column_wrapper.hpp>

#include <thrust/iterator/constant_iterator.h>

#include <algorithm>

template <typename T>
struct simple_op {
inline constexpr T operator()(T lhs, T rhs) { return lhs + rhs; }
inline constexpr bool operator()(T value) { return value % 2 == 0; }
};

static void BM_scan_copy_if(benchmark::State& state)
{
using T = uint64_t;
uint32_t input_size = state.range(0);
auto op = simple_op<T>{};

auto input = thrust::make_constant_iterator<T>(1);
auto d_input = thrust::device_vector<T>(input, input + input_size);

for (auto _ : state) {
cuda_event_timer raii(state, true);
auto d_result = scan_copy_if(d_input.begin(), d_input.end(), op, op);
}

state.SetBytesProcessed(state.iterations() * input_size * sizeof(T));
}

class ScanSelectIfBenchmark : public cudf::benchmark {
};

#define DUMMY_BM_BENCHMARK_DEFINE(name) \
BENCHMARK_DEFINE_F(ScanSelectIfBenchmark, name)(::benchmark::State & state) \
{ \
BM_scan_copy_if(state); \
} \
BENCHMARK_REGISTER_F(ScanSelectIfBenchmark, name) \
->Ranges({{1 << 10, 1 << 30}}) \
->UseManualTime() \
->Unit(benchmark::kMillisecond);

DUMMY_BM_BENCHMARK_DEFINE(scan_copy_if);
Loading