Skip to content

Commit 5890d80

Browse files
Remove checks for Pascal, no longer supported (#4044)
The only remaining "support" for Pascal was a check that if we're on a Pascal GPU we expect the function to throw an exception. Not sure it does anymore (don't see evidence of it, we haven't tested on Pascal for a long time), but if we're not supporting Pascal it doesn't matter. Closes #4022 Authors: - Chuck Hastings (https://github.com/ChuckHastings) Approvers: - Seunghwa Kang (https://github.com/seunghwak) - AJ Schmidt (https://github.com/ajschmidt8) - Rick Ratzel (https://github.com/rlratzel) URL: #4044
1 parent 05c78bb commit 5890d80

File tree

7 files changed

+39
-155
lines changed

7 files changed

+39
-155
lines changed

ci/notebook_list.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ def skip_book_dir(runtype):
4242
# Not strictly true... however what we mean is
4343
# Pascal or earlier
4444
#
45-
pascal = False
4645
ampere = False
4746
device = cuda.get_current_device()
4847

@@ -62,8 +61,6 @@ def skip_book_dir(runtype):
6261
cc = getattr(device, "COMPUTE_CAPABILITY", None) or getattr(
6362
device, "compute_capability"
6463
)
65-
if cc[0] < 7:
66-
pascal = True
6764
if cc[0] >= 8:
6865
ampere = True
6966

@@ -91,10 +88,6 @@ def skip_book_dir(runtype):
9188
)
9289
skip = True
9390
break
94-
elif pascal and re.search("# Does not run on Pascal", line):
95-
print(f"SKIPPING {filename} (does not run on Pascal)", file=sys.stderr)
96-
skip = True
97-
break
9891
elif ampere and re.search("# Does not run on Ampere", line):
9992
print(f"SKIPPING {filename} (does not run on Ampere)", file=sys.stderr)
10093
skip = True

ci/test.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@ fi
6363
# EXITCODE for the script.
6464
set +e
6565

66-
if (python ${CUGRAPH_ROOT}/ci/utils/is_pascal.py); then
67-
echo "WARNING: skipping C++ tests on Pascal GPU arch."
68-
elif hasArg "--run-cpp-tests"; then
66+
if hasArg "--run-cpp-tests"; then
6967
echo "C++ gtests for cuGraph (single-GPU only)..."
7068
for gt in "${CONDA_PREFIX}/bin/gtests/libcugraph/"*_TEST; do
7169
test_name=$(basename $gt)

ci/utils/is_pascal.py

Lines changed: 0 additions & 37 deletions
This file was deleted.

cpp/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ endif()
4141
# cuhornet currently doesn't support
4242
#
4343
# >= 90
44-
set(supported_archs "60" "62" "70" "72" "75" "80" "86" "89" "90")
44+
set(supported_archs "70" "72" "75" "80" "86" "89" "90")
4545
foreach( arch IN LISTS CMAKE_CUDA_ARCHITECTURES)
4646
string(REPLACE "-real" "" arch ${arch})
4747
if( arch IN_LIST supported_archs )

cpp/tests/community/ecg_test.cpp

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019-2022, NVIDIA CORPORATION. All rights reserved.
2+
* Copyright (c) 2019-2023, NVIDIA CORPORATION. All rights reserved.
33
*
44
* NVIDIA CORPORATION and its licensors retain all intellectual property
55
* and proprietary rights in and to this software, related documentation
@@ -121,41 +121,29 @@ TEST(ecg, dolphin)
121121
cugraph::legacy::GraphCSRView<int, int, float> graph_csr(
122122
offsets_v.data(), indices_v.data(), weights_v.data(), num_verts, num_edges);
123123

