Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit 6ed38ba

Browse files
committed
use mx.context.num_gpus instead of mx.test_utils.list_gpus in MF recommender example
1 parent 13d6ee6 commit 6ed38ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

example/recommenders/demo1-MF.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
},
5656
"outputs": [],
5757
"source": [
58-
"ctx = [mx.gpu(0)] if len(mx.test_utils.list_gpus()) > 0 else [mx.cpu()]\n",
58+
"ctx = [mx.gpu(0)] if mx.context.num_gpus() > 0 else [mx.cpu()]\n",
5959
"batch_size = 128"
6060
]
6161
},

0 commit comments

Comments
 (0)