mirror of
https://github.com/dmlc/dgl.git
synced 2026-06-03 19:34:33 +08:00
[GraphBolt][CUDA] Fix error when empty env variable is used. (#7748)
This commit is contained in:
committed by
GitHub
parent
6bce0cdfc5
commit
f38790bfba
@@ -15,7 +15,7 @@ cuda_allocator_env = os.getenv("PYTORCH_CUDA_ALLOC_CONF")
|
||||
WARNING_STR_TO_BE_SHOWN = None
|
||||
configs = (
|
||||
{}
|
||||
if cuda_allocator_env is None
|
||||
if cuda_allocator_env is None or len(cuda_allocator_env) == 0
|
||||
else {
|
||||
kv_pair.split(":")[0]: kv_pair.split(":")[1]
|
||||
for kv_pair in cuda_allocator_env.split(",")
|
||||
|
||||
Reference in New Issue
Block a user