Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
21 changes: 21 additions & 0 deletions projects/rocthrust/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,34 @@ Documentation for rocThrust available at
* Updated the required version of Google Benchmark from 1.8.0 to 1.9.0.
* Drop `c++14` support for rocthrust.
* Renamed `cpp14_required.h` to `cpp_version_check.h`
* Refactored `test_header.hpp` into separte modules `test_param_fixtures.hpp`, `test_real_assertions.hpp`, `test_imag_assertions.hpp`, and `test_utils.hpp`.
* This is done to prevent unit tests from having access to modules that they're not testing. This will improve the accuracy of code coverage reports.

### Added
* Additional unit tests for:
* binary_search
* complex
* c99math
* catrig
* ccosh
* cexp
* clog
* csin
* csqrt
* ctan
* Added `test_param_fixtures.hpp` to store all the parameters for typed test suites.
* Added `test_real_assertions.hpp` to handle unit test assertions for real numbers.
* Added `test_imag_assertions.hpp` to handle unit test assertions for imaginary numbers.
* `clang++` is now used to compile google benchmarks on Windows.
* Added gfx950 support.
* Merged changes from upstream CCCL/thrust 2.6.0

### Removed

* `device_malloc_allocator.h` has been removed. This header file was unused and should not impact users.
* Removed C++14 support, only C++17 is supported.
* `test_header.hpp` has been removed. The `HIP_CHECK` function, as well as the `test` and `inter_run_bwr` namespaces, have been moved to `test_utils.hpp`.
* `test_assertions.hpp` has been split into `test_real_assertions.hpp` and `test_imag_assertions.hpp`.

### Upcoming changes

Expand Down
2 changes: 2 additions & 0 deletions projects/rocthrust/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ if(BUILD_TEST)
add_rocthrust_test("allocator")
add_rocthrust_test("allocator_aware_policies")
add_rocthrust_test("async_copy")
add_rocthrust_test("async_for_each")
add_rocthrust_test("async_reduce")
add_rocthrust_test("async_scan")
add_rocthrust_test("async_sort")
Expand All @@ -145,6 +146,7 @@ if(BUILD_TEST)
add_rocthrust_test("binary_search_vector_descending")
add_rocthrust_test("complex")
add_rocthrust_test("complex_transform")
add_rocthrust_test("complex_various")
add_rocthrust_test("constant_iterator")
add_rocthrust_test("copy")
add_rocthrust_test("copy_n")
Expand Down
4 changes: 3 additions & 1 deletion projects/rocthrust/test/test_adjacent_difference.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
#include <thrust/iterator/discard_iterator.h>
#include <thrust/iterator/retag.h>

#include "test_header.hpp"
#include "test_real_assertions.hpp"
#include "test_param_fixtures.hpp"
#include "test_utils.hpp"

#if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_HIP

Expand Down
4 changes: 3 additions & 1 deletion projects/rocthrust/test/test_advance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
#include <thrust/advance.h>
#include <thrust/sequence.h>

#include "test_header.hpp"
#include "test_real_assertions.hpp"
#include "test_param_fixtures.hpp"
#include "test_utils.hpp"

TESTS_DEFINE(AdvanceVectorTests, VectorSignedIntegerTestsParams);

Expand Down
3 changes: 2 additions & 1 deletion projects/rocthrust/test/test_allocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
#include <cstddef>
#include <memory>

#include "test_header.hpp"
#include "test_param_fixtures.hpp"
#include "test_utils.hpp"

// The `thrust::device_malloc_allocator` is deprecated, considered removed and is only
// here for compatibility, once it is removed, the `THRUST_SUPPRESS_DEPRECATED_PUSH`
Expand Down
3 changes: 2 additions & 1 deletion projects/rocthrust/test/test_allocator_aware_policies.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
#include <thrust/system/omp/detail/par.h>
#include <thrust/system/tbb/detail/par.h>

#include "test_header.hpp"
#include "test_param_fixtures.hpp"
#include "test_utils.hpp"

template <typename T>
struct test_allocator_t
Expand Down
3 changes: 2 additions & 1 deletion projects/rocthrust/test/test_async_copy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
#include <thrust/host_vector.h>
#include <thrust/limits.h>

#include "test_header.hpp"
#include "test_param_fixtures.hpp"
#include "test_utils.hpp"

TESTS_DEFINE(AsyncCopyTests, NumericalTestsParams);

Expand Down
8 changes: 4 additions & 4 deletions projects/rocthrust/test/test_async_for_each.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
#include <thrust/device_vector.h>
#include <thrust/host_vector.h>

#include "test_header.hpp"
#include "test_param_fixtures.hpp"
#include "test_utils.hpp"

#define DEFINE_ASYNC_FOR_EACH_CALLABLE(name, ...) \
struct THRUST_PP_CAT2(name, _fn) \
Expand Down Expand Up @@ -58,10 +59,9 @@ void test_async_for_each()
for (auto size : get_sizes())
{
SCOPED_TRACE(testing::Message() << "with size = " << size);
for (size_t seed_index = 0; seed_index < random_seeds_count + seed_size; seed_index++)
for (auto seed : get_seeds())
{
unsigned int seed_value = seed_index < random_seeds_count ? rand() : seeds[seed_index - random_seeds_count];
thrust::host_vector<T> h0_data = get_random_data<T>(size, T(-1000), T(1000), seed_value);
thrust::host_vector<T> h0_data = get_random_data<T>(size, T(-1000), T(1000), seed);
thrust::device_vector<T> d0_data(h0_data);

thrust::for_each(h0_data.begin(), h0_data.end(), UnaryFunction{});
Expand Down
4 changes: 3 additions & 1 deletion projects/rocthrust/test/test_async_reduce.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
#include <thrust/device_vector.h>
#include <thrust/host_vector.h>

#include "test_header.hpp"
#include "test_real_assertions.hpp"
#include "test_param_fixtures.hpp"
#include "test_utils.hpp"

TESTS_DEFINE(AsyncReduceTests, NumericalTestsParams);

Expand Down
3 changes: 2 additions & 1 deletion projects/rocthrust/test/test_async_scan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
#include <thrust/device_vector.h>
#include <thrust/host_vector.h>

#include "test_header.hpp"
#include "test_param_fixtures.hpp"
#include "test_utils.hpp"

TESTS_DEFINE(AsyncScanTests, NumericalTestsParams)

Expand Down
3 changes: 2 additions & 1 deletion projects/rocthrust/test/test_async_sort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
#include <thrust/device_vector.h>
#include <thrust/host_vector.h>

#include "test_header.hpp"
#include "test_param_fixtures.hpp"
#include "test_utils.hpp"

TESTS_DEFINE(AsyncSortTests, NumericalTestsParams);

Expand Down
4 changes: 3 additions & 1 deletion projects/rocthrust/test/test_async_transform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
#include <thrust/device_vector.h>
#include <thrust/host_vector.h>

#include "test_header.hpp"
#include "test_real_assertions.hpp"
#include "test_param_fixtures.hpp"
#include "test_utils.hpp"

template <typename T>
struct divide_by_2
Expand Down
Loading