Skip to content

Commit

Permalink
Merge: disable cuda generic api in windows
Browse files Browse the repository at this point in the history
This PR disables the cuda generic api in windows because Cuda 10.2 doesn't support cuda generic api in windows.

Related PR: #473
  • Loading branch information
yhmtsai committed Mar 5, 2020
2 parents 000a364 + 6cb066c commit 3523945
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 18 deletions.
2 changes: 1 addition & 1 deletion benchmark/conversions/conversions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,5 +195,5 @@ int main(int argc, char *argv[])
}
}

std::cout << test_cases;
std::cout << test_cases << std::endl;
}
2 changes: 1 addition & 1 deletion benchmark/matrix_generator/matrix_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,5 +151,5 @@ int main(int argc, char *argv[])
}
}

std::cout << configurations;
std::cout << configurations << std::endl;
}
2 changes: 1 addition & 1 deletion benchmark/matrix_statistics/matrix_statistics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,5 +208,5 @@ int main(int argc, char *argv[])
}
}

std::cout << test_cases;
std::cout << test_cases << std::endl;
}
2 changes: 1 addition & 1 deletion benchmark/preconditioner/preconditioner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,5 +310,5 @@ int main(int argc, char *argv[])
}
}

std::cout << test_cases;
std::cout << test_cases << std::endl;
}
2 changes: 1 addition & 1 deletion benchmark/solver/solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,5 +467,5 @@ int main(int argc, char *argv[])
}
}

std::cout << test_cases;
std::cout << test_cases << std::endl;
}
2 changes: 1 addition & 1 deletion benchmark/spmv/spmv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,5 +223,5 @@ int main(int argc, char *argv[])
}
}

std::cout << test_cases;
std::cout << test_cases << std::endl;
}
12 changes: 8 additions & 4 deletions benchmark/utils/cuda_linops.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,8 @@ class CuspHybrid
};


#if defined(CUDA_VERSION) && (CUDA_VERSION >= 10010)
#if defined(CUDA_VERSION) && (CUDA_VERSION >= 10010) && \
!(defined(_WIN32) || defined(__CYGWIN__))


template <typename ValueType>
Expand Down Expand Up @@ -677,7 +678,8 @@ class CuspGenericCoo
};


#endif // defined(CUDA_VERSION) && (CUDA_VERSION >= 10010)
#endif // defined(CUDA_VERSION) && (CUDA_VERSION >= 10010) &&
// !(defined(_WIN32) || defined(__CYGWIN__))


} // namespace detail
Expand All @@ -690,7 +692,8 @@ using cusp_csrmp = detail::CuspCsrmp<>;
using cusp_csrmm = detail::CuspCsrmm<>;


#if defined(CUDA_VERSION) && (CUDA_VERSION >= 10010)
#if defined(CUDA_VERSION) && (CUDA_VERSION >= 10010) && \
!(defined(_WIN32) || defined(__CYGWIN__))


using cusp_gcsr = detail::CuspGenericCsr<>;
Expand All @@ -699,7 +702,8 @@ using cusp_gcsr2 =
using cusp_gcoo = detail::CuspGenericCoo<>;


#endif // defined(CUDA_VERSION) && (CUDA_VERSION >= 10010)
#endif // defined(CUDA_VERSION) && (CUDA_VERSION >= 10010) &&
// !(defined(_WIN32) || defined(__CYGWIN__))


using cusp_coo =
Expand Down
12 changes: 8 additions & 4 deletions benchmark/utils/formats.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,17 @@ std::string format_description =
"cusp_csrex: benchmark CuSPARSE with the cusparseXcsrmvEx function.\n"
"cusp_csrmp: benchmark CuSPARSE with the cusparseXcsrmv_mp function.\n"
"cusp_csrmm: benchmark CuSPARSE with the cusparseXcsrmv_mm function."
#if defined(CUDA_VERSION) && (CUDA_VERSION >= 10010)
#if defined(CUDA_VERSION) && (CUDA_VERSION >= 10010) && \
!(defined(_WIN32) || defined(__CYGWIN__))
"\n"
"cusp_gcsr: benchmark CuSPARSE with the generic csr with default "
"algorithm.\n"
"cusp_gcsr2: benchmark CuSPARSE with the generic csr with "
"CUSPARSE_CSRMV_ALG2.\n"
"cusp_gcoo: benchmark CuSPARSE with the generic coo with default "
"algorithm.\n"
#endif // defined(CUDA_VERSION) && (CUDA_VERSION >= 10010)
#endif // defined(CUDA_VERSION) && (CUDA_VERSION >= 10010) &&
// !(defined(_WIN32) || defined(__CYGWIN__))
#endif // HAS_CUDA
#ifdef HAS_HIP
"\n"
Expand Down Expand Up @@ -192,11 +194,13 @@ const std::map<std::string, std::function<std::unique_ptr<gko::LinOp>(
{"cusp_hybrid", read_matrix_from_data<cusp_hybrid>},
{"cusp_coo", read_matrix_from_data<cusp_coo>},
{"cusp_ell", read_matrix_from_data<cusp_ell>},
#if defined(CUDA_VERSION) && (CUDA_VERSION >= 10010)
#if defined(CUDA_VERSION) && (CUDA_VERSION >= 10010) && \
!(defined(_WIN32) || defined(__CYGWIN__))
{"cusp_gcsr", read_matrix_from_data<cusp_gcsr>},
{"cusp_gcsr2", read_matrix_from_data<cusp_gcsr2>},
{"cusp_gcoo", read_matrix_from_data<cusp_gcoo>},
#endif // defined(CUDA_VERSION) && (CUDA_VERSION >= 10010)
#endif // defined(CUDA_VERSION) && (CUDA_VERSION >= 10010) &&
// !(defined(_WIN32) || defined(__CYGWIN__))
#endif // HAS_CUDA
#ifdef HAS_HIP
{"hipsp_csr", read_matrix_from_data<hipsp_csr>},
Expand Down
12 changes: 8 additions & 4 deletions cuda/base/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ constexpr cudaDataType_t cuda_data_type_impl<uint8>()
}


#if defined(CUDA_VERSION) && (CUDA_VERSION >= 10010)
#if defined(CUDA_VERSION) && (CUDA_VERSION >= 10010) && \
!(defined(_WIN32) || defined(__CYGWIN__))


template <typename T>
Expand All @@ -213,7 +214,8 @@ constexpr cusparseIndexType_t cusparse_index_type_impl<int64>()
}


#endif // defined(CUDA_VERSION) && (CUDA_VERSION >= 10010)
#endif // defined(CUDA_VERSION) && (CUDA_VERSION >= 10010) &&
// !(defined(_WIN32) || defined(__CYGWIN__))


} // namespace detail
Expand All @@ -234,7 +236,8 @@ constexpr cudaDataType_t cuda_data_type()
}


#if defined(CUDA_VERSION) && (CUDA_VERSION >= 10010)
#if defined(CUDA_VERSION) && (CUDA_VERSION >= 10010) && \
!(defined(_WIN32) || defined(__CYGWIN__))


/**
Expand All @@ -252,7 +255,8 @@ constexpr cusparseIndexType_t cusparse_index_type()
}


#endif // defined(CUDA_VERSION) && (CUDA_VERSION >= 10010)
#endif // defined(CUDA_VERSION) && (CUDA_VERSION >= 10010) &&
// !(defined(_WIN32) || defined(__CYGWIN__))


/**
Expand Down

0 comments on commit 3523945

Please sign in to comment.