Skip to content

Kokkos: fix defaulted functions with CUDA 9

James Willenbring requested to merge ibaned:kokkos-defaulted into develop

Created by: ibaned

@trilinos/kokkos @trilinos/sacado @etphipp @rppawlo @bathmatt @crtrott

Description

CUDA 9 emits an incorrect warning for defaulted device functions. This warning mislead Kokkos into marking them wrong, causing code crashes. This change introduces a workaround (only under CUDA 9) which ensures correct behavior and prevents warnings. Makefile.kokkos will now add a warning suppression flag to KOKKOS_CXX_FLAGS when compiling with CUDA 9, so that Kokkos users can do the right thing with defaulted functions and not get warnings. This means Trilinos users who use KOKKOS_ARCH will have that flag automatically added to their build.

Motivation and Context

Currently ShyLU/Tacho crashes because Kokkos::MemoryPool is marked wrong for CUDA, and Sacado code emits lots of warnings under CUDA 9. This change should fix both things.

How Has This Been Tested?

Passed Kokkos-only spot check as part of kokkos/kokkos#1471

Merge request reports