Skip to content

Commit

Permalink
[ci] change test gpu usage to 2
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterSH6 committed Nov 30, 2024
1 parent b1b326a commit 9a45f04
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/ray/test_data_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def do_nothing(self, data):
def test_data_transfer():
ray.init()
# construct resource pool
resource_pool = RayResourcePool([8])
resource_pool = RayResourcePool([2])
cls_with_init = RayClassWithInitArgs(cls=DummyWorker)
# construct worker group
wg = RayWorkerGroup(resource_pool, cls_with_init)
Expand Down
2 changes: 1 addition & 1 deletion tests/ray/test_driverfunc_to_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def test():
# construct model
ray.init()

# create 8 workers, each hold a GPU
# create 2 workers, each hold a GPU
resource_pool = RayResourcePool([2], use_gpu=True, name_prefix='a')

class_with_args = RayClassWithInitArgs(cls=ModelActor)
Expand Down
4 changes: 2 additions & 2 deletions tests/ray/test_rvdz.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ def test_rvdz():
ray.init()

group_name = "test_group"
world_size = 4
world_size = 2

workers = [TestWorker.options(num_gpus=1).remote(rank, world_size, group_name) for rank in range(world_size)]

[worker.init.remote() for worker in workers]

ranks = ray.get([worker.test.remote() for worker in workers])

assert ranks == [0, 1, 2, 3], f"expecting [0, 1, 2, 3], got {ranks}"
assert ranks == [0, 1], f"expecting [0, 1], got {ranks}"

ray.shutdown()

0 comments on commit 9a45f04

Please sign in to comment.