Skip to content

Commit

Permalink
update allocator set method
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbarghi-nv committed Sep 25, 2023
1 parent f53bb56 commit 6633c75
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions python/cugraph-dgl/examples/graphsage/node-classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,16 @@


def set_allocators():
import rmm
import cudf
import cupy
import rmm
from rmm.allocators.torch import rmm_torch_allocator
from rmm.allocators.cupy import rmm_cupy_allocator

mr = rmm.mr.CudaAsyncMemoryResource()
rmm.mr.set_current_device_resource(mr)
torch.cuda.memory.change_current_allocator(rmm.rmm_torch_allocator)
cupy.cuda.set_allocator(rmm.allocators.cupy.rmm_cupy_allocator)
torch.cuda.memory.change_current_allocator(rmm_torch_allocator)
cupy.cuda.set_allocator(rmm_cupy_allocator)
cudf.set_option("spill", True)


Expand Down

0 comments on commit 6633c75

Please sign in to comment.