Skip to content

Commit 82bb91a

Browse files
committed
Use Numba to allocate the array directly
Since Numba has added support for external memory managers (EMM) and cuDF configures Numba to use RMM on import, we can just use Numba directly here. This should eliminate the last usage of `device_array` in cuGraph :)
1 parent 9ac9ec4 commit 82bb91a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## New Features
44

55
## Improvements
6+
- PR #913 Eliminate `rmm.device_array` usage
67
- PR #903 Add short commit hash to conda package
78

89
## Bug Fixes

python/cugraph/layout/force_atlas2_wrapper.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ from libc.stdint cimport uintptr_t
2626

2727
import cudf
2828
import cudf._lib as libcudf
29-
import rmm
29+
from numba import cuda
3030
import numpy as np
3131
import numpy.ctypeslib as ctypeslib
3232

@@ -103,7 +103,7 @@ def force_atlas2(input_graph,
103103
if input_graph.edgelist.weights \
104104
and input_graph.edgelist.edgelist_df['weights'].dtype == np.float64:
105105

106-
pos = rmm.device_array(
106+
pos = cuda.device_array(
107107
(num_verts, 2),
108108
order="F",
109109
dtype=np.float64)
@@ -135,7 +135,7 @@ def force_atlas2(input_graph,
135135
df['x'] = pos_df['x']
136136
df['y'] = pos_df['y']
137137
else:
138-
pos = rmm.device_array(
138+
pos = cuda.device_array(
139139
(num_verts, 2),
140140
order="F",
141141
dtype=np.float32)

0 commit comments

Comments
 (0)