Skip to content

Commit

Permalink
Alternative Skip Value Check (GridTools#1721)
Browse files Browse the repository at this point in the history
This alternative check drastically improves performance when using NVCC (due to compiler better recognizing optimization potential).
Further, provides up-to-date performance references and an updated update_references.sh as the Jenkins setup now requires authentication to access the performance results.
  • Loading branch information
fthaler authored and havogt committed Aug 3, 2022
1 parent 5b16575 commit 8eaf699
Show file tree
Hide file tree
Showing 8 changed files with 53,206 additions and 53,204 deletions.
5 changes: 1 addition & 4 deletions include/gridtools/fn/unstructured.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ namespace gridtools::fn {
template <class Tag, class Ptr, class Strides, class Domain, class Conn, class Offset>
GT_FUNCTION constexpr auto horizontal_shift(iterator<Tag, Ptr, Strides, Domain> const &it, Conn, Offset) {
auto const &table = host_device::at_key<Conn>(it.m_domain.m_tables);
auto new_index = get<Offset::value>(neighbor_table::neighbors(table, it.m_index));
auto new_index = it.m_index == -1 ? -1 : get<Offset::value>(neighbor_table::neighbors(table, it.m_index));
auto shifted = it;
shifted.m_index = new_index;
return shifted;
Expand All @@ -101,9 +101,6 @@ namespace gridtools::fn {
template <class Tag, class Ptr, class Strides, class Domain, class Dim, class Offset, class... Offsets>
GT_FUNCTION constexpr auto shift(
iterator<Tag, Ptr, Strides, Domain> const &it, Dim, Offset offset, Offsets... offsets) {
if (it.m_index == -1)
return it;

if constexpr (has_key<decltype(it.m_domain.m_tables), Dim>()) {
return shift(horizontal_shift(it, Dim(), offset), offsets...);
} else {
Expand Down
9 changes: 7 additions & 2 deletions jenkins/update_references.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,21 @@ if [[ -z $1 ]]; then
exit 1
fi

echo "Login for jenkins-mch.cscs.ch:"
read -p "user: " user
read -p "password: " -s password
echo

refpath=$(dirname "$BASH_SOURCE")/../pyutils/perftest/references

for domain in 128 256; do
for label in ault dom daint-cn tsa; do
for env in cray hip nvcc_cray nvcc_cray_cxx20 nvcc_gcc; do
current="${label%-*}_$env/$domain.json"
src="http://jenkins-mch.cscs.ch/view/GridTools/job/GridTools_perftest_PR/$1/env=$env,label=$label/artifact/build/pyutils/perftest/results/$current"
src="https://jenkins-mch.cscs.ch/view/GridTools/job/GridTools_perftest_PR/$1/env=$env,label=$label/artifact/build/pyutils/perftest/results/$current"

tmp=$(mktemp)
wget -q -O "$tmp" "$src"
curl -fs -u "$user:$password" -o "$tmp" "$src"

if [[ $? == 0 ]]; then
dst="$refpath/$current"
Expand Down
Loading

0 comments on commit 8eaf699

Please sign in to comment.