diff --git a/.jenkins/common.groovy b/.jenkins/common.groovy index ae5dc592..8156008e 100644 --- a/.jenkins/common.groovy +++ b/.jenkins/common.groovy @@ -32,12 +32,8 @@ def runTestCommand (platform, project) def testCommand = "ctest --output-on-failure" def hmmTestCommand = '' - def excludeRegex = 'reduce_by_key.hip' - - if (platform.jenkinsLabel.contains('gfx11')) - { - excludeRegex = /(reduce_by_key.hip|partition.hip|sort.hip|sort_by_key.hip|stable_sort_by_key.hip|stable_sort.hip|async_copy.hip|async_reduce.hip|async_scan.hip|async_sort.hip|async_transform.hip)/ - } + // Note: temporarily disable scan tests below while waiting for a compiler fix + def excludeRegex = /(reduce_by_key.hip|scan)/ testCommandExclude = "--exclude-regex \"${excludeRegex}\"" if (platform.jenkinsLabel.contains('gfx90a')) diff --git a/benchmarks/bench_utils/generation_utils.hpp b/benchmarks/bench_utils/generation_utils.hpp index 9a93617f..ec56d34e 100644 --- a/benchmarks/bench_utils/generation_utils.hpp +++ b/benchmarks/bench_utils/generation_utils.hpp @@ -187,10 +187,15 @@ namespace detail template struct random_to_item_t::value>::type> { +#if THRUST_BENCHMARKS_HAVE_INT128_SUPPORT using CastT = typename std::conditional< std::is_same::value || std::is_same::value, typename std::conditional::value, long, unsigned long>::type, T>::type; +#else + using CastT = typename std::conditional::value, long, unsigned long>::type; +#endif + double m_min; double m_max; diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake index 3a1493fb..54225eed 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake @@ -112,9 +112,10 @@ endif() # Benchmark dependencies if(BUILD_BENCHMARKS) + set(BENCHMARK_VERSION 1.8.0) if(NOT DEPENDENCIES_FORCE_DOWNLOAD) # Google Benchmark (https://github.com/google/benchmark.git) - find_package(benchmark QUIET) + find_package(benchmark ${BENCHMARK_VERSION} QUIET) else() message(STATUS "Force installing Google Benchmark.") endif() @@ -137,7 +138,7 @@ if(BUILD_BENCHMARKS) download_project( PROJ googlebenchmark GIT_REPOSITORY https://github.com/google/benchmark.git - GIT_TAG v1.8.0 + GIT_TAG v${BENCHMARK_VERSION} INSTALL_DIR ${GOOGLEBENCHMARK_ROOT} CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DBUILD_SHARED_LIBS=OFF -DBENCHMARK_ENABLE_TESTING=OFF -DCMAKE_INSTALL_PREFIX= -DCMAKE_CXX_STANDARD=14 ${COMPILER_OVERRIDE} LOG_DOWNLOAD TRUE diff --git a/internal/benchmark/timer.h b/internal/benchmark/timer.h index 0225c78f..cd0128e6 100644 --- a/internal/benchmark/timer.h +++ b/internal/benchmark/timer.h @@ -3,6 +3,50 @@ #include #include + +#if(THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_MSVC || defined(_WIN32)) +#include + +class steady_timer +{ + LARGE_INTEGER start_; + LARGE_INTEGER stop_; + LARGE_INTEGER frequency_; // Cached to avoid system calls. + + public: + steady_timer() : start_(), stop_(), frequency_() + { + BOOL const r = QueryPerformanceFrequency(&frequency_); + assert(0 != r); + (void)r; // Silence unused variable 'r' in Release builds, when + // the assertion evaporates. + } + + void start() + { + BOOL const r = QueryPerformanceCounter(&start_); + assert(0 != r); + (void)r; // Silence unused variable 'r' in Release builds, when + // the assertion evaporates. + } + + + void stop() + { + BOOL const r = QueryPerformanceCounter(&stop_); + assert(0 != r); + (void)r; // Silence unused variable 'r' in Release builds, when + // the assertion evaporates. + } + + double seconds_elapsed() + { + return double(stop_.QuadPart - start_.QuadPart) + / double(frequency_.QuadPart); + } +}; + +#else #include class steady_timer @@ -35,3 +79,4 @@ class steady_timer + double(stop_.tv_nsec - start_.tv_nsec) * 1.0e-9; } }; +#endif diff --git a/scripts/copyright-date/check-copyright.sh b/scripts/copyright-date/check-copyright.sh index a5168849..61d61068 100755 --- a/scripts/copyright-date/check-copyright.sh +++ b/scripts/copyright-date/check-copyright.sh @@ -61,7 +61,6 @@ if $forkdiff; then source_commit="remotes/$remote/HEAD" # don't use fork-point for finding fork point (lol) - # see: https://stackoverflow.com/a/53981615 diff_hash="$(git merge-base "$source_commit" "$branch")" fi diff --git a/test/bitwise_repro/bwr_utils.hpp b/test/bitwise_repro/bwr_utils.hpp index 8056ac30..fbfe288a 100644 --- a/test/bitwise_repro/bwr_utils.hpp +++ b/test/bitwise_repro/bwr_utils.hpp @@ -67,11 +67,9 @@ namespace crc } /*! \brief Performs a 32-bit cyclic redundancy check on the data it's passed. - * \note For more information on this algorithm and the optimizations used here, - * see: https://en.wikipedia.org/wiki/Computation_of_cyclic_redundancy_checks. - * \param data Pointer to the data to compute the check for, as a byte-array. - * \param len Number of bytes in the data buffer. - */ + * \param data Pointer to the data to compute the check for, as a byte-array. + * \param len Number of bytes in the data buffer. + */ uint32_t crc(const uint8_t* data, size_t len) { // Precompute values we know we'll use frequently and store them in a @@ -503,4 +501,5 @@ class TokenHelper } // end namespace bwr_utils -#endif // BRW_UTILS_HPP \ No newline at end of file +#endif // BRW_UTILS_HPP +