Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
bea5c78b
"src/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "0af12f1f8a1682833c944354daeba0c9d9c0f342"
Unverified
Commit
bea5c78b
authored
Apr 17, 2023
by
Xin Yao
Committed by
GitHub
Apr 17, 2023
Browse files
[Fix] Remove curand host functions (#5552)
parent
b57c56d9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
19 deletions
+1
-19
cmake/modules/CUDA.cmake
cmake/modules/CUDA.cmake
+1
-2
src/random/random.cc
src/random/random.cc
+0
-15
src/runtime/cuda/cuda_common.h
src/runtime/cuda/cuda_common.h
+0
-2
No files found.
cmake/modules/CUDA.cmake
View file @
bea5c78b
...
...
@@ -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
()
src/random/random.cc
View file @
bea5c78b
...
...
@@ -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"
)
...
...
src/runtime/cuda/cuda_common.h
View file @
bea5c78b
...
...
@@ -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 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment