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
4546e54f
Unverified
Commit
4546e54f
authored
Apr 18, 2024
by
Muhammed Fatih BALIN
Committed by
GitHub
Apr 18, 2024
Browse files
[GraphBolt][CUDA] Don't link against `libcuda.so`. (#7313)
parent
93476196
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
16 deletions
+9
-16
graphbolt/src/cuda/common.h
graphbolt/src/cuda/common.h
+7
-14
graphbolt/src/cuda/unique_and_compact_impl.cu
graphbolt/src/cuda/unique_and_compact_impl.cu
+2
-2
No files found.
graphbolt/src/cuda/common.h
View file @
4546e54f
...
@@ -11,7 +11,6 @@
...
@@ -11,7 +11,6 @@
#include <c10/cuda/CUDACachingAllocator.h>
#include <c10/cuda/CUDACachingAllocator.h>
#include <c10/cuda/CUDAException.h>
#include <c10/cuda/CUDAException.h>
#include <c10/cuda/CUDAStream.h>
#include <c10/cuda/CUDAStream.h>
#include <cuda.h>
#include <cuda_runtime.h>
#include <cuda_runtime.h>
#include <torch/script.h>
#include <torch/script.h>
...
@@ -89,18 +88,12 @@ inline bool is_zero<dim3>(dim3 size) {
...
@@ -89,18 +88,12 @@ inline bool is_zero<dim3>(dim3 size) {
return
size
.
x
==
0
||
size
.
y
==
0
||
size
.
z
==
0
;
return
size
.
x
==
0
||
size
.
y
==
0
||
size
.
z
==
0
;
}
}
#define CUDA_
DRIVER
_CHECK(EXPR) \
#define CUDA_
RUNTIME
_CHECK(EXPR)
\
do { \
do { \
CUresult __err = EXPR; \
cudaError_t __err = EXPR; \
if (__err != CUDA_SUCCESS) { \
if (__err != cudaSuccess) { \
const char* err_str; \
auto get_error_str_err = cudaGetErrorString(__err); \
CUresult get_error_str_err C10_UNUSED = \
AT_ERROR("CUDA runtime error: ", get_error_str_err); \
cuGetErrorString(__err, &err_str); \
if (get_error_str_err != CUDA_SUCCESS) { \
AT_ERROR("CUDA driver error: unknown error"); \
} else { \
AT_ERROR("CUDA driver error: ", err_str); \
} \
} \
} \
} while (0)
} while (0)
...
...
graphbolt/src/cuda/unique_and_compact_impl.cu
View file @
4546e54f
...
@@ -274,8 +274,8 @@ UniqueAndCompactBatched(
...
@@ -274,8 +274,8 @@ UniqueAndCompactBatched(
return
it
->
second
;
return
it
->
second
;
}
else
{
}
else
{
int
major
;
int
major
;
CUDA_
DRIVER
_CHECK
(
cuDeviceGetAttribute
(
CUDA_
RUNTIME
_CHECK
(
cu
da
DeviceGetAttribute
(
&
major
,
CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR
,
dev_id
));
&
major
,
cudaDevAttrComputeCapabilityMajor
,
dev_id
));
return
compute_capability_cache
[
dev_id
]
=
major
;
return
compute_capability_cache
[
dev_id
]
=
major
;
}
}
}();
}();
...
...
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