Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fused self attention #5966

Merged
merged 29 commits into from
Aug 21, 2021
Merged

Add fused self attention #5966

merged 29 commits into from
Aug 21, 2021

Conversation

BBuf
Copy link
Contributor

@BBuf BBuf commented Aug 19, 2021

添加 fused_self_attention_query_mul_key_and_value 为functor。

@BBuf BBuf requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 20, 2021 13:44
@oneflow-ci-bot oneflow-ci-bot removed their request for review August 20, 2021 13:47
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 21, 2021 04:14
@oneflow-ci-bot oneflow-ci-bot removed their request for review August 21, 2021 06:26
@oneflow-ci-bot oneflow-ci-bot self-requested a review August 21, 2021 06:26
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 21, 2021 07:26
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 21, 2021 09:03
@oneflow-ci-bot oneflow-ci-bot self-requested a review August 21, 2021 09:58
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 21, 2021 10:53
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 21, 2021 11:34
@oneflow-ci-bot oneflow-ci-bot removed their request for review August 21, 2021 16:44
@oneflow-ci-bot oneflow-ci-bot self-requested a review August 21, 2021 16:45
@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

PyTorch resnet50 time: 138.2ms (= 6908.8ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 128.3ms (= 6413.1ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
Relative speed: 1.08 (= 138.2ms / 128.3ms)

PyTorch resnet50 time: 83.5ms (= 4177.1ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 74.5ms (= 3722.8ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
Relative speed: 1.12 (= 83.5ms / 74.5ms)

PyTorch resnet50 time: 55.0ms (= 2748.5ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 47.5ms (= 2375.4ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
Relative speed: 1.16 (= 55.0ms / 47.5ms)

PyTorch resnet50 time: 49.9ms (= 2497.5ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 41.1ms (= 2055.7ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
Relative speed: 1.21 (= 49.9ms / 41.1ms)

PyTorch resnet50 time: 42.9ms (= 2145.4ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 36.4ms (= 1821.7ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
Relative speed: 1.18 (= 42.9ms / 36.4ms)

@oneflow-ci-bot oneflow-ci-bot merged commit fbff4bf into master Aug 21, 2021
@oneflow-ci-bot oneflow-ci-bot deleted the add_fused_self_attention branch August 21, 2021 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants