Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion byte_micro_perf/core/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def perf(self, op_instance, profiling=True):
tensor_size = op_instance.tensor_size

# device
device_mem_info = self.get_mem_info()
device_mem_info = self.get_mem_info(self.true_device_index)
avail_memory = device_mem_info[0]

# assume
Expand Down
2 changes: 2 additions & 0 deletions byte_micro_perf/core/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ def subprocess_func(self, instance_rank : int, *args):
true_device_index = backend.target_devices[true_rank]
print(f"true_world_size: {true_world_size}, true_rank: {true_rank}, true_device_index: {true_device_index}")
backend.set_device(true_device_index)
backend.true_device_index = true_device_index

# device process is ready
output_queues.put("ready")
Expand Down Expand Up @@ -291,6 +292,7 @@ def subprocess_func(self, instance_rank : int, *args):
true_device_index = backend.all_node_devices[true_rank]
print(f"true_world_size: {true_world_size}, true_rank: {true_rank}, true_device_index: {true_device_index}")
backend.set_device(true_device_index)
backend.true_device_index = true_device_index

# init dist env
dist_module = backend.get_dist_module()
Expand Down