pytorch/benchmarks/distributed
Basil Hosmer cab926b2c0 faster generate_square_subsequent_mask in nn.Transformer (#60631)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/60631

Per #48360, speed up `Transformer.generate_square_subsequent_mask`. New impl is informally ~5x faster, though absolute difference is probably small.

PR includes Python and C++ versions as well as a couple of places where the previous impl had been copied around.

Test Plan: Imported from OSS

Reviewed By: jbschlosser, albanD

Differential Revision: D29356673

Pulled By: bhosmer

fbshipit-source-id: 4c062ba0ead61a445aeef451c78777bf0b3a631e
2021-06-25 16:07:01 -07:00
..
ddp Fix benchmarks/distributed/ddp/benchmark.py (#51095) 2021-01-29 11:10:13 -08:00
pipeline faster generate_square_subsequent_mask in nn.Transformer (#60631) 2021-06-25 16:07:01 -07:00
rpc ps sparse rpc (#58003) 2021-06-24 17:21:49 -07:00