Skip to content

Commit e9b2f8e

Browse files
panchulAleksandr Panchul (CSI Interfusion Inc)
andauthored
correcting the pipeline rpc example (#773)
Co-authored-by: Aleksandr Panchul (CSI Interfusion Inc) <[email protected]>
1 parent 8dcb9c7 commit e9b2f8e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ snli/results
1212
word_language_model/model.pt
1313
fast_neural_style/saved_models
1414
fast_neural_style/saved_models.zip
15+
16+
# vi backups
17+
*~

distributed/rpc/pipeline/main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ def parameter_rrefs(self):
226226
image_h = 128
227227

228228

229-
def run_master(num_split):
229+
def run_master(split_size):
230+
230231
# put the two model parts on worker1 and worker2 respectively
231232
model = DistResNet50(split_size, ["worker1", "worker2"])
232233
loss_fn = nn.MSELoss()
@@ -285,4 +286,4 @@ def run_worker(rank, world_size, num_split):
285286
tik = time.time()
286287
mp.spawn(run_worker, args=(world_size, num_split), nprocs=world_size, join=True)
287288
tok = time.time()
288-
print(f"number of splits = {num_split}, execution time = {tok - tik}")
289+
print(f"number of splits = {num_split}, execution time = {tok - tik}")

0 commit comments

Comments
 (0)