File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -185,6 +185,9 @@ def initializer(device: str) -> None:
185
185
lop , sidx = mp .current_process ().name .split ("-" )
186
186
idx = int (sidx ) # 1-based indexing from loky
187
187
os .environ ["CUDA_VISIBLE_DEVICES" ] = str (idx - 1 )
188
+ # It's important to use RMM with `CudaAsyncMemoryResource`. for GPU-based
189
+ # external memory to improve performance. If XGBoost is not built with RMM
190
+ # support, a warning is raised when constructing the `DMatrix`.
188
191
setup_rmm ()
189
192
190
193
with get_reusable_executor (
@@ -207,10 +210,6 @@ def initializer(device: str) -> None:
207
210
if args .device == "cuda" :
208
211
import cupy as cp
209
212
210
- # It's important to use RMM with `CudaAsyncMemoryResource`. for GPU-based
211
- # external memory to improve performance. If XGBoost is not built with RMM
212
- # support, a warning is raised when constructing the `DMatrix`.
213
- setup_rmm ()
214
213
with tempfile .TemporaryDirectory () as tmpdir :
215
214
main (tmpdir , args )
216
215
else :
You can’t perform that action at this time.
0 commit comments