Skip to content

Commit

Permalink
Pass use_triton flag to module (#336)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Naren committed Jun 21, 2022
1 parent 10d85bf commit 22c1bab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xformers/factory/block_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ def __init__(self, config: xFormerEncoderConfig, **kwargs):
config.layer_norm_style == LayerNormStyle.Pre
and config.layer_position.is_last()
):
self.wrap_ff = PostNorm(config.dim_model, self.wrap_ff)
self.wrap_ff = PostNorm(
config.dim_model, self.wrap_ff, use_triton=config.use_triton
)

# Simplicial embeddings are only used if specified, and on the last layer
self.simplicial_embedding: Optional[SimplicialEmbedding] = None
Expand Down

0 comments on commit 22c1bab

Please sign in to comment.