Skip to content
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

Fix more warnings #311

Merged
merged 1 commit into from
Aug 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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