|
|
|
@ -81,7 +81,7 @@ class Manager { |
|
|
|
|
#ifdef CUDACC |
|
|
|
|
std::unordered_map<std::string, cudaStream_t> mStreams; |
|
|
|
|
cublasHandle_t mCublas; |
|
|
|
|
cusparseHandle_t mCusparse; |
|
|
|
|
// cusparseHandle_t mCusparse;
|
|
|
|
|
#endif |
|
|
|
|
public: |
|
|
|
|
/**
|
|
|
|
@ -95,7 +95,7 @@ class Manager { |
|
|
|
|
#ifdef CUDACC |
|
|
|
|
cudaStream_t stream(const StreamID& stream) const; |
|
|
|
|
cublasHandle_t cublasHandle() const; |
|
|
|
|
cusparseHandle_t cusparseHandle() const; |
|
|
|
|
// cusparseHandle_t cusparseHandle() const;
|
|
|
|
|
#endif |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
@ -393,7 +393,7 @@ Manager::Manager(const std::vector<std::string>& names) { |
|
|
|
|
addStream(name); |
|
|
|
|
} |
|
|
|
|
CUBLAS_CHECK(cublasCreate(&mCublas)); |
|
|
|
|
CUSPARSE_CHECK(cusparseCreate(&mCusparse)); |
|
|
|
|
// CUSPARSE_CHECK(cusparseCreate(&mCusparse));
|
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -403,7 +403,7 @@ Manager::~Manager() { |
|
|
|
|
CUDA_CHECK(cudaStreamDestroy(it.second)); |
|
|
|
|
} |
|
|
|
|
CUBLAS_CHECK(cublasDestroy(mCublas)); |
|
|
|
|
CUSPARSE_CHECK(cusparseDestroy(mCusparse)); |
|
|
|
|
// CUSPARSE_CHECK(cusparseDestroy(mCusparse));
|
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -443,10 +443,9 @@ cudaStream_t Manager::stream(const StreamID& stream) const { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
cublasHandle_t Manager::cublasHandle() const { return mCublas; }; |
|
|
|
|
cusparseHandle_t Manager::cusparseHandle() const { return mCusparse; }; |
|
|
|
|
// cusparseHandle_t Manager::cusparseHandle() const { return mCusparse; };
|
|
|
|
|
|
|
|
|
|
Manager Manager::mManagerInstance = |
|
|
|
|
Manager({"defaultMemory", "defaultCublas", "defaultCusparse", "defaultKernel"}); |
|
|
|
|
Manager Manager::mManagerInstance = Manager({"defaultMemory", "defaultCublas", "defaultKernel"}); |
|
|
|
|
#else |
|
|
|
|
Manager Manager::mManagerInstance = Manager({""}); |
|
|
|
|
#endif |
|
|
|
|