code: def test_allreduce_multigpu_different_dtype(
      ray_start_distributed_multigpu_2_nodes_4_gpus, dtype
  ):
      world_size = 2
      num_gpu_per_worker = 2
      actual_world_size = world_size * num_gpu_per_worker
      actors, _ = create_collective_multigpu_workers(world_size)
      ray.get([a.set_buffer.remote([10], dtype=dtype) for a in actors])
      results = ray.get(
          [a.do_allreduce_multigpu.remote() for a in actors]
      )
      assert (
          results[0] == cp.ones((10,), dtype=dtype) * actual_world_size
      ).all()
      assert (
          results[1] == cp.ones((10,), dtype=dtype) * actual_world_size
      ).all()
  
file_path: ray/python/ray/util/collective/tests/distributed_multigpu_tests/test_distributed_multigpu_allreduce.py
imports: import pytest
  import logging
  import cupy
  import ray
  from ray.util.collective.types import ReduceOp
  from ray.util.collective.tests.util import create_collective_multigpu_workers
label_desc: Use image node_id 6 for calling a global function with example usage: test_allreduce_multigpu_different_dtype(ray_start_distributed_multigpu_2_nodes_4_gpus, dtype) without return types