Skip to content

Commit

Permalink
Fix compile time issue with minkowski distance
Browse files Browse the repository at this point in the history
As explained in
#1246 (comment),
ptxas chokes on the minkowski distance when VecLen==4 and
IdxT==uint32_t.

This PR removes the veclen == 4 specialization for the minkowski
distance.
  • Loading branch information
ahendriksen committed Feb 7, 2023
1 parent bd8fa23 commit 0c5fc50
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions cpp/include/raft/distance/detail/minkowski.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void minkowskiUnExpImpl(const DataT* x,
}
};

if (isRowMajor) {
if constexpr (isRowMajor) {
auto minkowskiUnExpRowMajor = pairwiseDistanceMatKernel<false,
DataT,
AccT,
Expand Down Expand Up @@ -151,10 +151,7 @@ void minkowskiUnExp(IdxT m,
{
size_t bytesA = sizeof(DataT) * lda;
size_t bytesB = sizeof(DataT) * ldb;
if (16 % sizeof(DataT) == 0 && bytesA % 16 == 0 && bytesB % 16 == 0) {
minkowskiUnExpImpl<DataT, AccT, OutT, IdxT, 16 / sizeof(DataT), FinalLambda, isRowMajor>(
x, y, m, n, k, lda, ldb, ldd, dOutput, fin_op, stream, metric_arg);
} else if (8 % sizeof(DataT) == 0 && bytesA % 8 == 0 && bytesB % 8 == 0) {
if (8 % sizeof(DataT) == 0 && bytesA % 8 == 0 && bytesB % 8 == 0) {
minkowskiUnExpImpl<DataT, AccT, OutT, IdxT, 8 / sizeof(DataT), FinalLambda, isRowMajor>(
x, y, m, n, k, lda, ldb, ldd, dOutput, fin_op, stream, metric_arg);
} else {
Expand Down

0 comments on commit 0c5fc50

Please sign in to comment.