Skip to content

Commit

Permalink
dbscan: remove naive versions of algorithms
Browse files Browse the repository at this point in the history
This fixes issue #3414.
  • Loading branch information
ahendriksen committed Jul 7, 2022
1 parent 167dfd6 commit badcb20
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 208 deletions.
1 change: 0 additions & 1 deletion cpp/src/dbscan/adjgraph/algo.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <thrust/device_ptr.h>
#include <thrust/scan.h>

#include "../common.cuh"
#include "pack.h"

#include <raft/cuda_utils.cuh>
Expand Down
65 changes: 0 additions & 65 deletions cpp/src/dbscan/adjgraph/naive.cuh

This file was deleted.

6 changes: 3 additions & 3 deletions cpp/src/dbscan/adjgraph/runner.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#pragma once

#include "algo.cuh"
#include "naive.cuh"
#include "pack.h"

namespace ML {
Expand All @@ -41,8 +40,9 @@ void run(const raft::handle_t& handle,
{
Pack<Index_> data = {vd, adj, adj_graph, adjnnz, ex_scan, N};
switch (algo) {
// TODO: deprecate naive runner. cf #3414
case 0: Naive::launcher<Index_>(handle, data, batch_size, stream); break;
case 0:
ASSERT(
false, "Incorrect algo '%d' passed! Naive version of adjgraph has been removed.", algo);
case 1: Algo::launcher<Index_>(handle, data, batch_size, row_counters, stream); break;
default: ASSERT(false, "Incorrect algo passed! '%d'", algo);
}
Expand Down
43 changes: 0 additions & 43 deletions cpp/src/dbscan/common.cuh

This file was deleted.

2 changes: 2 additions & 0 deletions cpp/src/dbscan/dbscan.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ void dbscanFitImpl(const raft::handle_t& handle,
{
raft::common::nvtx::range fun_scope("ML::Dbscan::Fit");
ML::Logger::get().setLevel(verbosity);
// XXX: for algo_vd and algo_adj, 0 (naive) is no longer an option and has
// been removed.
int algo_vd = (metric == raft::distance::Precomputed) ? 2 : 1;
int algo_adj = 1;
int algo_ccl = 2;
Expand Down
93 changes: 0 additions & 93 deletions cpp/src/dbscan/vertexdeg/naive.cuh

This file was deleted.

6 changes: 3 additions & 3 deletions cpp/src/dbscan/vertexdeg/runner.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#pragma once

#include "algo.cuh"
#include "naive.cuh"
#include "pack.h"
#include "precomputed.cuh"

Expand All @@ -41,8 +40,9 @@ void run(const raft::handle_t& handle,
{
Pack<Type_f, Index_> data = {vd, adj, x, eps, N, D};
switch (algo) {
// TODO: deprecate naive runner. cf #3414
case 0: Naive::launcher<Type_f, Index_>(data, start_vertex_id, batch_size, stream); break;
case 0:
ASSERT(
false, "Incorrect algo '%d' passed! Naive version of vertexdeg has been removed.", algo);
case 1:
Algo::launcher<Type_f, Index_>(handle, data, start_vertex_id, batch_size, stream, metric);
break;
Expand Down

0 comments on commit badcb20

Please sign in to comment.