Skip to content

Commit

Permalink
#ifdef out pragma deprecation warning messages (#2271)
Browse files Browse the repository at this point in the history
Authors:
  - Paul Taylor (https://github.com/trxcllnt)

Approvers:
  - Corey J. Nolet (https://github.com/cjnolet)

URL: #2271
  • Loading branch information
trxcllnt authored Apr 19, 2024
1 parent 39f3854 commit febc004
Show file tree
Hide file tree
Showing 51 changed files with 155 additions and 55 deletions.
6 changes: 3 additions & 3 deletions cpp/cmake/modules/ConfigureCUDA.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# =============================================================================
# Copyright (c) 2018-2023, NVIDIA CORPORATION.
# Copyright (c) 2018-2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
Expand All @@ -13,8 +13,8 @@
# =============================================================================

if(DISABLE_DEPRECATION_WARNINGS)
list(APPEND RAFT_CXX_FLAGS -Wno-deprecated-declarations)
list(APPEND RAFT_CUDA_FLAGS -Xcompiler=-Wno-deprecated-declarations)
list(APPEND RAFT_CXX_FLAGS -Wno-deprecated-declarations -DRAFT_HIDE_DEPRECATION_WARNINGS)
list(APPEND RAFT_CUDA_FLAGS -Xcompiler=-Wno-deprecated-declarations -DRAFT_HIDE_DEPRECATION_WARNINGS)
endif()

# Be very strict when compiling with GCC as host compiler (and thus more lenient when compiling with
Expand Down
4 changes: 3 additions & 1 deletion cpp/include/raft/cluster/specializations.cuh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022-2023, NVIDIA CORPORATION.
* Copyright (c) 2022-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,8 +15,10 @@
*/
#pragma once

#ifndef RAFT_HIDE_DEPRECATION_WARNINGS
#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
#endif
4 changes: 3 additions & 1 deletion cpp/include/raft/common/cub_wrappers.cuh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022-2023, NVIDIA CORPORATION.
* Copyright (c) 2022-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -24,9 +24,11 @@

#pragma once

#ifndef RAFT_HIDE_DEPRECATION_WARNINGS
#pragma message(__FILE__ \
" is deprecated and will be removed in a future release." \
" Please note that there is no equivalent in RAFT's public API"
" so this file will eventually be removed altogether.")
#endif

#include <raft/util/detail/cub_wrappers.cuh>
4 changes: 3 additions & 1 deletion cpp/include/raft/common/device_loads_stores.cuh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2023, NVIDIA CORPORATION.
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -24,8 +24,10 @@

#pragma once

#ifndef RAFT_HIDE_DEPRECATION_WARNINGS
#pragma message(__FILE__ \
" is deprecated and will be removed in a future release." \
" Please use the raft/util version instead.")
#endif

#include <raft/util/device_loads_stores.cuh>
4 changes: 3 additions & 1 deletion cpp/include/raft/common/scatter.cuh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2023, NVIDIA CORPORATION.
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -24,8 +24,10 @@

#pragma once

#ifndef RAFT_HIDE_DEPRECATION_WARNINGS
#pragma message(__FILE__ \
" is deprecated and will be removed in a future release." \
" Please use the raft/matrix version instead.")
#endif

#include <raft/util/scatter.cuh>
4 changes: 3 additions & 1 deletion cpp/include/raft/common/seive.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2023, NVIDIA CORPORATION.
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -24,8 +24,10 @@

#pragma once

#ifndef RAFT_HIDE_DEPRECATION_WARNINGS
#pragma message(__FILE__ \
" is deprecated and will be removed in a future release." \
" Please use the raft/util version instead.")
#endif

#include <raft/util/seive.hpp>
4 changes: 3 additions & 1 deletion cpp/include/raft/core/detail/logger.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022-2023, NVIDIA CORPORATION.
* Copyright (c) 2022-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,8 +15,10 @@
*/
#pragma once

#ifndef RAFT_HIDE_DEPRECATION_WARNINGS
#pragma message(__FILE__ \
" is deprecated and will be removed in future releases." \
" Please use the <raft/core/logger.hpp> version instead.")
#endif

#include <raft/core/logger.hpp>
4 changes: 3 additions & 1 deletion cpp/include/raft/distance/specializations.cuh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
* Copyright (c) 2021-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,8 +15,10 @@
*/
#pragma once

#ifndef RAFT_HIDE_DEPRECATION_WARNINGS
#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
#endif
4 changes: 3 additions & 1 deletion cpp/include/raft/distance/specializations/distance.cuh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
* Copyright (c) 2021-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,8 +15,10 @@
*/
#pragma once

#ifndef RAFT_HIDE_DEPRECATION_WARNINGS
#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
#endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022-2023, NVIDIA CORPORATION.
* Copyright (c) 2022-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,8 +15,10 @@
*/
#pragma once

#ifndef RAFT_HIDE_DEPRECATION_WARNINGS
#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
#endif
4 changes: 3 additions & 1 deletion cpp/include/raft/lap/lap.cuh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2023, NVIDIA CORPORATION.
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -24,9 +24,11 @@

