Removed Sparse for now, might implement later if necessary

main
Kenneth Jao 2 years ago
parent 0add15db92
commit 4b1d10f933
  1. 13
      Core.h
  2. 4
      Macros.h
  3. 2
      Makefile
  4. 2
      Makefile.template
  5. 10
      Sparse.h

@ -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

@ -124,7 +124,7 @@
#include <cuda_bf16.h>
#include <cuda_fp16.h>
#include <cuda_runtime.h>
#include <cusparse.h>
//#include <cusparse.h>
#define DEVICE_FUNC __device__
#define HD __host__ __device__
@ -257,6 +257,7 @@
} \
} while (0)
/*
#define CUSPARSE_CHECK(call) \
do { \
cusparseStatus_t err = (call); \
@ -265,6 +266,7 @@
throw std::exception(); \
} \
} while (0)
*/
#define CUDA_MEM(call, name) \
size_t free_bef_##name, free_aft_##name; \

@ -7,7 +7,7 @@ INCLUDE :=
LIBS_DIR :=
LIBS_DIR_GPU := /usr/local/cuda/lib64
LIBS :=
LIBS_GPU := cuda cudart cublas cusparse
LIBS_GPU := cuda cudart cublas
TARGET = tests
SRC_DIR = .

@ -7,7 +7,7 @@ INCLUDE := <<Put extra include directories here, separated by a space>>
LIBS_DIR := <<Put library directories here, separated by a space>>
LIBS_DIR_GPU := /usr/local/cuda/lib64 <<Put extra include GPU library directories here, separated by a space>>
LIBS := <<Put the names of the libraries here, separated by a space>>
LIBS_GPU := cuda cudart cublas cusparse <<Put extra GPU libraries here, separated by a space>>
LIBS_GPU := cuda cudart cublas <<Put extra GPU libraries here, separated by a space>>
TARGET = <<Put the name of your target here>>
SRC_DIR = .

@ -1,10 +0,0 @@
#ifndef CUDATOOLS_SPARSE_H
#define CUDATOOLS_SPARSE_H
#include "Array.h"
#include "Core.h"
#include "Macros.h"
#include "Types.h"
#endif
#endif
Loading…
Cancel
Save