remove curand_generator_ related code since it is not used. (#5220)

This commit is contained in:
Weixing Zhang 2020-09-18 11:50:35 -07:00 committed by GitHub
parent ce3b67e0cd
commit f91248e0cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 19 deletions

View file

@ -170,10 +170,6 @@ class CudaKernel : public OpKernel {
}
protected:
inline curandGenerator_t CurandGenerator() const {
return provider_->PerThreadCurandGenerator();
}
template <typename T>
inline const T* GetConstOnes(size_t count) const {
return provider_->template GetConstOnes<T>(count);

View file

@ -60,7 +60,6 @@ CUDAExecutionProvider::PerThreadContext::PerThreadContext(OrtDevice::DeviceId de
CUDA_CALL_THROW(cudaSetDevice(device_id));
CUBLAS_CALL_THROW(cublasCreate(&cublas_handle_));
CUDNN_CALL_THROW(cudnnCreate(&cudnn_handle_));
CURAND_CALL_THROW(curandCreateGenerator(&curand_generator_, CURAND_RNG_PSEUDO_DEFAULT));
AllocatorCreationInfo default_memory_info(
[](OrtDevice::DeviceId id) {
@ -91,12 +90,6 @@ CUDAExecutionProvider::PerThreadContext::~PerThreadContext() {
} catch (const std::exception& ex) {
LOGS_DEFAULT(ERROR) << "cudnnDestroy threw:" << ex.what();
}
try {
CURAND_CALL_THROW(curandDestroyGenerator(curand_generator_));
} catch (const std::exception& ex) {
LOGS_DEFAULT(ERROR) << "curandDestroyGenerator threw:" << ex.what();
}
}
/*

View file

@ -52,9 +52,6 @@ class CUDAExecutionProvider : public IExecutionProvider {
cudnnHandle_t PerThreadCudnnHandle() {
return GetPerThreadContext().CudnnHandle();
}
curandGenerator_t PerThreadCurandGenerator() {
return GetPerThreadContext().CurandGenerator();
}
template <typename T>
const T* GetConstOnes(size_t count) {
@ -109,10 +106,6 @@ class CUDAExecutionProvider : public IExecutionProvider {
return cudnn_handle_;
}
curandGenerator_t CurandGenerator() const {
return curand_generator_;
}
cudaEvent_t& GetCurrentDeferredReleaseEvent() {
return current_deferred_release_event_;
}
@ -146,7 +139,6 @@ class CUDAExecutionProvider : public IExecutionProvider {
private:
cublasHandle_t cublas_handle_ = nullptr;
cudnnHandle_t cudnn_handle_ = nullptr;
curandGenerator_t curand_generator_ = nullptr;
// deferred release for temporary CPU pinned memory used in cudaMemcpyAsync
// note that cudaEvent will be assigned at OnRunEnd() when PerThreadContext destory