124-
// "FIXME": remove this check once we drop support for Pascal
125-
//
126-
// Calling louvain on Pascal will throw an exception, we'll check that
127-
// this is the behavior while we still support Pascal (device_prop.major < 7)
128-
//
129-
if (handle.get_device_properties().major < 7) {
130-
EXPECT_THROW(
131-
(cugraph::ecg<int32_t, int32_t, float>(handle, graph_csr, .05, 16, result_v.data())),
132-
cugraph::logic_error);
133-
} else {
134-
cugraph::ecg<int32_t, int32_t, float>(handle, graph_csr, .05, 16, result_v.data());
124+
cugraph::ecg<int32_t, int32_t, float>(handle, graph_csr, .05, 16, result_v.data());
135125

136-
auto cluster_id = cugraph::test::to_host(handle, result_v);
126+
auto cluster_id = cugraph::test::to_host(handle, result_v);
137127

138-
int max = *max_element(cluster_id.begin(), cluster_id.end());
139-
int min = *min_element(cluster_id.begin(), cluster_id.end());
128+
int max = *max_element(cluster_id.begin(), cluster_id.end());
129+
int min = *min_element(cluster_id.begin(), cluster_id.end());
140130

141-
ASSERT_EQ((min >= 0), 1);
131+
ASSERT_EQ((min >= 0), 1);
142132

143-
std::set<int> cluster_ids;
144-
for (auto c : cluster_id) {
145-
cluster_ids.insert(c);
146-
}
133+
std::set<int> cluster_ids;
134+
for (auto c : cluster_id) {
135+
cluster_ids.insert(c);
136+
}
147137

148-
ASSERT_EQ(cluster_ids.size(), size_t(max + 1));
138+
ASSERT_EQ(cluster_ids.size(), size_t(max + 1));
149139

150-
float modularity{0.0};
140+
float modularity{0.0};
151141

152-
cugraph::ext_raft::analyzeClustering_modularity(
153-
graph_csr, max + 1, result_v.data(), &modularity);
142+
cugraph::ext_raft::analyzeClustering_modularity(graph_csr, max + 1, result_v.data(), &modularity);
154143

155-
float random_modularity{0.95 * 0.4962422251701355};
144+
float random_modularity{0.95 * 0.4962422251701355};
156145

157-
ASSERT_GT(modularity, random_modularity);
158-
}
146+
ASSERT_GT(modularity, random_modularity);
159147
}
160148

161149
CUGRAPH_TEST_PROGRAM_MAIN()

cpp/tests/community/leiden_test.cpp

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -79,39 +79,19 @@ class Tests_Leiden : public ::testing::TestWithParam<std::tuple<Leiden_Usecase,
7979
auto edge_weight_view =
8080
edge_weights ? std::make_optional((*edge_weights).view()) : std::nullopt;
8181

82-
// "FIXME": remove this check once we drop support for Pascal
83-
//
84-
// Calling leiden on Pascal will throw an exception, we'll check that
85-
// this is the behavior while we still support Pascal (device_prop.major < 7)
86-
//
87-
cudaDeviceProp device_prop;
88-
RAFT_CUDA_TRY(cudaGetDeviceProperties(&device_prop, 0));
89-
9082
if (cugraph::test::g_perf) {
9183
RAFT_CUDA_TRY(cudaDeviceSynchronize()); // for consistent performance measurement
9284
hr_timer.start("Leiden");
9385
}
9486

95-
if (device_prop.major < 7) {
96-
EXPECT_THROW(leiden(graph_view,
97-
edge_weight_view,
98-
graph_view.local_vertex_partition_range_size(),
99-
leiden_usecase.max_level_,
100-
leiden_usecase.resolution_,
101-
leiden_usecase.check_correctness_,
102-
leiden_usecase.expected_level_,
103-
leiden_usecase.expected_modularity_),
104-
cugraph::logic_error);
105-
} else {
106-
leiden(graph_view,
107-
edge_weight_view,
108-
graph_view.local_vertex_partition_range_size(),
109-
leiden_usecase.max_level_,
110-
leiden_usecase.resolution_,
111-
leiden_usecase.check_correctness_,
112-
leiden_usecase.expected_level_,
113-
leiden_usecase.expected_modularity_);
114-
}
87+
leiden(graph_view,
88+
edge_weight_view,
89+
graph_view.local_vertex_partition_range_size(),
90+
leiden_usecase.max_level_,
91+
leiden_usecase.resolution_,
92+
leiden_usecase.check_correctness_,
93+
leiden_usecase.expected_level_,
94+
leiden_usecase.expected_modularity_);
11595

