Skip to content

Commit 9c4cea8

Browse files
committed
Merge branch 'develop'
2 parents 955d249 + cb853da commit 9c4cea8

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

minhashcuda.cc

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -53,23 +53,26 @@ static std::vector<int> setup_devices(uint32_t devices, int verbosity) {
5353
if (devices & 1) {
5454
devs.push_back(dev);
5555
if (cudaSetDevice(dev) != cudaSuccess) {
56-
INFO("failed to validate device %d", dev);
57-
devs.pop_back();
58-
}
59-
cudaDeviceProp props;
60-
auto err = cudaGetDeviceProperties(&props, dev);
61-
if (err != cudaSuccess) {
62-
INFO("failed to cudaGetDeviceProperties(%d): %s\n",
63-
dev, cudaGetErrorString(err));
64-
devs.pop_back();
65-
}
66-
if (props.major != (CUDA_ARCH / 10) || props.minor != (CUDA_ARCH % 10)) {
67-
INFO("compute capability mismatch for device %d: wanted %d.%d, have "
68-
"%d.%d\n>>>> you may want to build kmcuda with -DCUDA_ARCH=%d "
69-
"(refer to \"Building\" in README.md)\n",
70-
dev, CUDA_ARCH / 10, CUDA_ARCH % 10, props.major, props.minor,
71-
props.major * 10 + props.minor);
56+
INFO("failed to validate device %d\n", dev);
7257
devs.pop_back();
58+
} else {
59+
cudaDeviceProp props;
60+
auto err = cudaGetDeviceProperties(&props, dev);
61+
if (err != cudaSuccess) {
62+
INFO("failed to cudaGetDeviceProperties(%d): %s\n",
63+
dev, cudaGetErrorString(err));
64+
devs.pop_back();
65+
} else {
66+
if (props.major != (CUDA_ARCH / 10)
67+
|| props.minor != (CUDA_ARCH % 10)) {
68+
INFO("compute capability mismatch for device %d: wanted %d.%d, have "
69+
"%d.%d\n>>>> you may want to build kmcuda with -DCUDA_ARCH=%d "
70+
"(refer to \"Building\" in README.md)\n",
71+
dev, CUDA_ARCH / 10, CUDA_ARCH % 10, props.major, props.minor,
72+
props.major * 10 + props.minor);
73+
devs.pop_back();
74+
}
75+
}
7376
}
7477
}
7578
devices >>= 1;

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def is_pure(self):
4646
setup(
4747
name="libMHCUDA",
4848
description="Accelerated Weighted MinHash-ing on GPU",
49-
version="1.1.3",
49+
version="1.1.4",
5050
license="MIT",
5151
author="Vadim Markovtsev",
5252
author_email="[email protected]",

0 commit comments

Comments
 (0)