From f38790bfba761ffabc506780bc2d025da48d9388 Mon Sep 17 00:00:00 2001 From: Muhammed Fatih BALIN Date: Mon, 26 Aug 2024 20:28:48 -0400 Subject: [PATCH] [GraphBolt][CUDA] Fix error when empty env variable is used. (#7748) --- python/dgl/graphbolt/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/dgl/graphbolt/__init__.py b/python/dgl/graphbolt/__init__.py index 398e1367ac..006b91d385 100644 --- a/python/dgl/graphbolt/__init__.py +++ b/python/dgl/graphbolt/__init__.py @@ -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(",")