Commit Graph

5 Commits

Author SHA1 Message Date
Alisson Gusatti Azzolini
07e14c7cd0 DistributedOptimizer: wait for all workers to finish _LocalOptimizer constructor (#30062)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/30062

This allows to catch exceptions during optimizer creation.
ghstack-source-id: 94232436

Test Plan: new unit test.

Differential Revision: D18586108

fbshipit-source-id: 71cfdf337fe803dbea8787b4c68e5a52b70a1f68
2019-11-19 18:30:00 -08:00
Shihao Xu
868cb05a30 Resubmit "Add RpcAgentTestFixture to extract duplicate code" (#30092)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/30092

There are duplicate code for component that rely on RpcAgent. Extract them into a re-usable test fixture class.
ghstack-source-id: 94196891

Test Plan:
### RPC + RRef

```
buck test mode/dev-nosan //caffe2/test:rpc_fork

buck test mode/dev-nosan //caffe2/test:rpc_spawn
```

```
buck test mode/dev-nosan //caffe2/test:rpc_fork_thrift

buck test mode/dev-nosan //caffe2/test:rpc_spawn_thrift
```

### Dist Autograd

```
buck test mode/dev-nosan //caffe2/test:dist_autograd_fork

buck test mode/dev-nosan //caffe2/test:dist_autograd_spawn
```

```
buck test mode/dev-nosan //caffe2/test:dist_autograd_fork_thrift

buck test mode/dev-nosan //caffe2/test:dist_autograd_spawn_thrift
```

### Dist Optimizer

```
buck test mode/dev-nosan //caffe2/test:dist_optimizer_fork

buck test mode/dev-nosan //caffe2/test:dist_optimizer_spawn
```

```
buck test mode/dev-nosan //caffe2/test:dist_optimizer_fork_thrift

buck test mode/dev-nosan //caffe2/test:dist_optimizer_spawn_thrift
```

Differential Revision: D18595408

fbshipit-source-id: 8360759c63e838fb19d4eb1aeacca0bf8eb4b55f
2019-11-19 16:24:51 -08:00
Edward Yang
7d287688eb Revert D5689636: Add RpcAgentTestFixture to extract duplicate code
Test Plan: revert-hammer

Differential Revision:
D5689636

Original commit changeset: f35eea1359ad

fbshipit-source-id: 31928fce5e96b3beceefbc9a03f54769f10b7e1a
2019-11-19 08:14:44 -08:00
Shihao Xu
8dd67057f1 Add RpcAgentTestFixture to extract duplicate code (#29747)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/29747

There are duplicate code for component that rely on RpcAgent. Extract them into a re-usable test fixture class.

Test Plan:
### RPC + RRef

```
buck test mode/dev-nosan //caffe2/test:rpc_fork

buck test mode/dev-nosan //caffe2/test:rpc_spawn
```

```
buck test mode/dev-nosan //caffe2/test:rpc_fork_thrift

buck test mode/dev-nosan //caffe2/test:rpc_spawn_thrift
```

### Dist Autograd

```
buck test mode/dev-nosan //caffe2/test:dist_autograd_fork

buck test mode/dev-nosan //caffe2/test:dist_autograd_spawn
```

```
buck test mode/dev-nosan //caffe2/test:dist_autograd_fork_thrift

buck test mode/dev-nosan //caffe2/test:dist_autograd_spawn_thrift
```

### Dist Optimizer

```
buck test mode/dev-nosan //caffe2/test:dist_optimizer_fork

buck test mode/dev-nosan //caffe2/test:dist_optimizer_spawn
```

```
buck test mode/dev-nosan //caffe2/test:dist_optimizer_fork_thrift

buck test mode/dev-nosan //caffe2/test:dist_optimizer_spawn_thrift
```

Differential Revision: D5689636

fbshipit-source-id: f35eea1359addaaac9bd8d00d0a5df228a236511
2019-11-18 12:54:17 -08:00
Alisson Gusatti Azzolini
b0cf43b2dd Simple distributed optimizer (#29304)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/29304

Implements a simple python distributed optimizer that takes rrefs to parameters that will be optimized.
It keeps instances of optimizers remotely and calling step on distributed optimizer will call step on each of the remote optimizers in parallel.
ghstack-source-id: 93564364

Test Plan: unit tests.

Differential Revision: D18354586

fbshipit-source-id: 85d4c8bfec4aa38d2863cda704d024692511cff5
2019-11-11 12:02:24 -08:00