Skip to content

Commit

Permalink
Fix more warnings (#311)
Browse files Browse the repository at this point in the history
Warnings missed in #299...

Authors:
  - Mark Harris (https://github.com/harrism)

Approvers:
  - Divye Gala (https://github.com/divyegala)
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: #311
  • Loading branch information
harrism authored Aug 5, 2021
1 parent e4d8a03 commit 78b67af
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 21 deletions.
34 changes: 17 additions & 17 deletions cpp/include/raft/distance/distance.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ struct DistanceImpl<raft::distance::DistanceType::L2Expanded, InType, AccType,
OutType, FinalLambda, Index_> {
void run(const InType *x, const InType *y, OutType *dist, Index_ m, Index_ n,
Index_ k, void *workspace, size_t worksize, FinalLambda fin_op,
cudaStream_t stream, bool isRowMajor, InType metric_arg) {
cudaStream_t stream, bool isRowMajor, InType) {
raft::distance::euclideanAlgo1<InType, AccType, OutType, FinalLambda,
Index_>(m, n, k, x, y, dist, false,
(AccType *)workspace, worksize,
Expand All @@ -61,7 +61,7 @@ struct DistanceImpl<raft::distance::DistanceType::L2SqrtExpanded, InType,
AccType, OutType, FinalLambda, Index_> {
void run(const InType *x, const InType *y, OutType *dist, Index_ m, Index_ n,
Index_ k, void *workspace, size_t worksize, FinalLambda fin_op,
cudaStream_t stream, bool isRowMajor, InType metric_arg) {
cudaStream_t stream, bool isRowMajor, InType) {
raft::distance::euclideanAlgo1<InType, AccType, OutType, FinalLambda,
Index_>(m, n, k, x, y, dist, true,
(AccType *)workspace, worksize,
Expand All @@ -75,7 +75,7 @@ struct DistanceImpl<raft::distance::DistanceType::CosineExpanded, InType,
AccType, OutType, FinalLambda, Index_> {
void run(const InType *x, const InType *y, OutType *dist, Index_ m, Index_ n,
Index_ k, void *workspace, size_t worksize, FinalLambda fin_op,
cudaStream_t stream, bool isRowMajor, InType metric_arg) {
cudaStream_t stream, bool isRowMajor, InType) {
raft::distance::cosineAlgo1<InType, AccType, OutType, FinalLambda, Index_>(
m, n, k, x, y, dist, (AccType *)workspace, worksize, fin_op, stream,
isRowMajor);
Expand All @@ -87,8 +87,8 @@ template <typename InType, typename AccType, typename OutType,
struct DistanceImpl<raft::distance::DistanceType::L2Unexpanded, InType, AccType,
OutType, FinalLambda, Index_> {
void run(const InType *x, const InType *y, OutType *dist, Index_ m, Index_ n,
Index_ k, void *workspace, size_t worksize, FinalLambda fin_op,
cudaStream_t stream, bool isRowMajor, InType metric_arg) {
Index_ k, void *, size_t, FinalLambda fin_op, cudaStream_t stream,
bool isRowMajor, InType) {
raft::distance::euclideanAlgo2<InType, AccType, OutType, FinalLambda,
Index_>(m, n, k, x, y, dist, false, fin_op,
stream, isRowMajor);
Expand All @@ -100,8 +100,8 @@ template <typename InType, typename AccType, typename OutType,
struct DistanceImpl<raft::distance::DistanceType::L2SqrtUnexpanded, InType,
AccType, OutType, FinalLambda, Index_> {
void run(const InType *x, const InType *y, OutType *dist, Index_ m, Index_ n,
Index_ k, void *workspace, size_t worksize, FinalLambda fin_op,
cudaStream_t stream, bool isRowMajor, InType metric_arg) {
Index_ k, void *, size_t, FinalLambda fin_op, cudaStream_t stream,
bool isRowMajor, InType) {
raft::distance::euclideanAlgo2<InType, AccType, OutType, FinalLambda,
Index_>(m, n, k, x, y, dist, true, fin_op,
stream, isRowMajor);
Expand All @@ -113,8 +113,8 @@ template <typename InType, typename AccType, typename OutType,
struct DistanceImpl<raft::distance::DistanceType::L1, InType, AccType, OutType,
FinalLambda, Index_> {
void run(const InType *x, const InType *y, OutType *dist, Index_ m, Index_ n,
Index_ k, void *workspace, size_t worksize, FinalLambda fin_op,
cudaStream_t stream, bool isRowMajor, InType metric_arg) {
Index_ k, void *, size_t, FinalLambda fin_op, cudaStream_t stream,
bool isRowMajor, InType) {
raft::distance::l1Impl<InType, AccType, OutType, FinalLambda, Index_>(
m, n, k, x, y, dist, fin_op, stream, isRowMajor);
}
Expand All @@ -125,8 +125,8 @@ template <typename InType, typename AccType, typename OutType,
struct DistanceImpl<raft::distance::DistanceType::Linf, InType, AccType,
OutType, FinalLambda, Index_> {
void run(const InType *x, const InType *y, OutType *dist, Index_ m, Index_ n,
Index_ k, void *workspace, size_t worksize, FinalLambda fin_op,
cudaStream_t stream, bool isRowMajor, InType metric_arg) {
Index_ k, void *, size_t, FinalLambda fin_op, cudaStream_t stream,
bool isRowMajor, InType) {
raft::distance::chebyshevImpl<InType, AccType, OutType, FinalLambda,
Index_>(m, n, k, x, y, dist, fin_op, stream,
isRowMajor);
Expand All @@ -138,8 +138,8 @@ template <typename InType, typename AccType, typename OutType,
struct DistanceImpl<raft::distance::DistanceType::HellingerExpanded, InType,
AccType, OutType, FinalLambda, Index_> {
void run(const InType *x, const InType *y, OutType *dist, Index_ m, Index_ n,
Index_ k, void *workspace, size_t worksize, FinalLambda fin_op,
cudaStream_t stream, bool isRowMajor, InType metric_arg) {
Index_ k, void *, size_t, FinalLambda fin_op, cudaStream_t stream,
bool isRowMajor, InType) {
raft::distance::hellingerImpl<InType, AccType, OutType, FinalLambda,
Index_>(m, n, k, x, y, dist, fin_op, stream,
isRowMajor);
Expand All @@ -151,8 +151,8 @@ template <typename InType, typename AccType, typename OutType,
struct DistanceImpl<raft::distance::DistanceType::LpUnexpanded, InType, AccType,
OutType, FinalLambda, Index_> {
void run(const InType *x, const InType *y, OutType *dist, Index_ m, Index_ n,
Index_ k, void *workspace, size_t worksize, FinalLambda fin_op,
cudaStream_t stream, bool isRowMajor, InType metric_arg) {
Index_ k, void *, size_t, FinalLambda fin_op, cudaStream_t stream,
bool isRowMajor, InType metric_arg) {
raft::distance::minkowskiImpl<InType, AccType, OutType, FinalLambda,
Index_>(m, n, k, x, y, dist, fin_op, stream,
isRowMajor, metric_arg);
Expand All @@ -164,8 +164,8 @@ template <typename InType, typename AccType, typename OutType,
struct DistanceImpl<raft::distance::DistanceType::Canberra, InType, AccType,
OutType, FinalLambda, Index_> {
void run(const InType *x, const InType *y, OutType *dist, Index_ m, Index_ n,
Index_ k, void *workspace, size_t worksize, FinalLambda fin_op,
cudaStream_t stream, bool isRowMajor, InType metric_arg) {
Index_ k, void *, size_t, FinalLambda fin_op, cudaStream_t stream,
bool isRowMajor, InType) {
raft::distance::canberraImpl<InType, AccType, OutType, FinalLambda, Index_>(
m, n, k, x, y, dist, fin_op, stream, isRowMajor);
}
Expand Down
5 changes: 1 addition & 4 deletions cpp/include/raft/linalg/cublas_wrappers.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,15 @@ inline const char *cublas_error_to_string(cublasStatus_t err) {
/** FIXME: temporary alias for cuML compatibility */
#define CUBLAS_CHECK(call) CUBLAS_TRY(call)

///@todo: enable this once we have logging enabled
#if 0
/** check for cublas runtime API errors but do not assert */
define CUBLAS_CHECK_NO_THROW(call) \
#define CUBLAS_CHECK_NO_THROW(call) \
do { \
cublasStatus_t err = call; \
if (err != CUBLAS_STATUS_SUCCESS) { \
CUML_LOG_ERROR("CUBLAS call='%s' got errorcode=%d err=%s", #call, err, \
raft::linalg::detail::cublas_error_to_string(err)); \
} \
} while (0)
#endif

namespace raft {
namespace linalg {
Expand Down

0 comments on commit 78b67af

Please sign in to comment.