#pragma once

#ifndef RAFT_HIDE_DEPRECATION_WARNINGS
#pragma message(__FILE__ \
" is deprecated and will be removed in a future release." \
" Please use the raft/solver version instead.")
#endif

#include <raft/solver/linear_assignment.cuh>

Expand Down
4 changes: 3 additions & 1 deletion cpp/include/raft/lap/lap.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2023, NVIDIA CORPORATION.
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -24,8 +24,10 @@

#pragma once

#ifndef RAFT_HIDE_DEPRECATION_WARNINGS
#pragma message(__FILE__ \
" is deprecated and will be removed in a future release." \
" Please use the cuh version instead.")
#endif

#include <raft/solver/linear_assignment.cuh>
2 changes: 2 additions & 0 deletions cpp/include/raft/linalg/detail/gemm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
*/
#pragma once

#ifndef RAFT_HIDE_DEPRECATION_WARNINGS
#pragma message(__FILE__ \
" is deprecated and will be removed in a future release." \
" Use cublaslt_wrappers.hpp if you really need this low-level api.")
#endif

#include "cublaslt_wrappers.hpp"

Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/linalg/gemm.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@

#pragma once

#ifndef RAFT_HIDE_DEPRECATION_WARNINGS
#pragma message(__FILE__ \
" is deprecated and will be removed in a future release." \
" Use raft/linalg/gemm.hpp instead.")
#endif

#include "detail/gemm.hpp"
#include "gemm.hpp" // Part of the API transferred to the non-deprecated file
Expand Down
4 changes: 3 additions & 1 deletion cpp/include/raft/linalg/lanczos.cuh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022-2023, NVIDIA CORPORATION.
* Copyright (c) 2022-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -24,9 +24,11 @@

#pragma once

#ifndef RAFT_HIDE_DEPRECATION_WARNINGS
#pragma message(__FILE__ \
" is deprecated and will be removed in a future release." \
" Please use the sparse solvers version instead.")
#endif

#include <raft/sparse/solver/lanczos.cuh>

Expand Down
6 changes: 4 additions & 2 deletions cpp/include/raft/matrix/math.cuh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2023, NVIDIA CORPORATION.
* Copyright (c) 2018-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,9 +19,11 @@
* Please use versions in individual header files instead.
*/

#ifndef RAFT_HIDE_DEPRECATION_WARNINGS
#pragma message(__FILE__ \
" is deprecated and will be removed in a future release." \
" Please use versions in individual header files instead.")
#endif

#ifndef __MATH_H
#define __MATH_H
Expand Down Expand Up @@ -488,4 +490,4 @@ void matrixVectorBinarySub(Type* data,
}; // end namespace matrix
}; // end namespace raft

#endif
#endif
2 changes: 2 additions & 0 deletions cpp/include/raft/matrix/matrix.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
* Please use versions in individual header files instead.
*/

#ifndef RAFT_HIDE_DEPRECATION_WARNINGS
#pragma message(__FILE__ \
" is deprecated and will be removed in a future release." \
" Please use versions in individual header files instead.")
#endif

#ifndef __MATRIX_H
#define __MATRIX_H
Expand Down
4 changes: 3 additions & 1 deletion cpp/include/raft/matrix/matrix.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2023, NVIDIA CORPORATION.
* Copyright (c) 2018-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -24,8 +24,10 @@

#pragma once

#ifndef RAFT_HIDE_DEPRECATION_WARNINGS
#pragma message(__FILE__ \
" is deprecated and will be removed in a future release." \
" Please use the cuh version instead.")
#endif

#include "matrix.cuh"
4 changes: 3 additions & 1 deletion cpp/include/raft/matrix/specializations.cuh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, NVIDIA CORPORATION.
* Copyright (c) 2023-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,8 +15,10 @@
*/
#pragma once

#ifndef RAFT_HIDE_DEPRECATION_WARNINGS
#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
#endif
4 changes: 3 additions & 1 deletion cpp/include/raft/matrix/specializations/detail/select_k.cuh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, NVIDIA CORPORATION.
* Copyright (c) 2023-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,8 +15,10 @@
*/
#pragma once

#ifndef RAFT_HIDE_DEPRECATION_WARNINGS
#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
#endif
4 changes: 3 additions & 1 deletion cpp/include/raft/neighbors/specializations.cuh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
* Copyright (c) 2021-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,8 +15,10 @@
*/
#pragma once

#ifndef RAFT_HIDE_DEPRECATION_WARNINGS
#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
#endif
4 changes: 3 additions & 1 deletion cpp/include/raft/neighbors/specializations/ball_cover.cuh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
* Copyright (c) 2021-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,8 +15,10 @@
*/
#pragma once

#ifndef RAFT_HIDE_DEPRECATION_WARNINGS
#pragma message( \
__FILE__ \
" is deprecated and will be removed." \
" Including specializations is not necessary any more." \
" For more information, see: https://docs.rapids.ai/api/raft/nightly/using_libraft.html")
#endif
Loading

0 comments on commit febc004

Please sign in to comment.