From 93bbcb7198ab15c77039e57c50a4f6021271816a Mon Sep 17 00:00:00 2001 From: Shehzan Mohammed Date: Wed, 14 Dec 2016 16:25:53 -0500 Subject: [PATCH] Remove support for sparse conversions for CUDA 6.5 and older --- src/backend/cuda/sparse.cu | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/backend/cuda/sparse.cu b/src/backend/cuda/sparse.cu index 96e430285c..1d13f94ed0 100644 --- a/src/backend/cuda/sparse.cu +++ b/src/backend/cuda/sparse.cu @@ -363,6 +363,8 @@ Array sparseConvertStorageToDense(const SparseArray &in) return dense; } +// Some of the API used here is available only in CUDA 7 or newer +#if CUDA_VERSION >= 7000 template SparseArray sparseConvertStorageToStorage(const SparseArray &in) { @@ -475,6 +477,14 @@ SparseArray sparseConvertStorageToStorage(const SparseArray &in) return converted; } +#else // CUDA 6.5 and older (older than 7) +template +SparseArray sparseConvertStorageToStorage(const SparseArray &in) +{ + AF_ERROR("Sparse storage format conversions are not supported for CUDA 6.5 or older", + AF_ERR_NOT_SUPPORTED); +} +#endif // CUDA_VERSION >= 7000 #define INSTANTIATE_TO_STORAGE(T, S) \ template SparseArray sparseConvertStorageToStorage(const SparseArray &in); \