- 27 10月, 2021 1 次提交
-
-
由 Li Min 提交于
功能:本PR的目标是提高attention模块的计算性能。 为了减少框架层对op的调度开销,本PR通过在C++层手动实现attention模块,对外提供attention 大op; 为了减少防存开销,本PR采取了两种优化方法: (1)在q,k,v计算时通过共享输入X,将该处的gemm,transpose和bias add从三次调用减少为一次; (2)使用kernel融合优化技术,在不同cuda kernel之间通过寄存器传输数据;
-
- 06 9月, 2021 1 次提交
-
-
由 Feng Xing 提交于
This PR adds error exception in fused transformer python interface. The function body are not implemented (will be implemented later). Following zhiqiu's comment in previous PR-35206 (merged already), it is better to raise an exception instead of using "pass".
-
- 31 8月, 2021 1 次提交
-
-
由 Feng Xing 提交于
This PR adds fused transformer python related files. It defines interface of fused transformer. Fused transformer implements an optimized version of transformer layer (in python/paddle/nn/layer/transformer.py). In this PR, four layers (functions) are defined: (1) FusedMultiHeadAttention: multi-head attention layer (2) FusedFeedForward: feed forward layer (3) FusedTransformerEncoderLayer: transformer encoder layer (4) FusedTransformer: transformer layer
-