"src/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "0af12f1f8a1682833c944354daeba0c9d9c0f342"
Unverified Commit bea5c78b authored by Xin Yao's avatar Xin Yao Committed by GitHub
Browse files

[Fix] Remove curand host functions (#5552)

parent b57c56d9
......@@ -315,8 +315,7 @@ macro(dgl_config_cuda out_variable)
list(APPEND DGL_LINKER_LIBS
${CUDA_CUDART_LIBRARY}
${CUDA_CUBLAS_LIBRARIES}
${CUDA_cusparse_LIBRARY}
${CUDA_CURAND_LIBRARY})
${CUDA_cusparse_LIBRARY})
set(${out_variable} ${DGL_CUDA_SRC})
endmacro()
......@@ -11,10 +11,6 @@
#include <dgl/runtime/registry.h>
#include <dmlc/omp.h>
#ifdef DGL_USE_CUDA
#include "../runtime/cuda/cuda_common.h"
#endif // DGL_USE_CUDA
using namespace dgl::runtime;
namespace dgl {
......@@ -28,17 +24,6 @@ DGL_REGISTER_GLOBAL("rng._CAPI_SetSeed")
RandomEngine::ThreadLocal()->SetSeed(seed);
}
});
#ifdef DGL_USE_CUDA
if (DeviceAPI::Get(kDGLCUDA)->IsAvailable()) {
auto *thr_entry = CUDAThreadEntry::ThreadLocal();
if (!thr_entry->curand_gen) {
CURAND_CALL(curandCreateGenerator(
&thr_entry->curand_gen, CURAND_RNG_PSEUDO_DEFAULT));
}
CURAND_CALL(curandSetPseudoRandomGeneratorSeed(
thr_entry->curand_gen, static_cast<uint64_t>(seed)));
}
#endif // DGL_USE_CUDA
});
DGL_REGISTER_GLOBAL("rng._CAPI_Choice")
......
......@@ -244,8 +244,6 @@ class CUDAThreadEntry {
cusparseHandle_t cusparse_handle{nullptr};
/** @brief The cublas handler */
cublasHandle_t cublas_handle{nullptr};
/** @brief The curand generator */
curandGenerator_t curand_gen{nullptr};
/** @brief thread local pool*/
WorkspacePool pool;
/** @brief constructor */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment