diff --git a/cpp/tests/community/ecg_test.cpp b/cpp/tests/community/ecg_test.cpp index 3c4c9bc9c12..262e2bd23af 100644 --- a/cpp/tests/community/ecg_test.cpp +++ b/cpp/tests/community/ecg_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2022, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2019-2023, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation @@ -121,41 +121,29 @@ TEST(ecg, dolphin) cugraph::legacy::GraphCSRView graph_csr( offsets_v.data(), indices_v.data(), weights_v.data(), num_verts, num_edges); - // "FIXME": remove this check once we drop support for Pascal - // - // Calling louvain on Pascal will throw an exception, we'll check that - // this is the behavior while we still support Pascal (device_prop.major < 7) - // - if (handle.get_device_properties().major < 7) { - EXPECT_THROW( - (cugraph::ecg(handle, graph_csr, .05, 16, result_v.data())), - cugraph::logic_error); - } else { - cugraph::ecg(handle, graph_csr, .05, 16, result_v.data()); + cugraph::ecg(handle, graph_csr, .05, 16, result_v.data()); - auto cluster_id = cugraph::test::to_host(handle, result_v); + auto cluster_id = cugraph::test::to_host(handle, result_v); - int max = *max_element(cluster_id.begin(), cluster_id.end()); - int min = *min_element(cluster_id.begin(), cluster_id.end()); + int max = *max_element(cluster_id.begin(), cluster_id.end()); + int min = *min_element(cluster_id.begin(), cluster_id.end()); - ASSERT_EQ((min >= 0), 1); + ASSERT_EQ((min >= 0), 1); - std::set cluster_ids; - for (auto c : cluster_id) { - cluster_ids.insert(c); - } + std::set cluster_ids; + for (auto c : cluster_id) { + cluster_ids.insert(c); + } - ASSERT_EQ(cluster_ids.size(), size_t(max + 1)); + ASSERT_EQ(cluster_ids.size(), size_t(max + 1)); - float modularity{0.0}; + float modularity{0.0}; - cugraph::ext_raft::analyzeClustering_modularity( - graph_csr, max + 1, result_v.data(), &modularity); + cugraph::ext_raft::analyzeClustering_modularity(graph_csr, max + 1, result_v.data(), &modularity); - float random_modularity{0.95 * 0.4962422251701355}; + float random_modularity{0.95 * 0.4962422251701355}; - ASSERT_GT(modularity, random_modularity); - } + ASSERT_GT(modularity, random_modularity); } CUGRAPH_TEST_PROGRAM_MAIN() diff --git a/cpp/tests/community/leiden_test.cpp b/cpp/tests/community/leiden_test.cpp index 656e855057f..36e850683bd 100644 --- a/cpp/tests/community/leiden_test.cpp +++ b/cpp/tests/community/leiden_test.cpp @@ -79,39 +79,19 @@ class Tests_Leiden : public ::testing::TestWithParamview(); - // "FIXME": remove this check once we drop support for Pascal - // - // Calling louvain on Pascal will throw an exception, we'll check that - // this is the behavior while we still support Pascal (device_prop.major < 7) - // - cudaDeviceProp device_prop; - RAFT_CUDA_TRY(cudaGetDeviceProperties(&device_prop, 0)); - - if (device_prop.major < 7) { - EXPECT_THROW(louvain_legacy(graph_view, - graph_view.get_number_of_vertices(), - louvain_usecase.check_correctness_, - louvain_usecase.expected_level_, - louvain_usecase.expected_modularity_), - cugraph::logic_error); - } else { - louvain_legacy(graph_view, - graph_view.get_number_of_vertices(), - louvain_usecase.check_correctness_, - louvain_usecase.expected_level_, - louvain_usecase.expected_modularity_); - } + louvain_legacy(graph_view, + graph_view.get_number_of_vertices(), + louvain_usecase.check_correctness_, + louvain_usecase.expected_level_, + louvain_usecase.expected_modularity_); } template @@ -124,41 +107,20 @@ class Tests_Louvain auto edge_weight_view = edge_weights ? std::make_optional((*edge_weights).view()) : std::nullopt; - // "FIXME": remove this check once we drop support for Pascal - // - // Calling louvain on Pascal will throw an exception, we'll check that - // this is the behavior while we still support Pascal (device_prop.major < 7) - // - cudaDeviceProp device_prop; - RAFT_CUDA_TRY(cudaGetDeviceProperties(&device_prop, 0)); - if (cugraph::test::g_perf) { RAFT_CUDA_TRY(cudaDeviceSynchronize()); // for consistent performance measurement hr_timer.start("Louvain"); } - if (device_prop.major < 7) { - EXPECT_THROW(louvain(graph_view, - edge_weight_view, - graph_view.local_vertex_partition_range_size(), - louvain_usecase.max_level_, - louvain_usecase.threshold_, - louvain_usecase.resolution_, - louvain_usecase.check_correctness_, - louvain_usecase.expected_level_, - louvain_usecase.expected_modularity_), - cugraph::logic_error); - } else { - louvain(graph_view, - edge_weight_view, - graph_view.local_vertex_partition_range_size(), - louvain_usecase.max_level_, - louvain_usecase.threshold_, - louvain_usecase.resolution_, - louvain_usecase.check_correctness_, - louvain_usecase.expected_level_, - louvain_usecase.expected_modularity_); - } + louvain(graph_view, + edge_weight_view, + graph_view.local_vertex_partition_range_size(), + louvain_usecase.max_level_, + louvain_usecase.threshold_, + louvain_usecase.resolution_, + louvain_usecase.check_correctness_, + louvain_usecase.expected_level_, + louvain_usecase.expected_modularity_); if (cugraph::test::g_perf) { RAFT_CUDA_TRY(cudaDeviceSynchronize()); // for consistent performance measurement