Skip to content

Commit

Permalink
Mergeback 6.3 changes (#463)
Browse files Browse the repository at this point in the history
* Remove Thrust comments referencing website (#451)

Referencing or using code from some websites is prohibited in rocThrust.
Some comments with these kinds of references were recently added by
Thrust, and then when we updated the API, were brought into rocThrust.
This change removes the references in the comments.

* Specify minimum version for Google benchmark (#450)

* Remove Thrust comments referencing website (#447)

Referencing or using code from some websites is prohibited in rocThrust.
Some comments with these kinds of references were recently added by
Thrust, and then when we updated the API, were brought into rocThrust.
This change removes the references in the comments.

* Bump rocm-docs-core from 1.6.2 to 1.7.1 in /docs/sphinx (#448)

Bumps [rocm-docs-core](https://github.com/ROCm/rocm-docs-core) from 1.6.2 to 1.7.1.
- [Release notes](https://github.com/ROCm/rocm-docs-core/releases)
- [Changelog](https://github.com/ROCm/rocm-docs-core/blob/develop/CHANGELOG.md)
- [Commits](ROCm/rocm-docs-core@v1.6.2...v1.7.1)

---
updated-dependencies:
- dependency-name: rocm-docs-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Specify minimum version for Google benchmark

Pass a minimum version to find_package to prevent it from using
outdated versions of Google benchmark that may be present on
the system.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Temporarily disable scan tests, re-enable tests on gfx11xx (#449)

* Remove Thrust comments referencing website (#447)

Referencing or using code from some websites is prohibited in rocThrust.
Some comments with these kinds of references were recently added by
Thrust, and then when we updated the API, were brought into rocThrust.
This change removes the references in the comments.

* Temporarily disable scan tests, re-enable tests on gfx11xx

Remove code that excludes gfx11xx tests on Jenkins, since they work there now.
Add a temporary exclusion for test_thrust_scan, which needs a compiler fix.

* Remove website URL from comments (#456)

Referencing or using code from some websites is prohibited in this repository.
This change removes an informational reference in the comments.

* Add checks around some platform-specific benchmark code (#455)

There were two spots in the new benchmark code that were causing compile-time
issues on some Windows systems. This change adds a check to make sure we have
128-bit integer support before using int128_t in generation_utils.hpp.
It also avoids calling clock_gettime on Windows, since it seems
to be causing build issues there. Instead, I've restored the old Windows timing
code from PR #431, which uses QueryPerformanceFrequency/Counter instead.

* Add gfx1151 build target (#457) (#459)

* Add gfx1151 target

* Revert "Add gfx1151 target"

This reverts commit 5889238.

* Add gfx1151 target while preserving address sanitizer targets

---------

Co-authored-by: Stanley Tsang <stanley.tsang@amd.com>

* Remove website reference (#460)

Removed the link to more information from the CRC algorithm comments.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: amd-garydeng <garydeng@amd.com>
Co-authored-by: Stanley Tsang <stanley.tsang@amd.com>
  • Loading branch information
4 people authored Sep 19, 2024
1 parent 4c45ad3 commit 4aae471
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 15 deletions.
8 changes: 2 additions & 6 deletions .jenkins/common.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down
5 changes: 5 additions & 0 deletions benchmarks/bench_utils/generation_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,15 @@ namespace detail
template <typename T>
struct random_to_item_t<T, typename std::enable_if<!std::is_floating_point<T>::value>::type>
{
#if THRUST_BENCHMARKS_HAVE_INT128_SUPPORT
using CastT = typename std::conditional<
std::is_same<T, int128_t>::value || std::is_same<T, uint128_t>::value,
typename std::conditional<std::is_signed<T>::value, long, unsigned long>::type,
T>::type;
#else
using CastT = typename std::conditional<std::is_signed<T>::value, long, unsigned long>::type;
#endif


double m_min;
double m_max;
Expand Down
5 changes: 3 additions & 2 deletions cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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=<INSTALL_DIR> -DCMAKE_CXX_STANDARD=14 ${COMPILER_OVERRIDE}
LOG_DOWNLOAD TRUE
Expand Down
45 changes: 45 additions & 0 deletions internal/benchmark/timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,50 @@
#include <thrust/detail/config.h>

#include <cassert>

#if(THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_MSVC || defined(_WIN32))
#include <windows.h>

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 <time.h>

class steady_timer
Expand Down Expand Up @@ -35,3 +79,4 @@ class steady_timer
+ double(stop_.tv_nsec - start_.tv_nsec) * 1.0e-9;
}
};
#endif
1 change: 0 additions & 1 deletion scripts/copyright-date/check-copyright.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 5 additions & 6 deletions test/bitwise_repro/bwr_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -503,4 +501,5 @@ class TokenHelper

} // end namespace bwr_utils

#endif // BRW_UTILS_HPP
#endif // BRW_UTILS_HPP

0 comments on commit 4aae471

Please sign in to comment.