首页 > 解决方案 > 无法将多个 GPU 与 Ray 一起使用

问题描述

我正在使用 带有 2 个 GPU的异步 Hyperband 调度程序https://ray.readthedocs.io/en/latest/tune-schedulers.html?highlight=hyperband 。我的机器配置有 2 个 GPU 和 12 个 GPU。但是,一次只能进行一次试验,而一次可以同时进行 2 次试验。

我指定

ray.init(num_gpus=torch.cuda.device_count())
"resources_per_trial": {
                "cpu": 4,
                "gpu": int(args.cuda)}

标签: ray

解决方案


推荐阅读