mxnet icon indicating copy to clipboard operation
mxnet copied to clipboard

model-parallel lstm on multi machine

Open Godricly opened this issue 10 years ago • 4 comments

@tqchen Is the model parallel lstm compatible with multi-machine case? I didn't find the kvstore setup in the example code, so I guess maybe not? I see layers are spread to different devices? How is the communication handled between different devices?

I'm facing the same embedding layer problem as #1237 and #1716 , so I'm looking at this model-parallel solution. Or is there any sparse matrix solution for embedding to save backward gradient memory cost? (Maybe we don't need to do this as CUDA is providing page faulting in future wtih pascal?)

Godricly avatar Apr 22 '16 08:04 Godricly

No it is for single machine so far. Usually we want to use data par between machines, as copy state is more costly than copy params. A copy operator is inserted between layers with different devices.

tqchen avatar Apr 22 '16 16:04 tqchen

Could it be possible to view this single machine as one device(or more) with full model by adding kvstore? I think it is possible to follow the update_on_kvstore function on manipulating arg_list and grad_list. The list shape will be the same, while the ctxs are disordered.

Godricly avatar Apr 25 '16 01:04 Godricly

@tqchen Is that possible to support model par within a machine, and data par across machines?

feiyulv avatar Apr 25 '16 03:04 feiyulv

@feiyulv Yes that is what I mean in my last comment

tqchen avatar Apr 26 '16 22:04 tqchen