11696
if (cugraph::test::g_perf) {
11797
RAFT_CUDA_TRY(cudaDeviceSynchronize()); // for consistent performance measurement

cpp/tests/community/louvain_test.cpp

Lines changed: 14 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -69,28 +69,11 @@ class Tests_Louvain
6969
handle, input_usecase, true);
7070
auto graph_view = graph->view();
7171

72-
// "FIXME": remove this check once we drop support for Pascal
73-
//
74-
// Calling louvain on Pascal will throw an exception, we'll check that
75-
// this is the behavior while we still support Pascal (device_prop.major < 7)
76-
//
77-
cudaDeviceProp device_prop;
78-
RAFT_CUDA_TRY(cudaGetDeviceProperties(&device_prop, 0));
79-
80-
if (device_prop.major < 7) {
81-
EXPECT_THROW(louvain_legacy(graph_view,
82-
graph_view.get_number_of_vertices(),
83-
louvain_usecase.check_correctness_,
84-
louvain_usecase.expected_level_,
85-
louvain_usecase.expected_modularity_),
86-
cugraph::logic_error);
87-
} else {
88-
louvain_legacy(graph_view,
89-
graph_view.get_number_of_vertices(),
90-
louvain_usecase.check_correctness_,
91-
louvain_usecase.expected_level_,
92-
louvain_usecase.expected_modularity_);
93-
}
72+
louvain_legacy(graph_view,
73+
graph_view.get_number_of_vertices(),
74+
louvain_usecase.check_correctness_,
75+
louvain_usecase.expected_level_,
76+
louvain_usecase.expected_modularity_);
9477
}
9578

9679
template <typename vertex_t, typename edge_t, typename weight_t, typename result_t>
@@ -124,41 +107,20 @@ class Tests_Louvain
124107
auto edge_weight_view =
125108
edge_weights ? std::make_optional((*edge_weights).view()) : std::nullopt;
126109

127-
// "FIXME": remove this check once we drop support for Pascal
128-
//
129-
// Calling louvain on Pascal will throw an exception, we'll check that
130-
// this is the behavior while we still support Pascal (device_prop.major < 7)
131-
//
132-
cudaDeviceProp device_prop;
133-
RAFT_CUDA_TRY(cudaGetDeviceProperties(&device_prop, 0));
134-
135110
if (cugraph::test::g_perf) {
136111
RAFT_CUDA_TRY(cudaDeviceSynchronize()); // for consistent performance measurement
137112
hr_timer.start("Louvain");
138113
}
139114

140-
if (device_prop.major < 7) {
141-
EXPECT_THROW(louvain(graph_view,
142-
edge_weight_view,
143-
graph_view.local_vertex_partition_range_size(),
144-
louvain_usecase.max_level_,
145-
louvain_usecase.threshold_,
146-
louvain_usecase.resolution_,
147-
louvain_usecase.check_correctness_,
148-
louvain_usecase.expected_level_,
149-
louvain_usecase.expected_modularity_),
150-
cugraph::logic_error);
151-
} else {
152-
louvain(graph_view,
153-
edge_weight_view,
154-
graph_view.local_vertex_partition_range_size(),
155-
louvain_usecase.max_level_,
156-
louvain_usecase.threshold_,
157-
louvain_usecase.resolution_,
158-
louvain_usecase.check_correctness_,
159-
louvain_usecase.expected_level_,
160-
louvain_usecase.expected_modularity_);
161-
}
115+
louvain(graph_view,
116+
edge_weight_view,
117+
graph_view.local_vertex_partition_range_size(),
118+
louvain_usecase.max_level_,
119+
louvain_usecase.threshold_,
120+
louvain_usecase.resolution_,
121+
louvain_usecase.check_correctness_,
122+
louvain_usecase.expected_level_,
123+
louvain_usecase.expected_modularity_);
162124

163125
if (cugraph::test::g_perf) {
164126
RAFT_CUDA_TRY(cudaDeviceSynchronize()); // for consistent performance measurement

0 commit comments

Comments
 (0)