From 06167d81f53bbb69a2e0315bb2577ebf2795f6d7 Mon Sep 17 00:00:00 2001 From: Muhammed Fatih BALIN Date: Wed, 24 Jul 2024 07:22:27 +0000 Subject: [PATCH] [GraphBolt][CUDA] GPUGraphCache is being unnecessarily created. --- python/dgl/graphbolt/dataloader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/dgl/graphbolt/dataloader.py b/python/dgl/graphbolt/dataloader.py index 4615cc47d86c..71e27693f1db 100644 --- a/python/dgl/graphbolt/dataloader.py +++ b/python/dgl/graphbolt/dataloader.py @@ -209,7 +209,7 @@ def __init__( executor = ThreadPoolExecutor(max_workers=1) gpu_graph_cache = None for sampler in samplers: - if gpu_graph_cache is None: + if num_gpu_cached_edges > 0 and gpu_graph_cache is None: gpu_graph_cache = construct_gpu_graph_cache( sampler, num_gpu_cached_edges, gpu_cache_threshold )