-
Notifications
You must be signed in to change notification settings - Fork 406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Several warnings in cuda builds #6991
Labels
Comments
Should any of these be suppressed using |
cuda/11.2.2 + gcc/8.3.0 for Volta70 + Power9 (Weaver rhel8 queue):TestViewRank.cpp
TestMathematicalFunctions.hpp
TestStdAlgorithmsCommon.hpp
Reproducer (Weaver rhel8 queue): # Interactive Weaver session
bsub -Is -n 1 -q rhel8 -gpu "num=1" bash
# Environment
source /etc/profile.d/modules.sh
source /projects/ppc64le-pwr9-rhel8/legacy-env.sh
cuda/11.2.2/gcc/8.3.1 cmake/3.23.1
# Configure
${KOKKOS_PATH}/generate_makefile.bash --with-cuda --with-serial --compiler=${KOKKOS_PATH}/bin/nvcc_wrapper --arch=Volta70,Power9 --with-cuda-options=enable_lambda --kokkos-path=${KOKKOS_PATH} --cxxstandard=17
# Build, observe warnings
make -j16 |
List of warnings needing assignment:
|
diff --git a/core/unit_test/TestArray.cpp b/core/unit_test/TestArray.cpp
index 11b28bed9..c2c8510d8 100644
--- a/core/unit_test/TestArray.cpp
+++ b/core/unit_test/TestArray.cpp
@@ -132,7 +132,7 @@ struct MyInt {
int i;
private:
- friend constexpr void kokkos_swap(MyInt& lhs, MyInt& rhs) noexcept {
+ friend constexpr KOKKOS_FUNCTION void kokkos_swap(MyInt& lhs, MyInt& rhs) noexcept {
lhs.i = 255;
rhs.i = 127;
} should fix the warning regarding diff --git a/core/unit_test/TestArray.cpp b/core/unit_test/TestArray.cpp
index d20d355b7..11b28bed9 100644
--- a/core/unit_test/TestArray.cpp
+++ b/core/unit_test/TestArray.cpp
@@ -51,9 +51,9 @@ static_assert(test_array_structured_binding_support());
template <typename L, typename R>
KOKKOS_FUNCTION constexpr bool is_equal(L const& l, R const& r) {
- if (std::size(l) != std::size(r)) return false;
+ if (l.size() != r.size()) return false;
- for (size_t i = 0; i != std::size(l); ++i) {
+ for (size_t i = 0; i != l.size(); ++i) {
if (l[i] != r[i]) return false;
} should fix TestArray.cpp : (multiple, e.g.) TestArray.cpp(54): warning #20013-D: calling a constexpr __host__ function("size") from a __host__ __device__ function("is_equal") is not allowed. |
diff --git a/tpls/gtest/gtest/gtest.h b/tpls/gtest/gtest/gtest.h
index c17c9ab3f..2b34f3a60 100644
--- a/tpls/gtest/gtest/gtest.h
+++ b/tpls/gtest/gtest/gtest.h
@@ -4910,7 +4910,7 @@ class NeverThrown {
class GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) \
: public parent_class { \
public: \
- GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)() = default; \
+ GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)() { (void)test_info_; }\
~GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)() override = default; \
GTEST_DISALLOW_COPY_AND_ASSIGN_(GTEST_TEST_CLASS_NAME_(test_suite_name, \
test_name)); \ fixes the |
@ndellingwood -- I'll see if I can reproduce and fix |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Several warnings are present in cuda builds, below are for:
cuda/11.8 + gcc/11.3.0 on Hopper arch (Blake H100 queue):
TestArray.cpp
TestLegionInitialization.cpp
TestCuda_InterOp_StreamsMultiGPU.cpp
TestCuda_InterOp_StreamsMultiGPU.cpp
TestParseCmdLineArgsAndEnvVars.cpp
TestScopedRegion.cpp
Kokkos_Complex.hpp
*TestNumericTraits.hpp
Please include the following for a minimal reproducer
Reproducer (blake H100 queue):
The text was updated successfully, but these errors were encountered: