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

support tosa make broadcastable pass #8923

Merged
merged 16 commits into from
Aug 17, 2022

Conversation

howin98
Copy link
Contributor

@howin98 howin98 commented Aug 16, 2022

使用 TosaMakeBroadcastablePass 减少不必要的 reshape 创建

@howin98 howin98 changed the title init tosa make broadcastable pass support tosa make broadcastable pass Aug 16, 2022
@jackalcooper jackalcooper marked this pull request as ready for review August 17, 2022 00:06
@github-actions
Copy link
Contributor

Code got formatted by CI. Please request CI again if you still want to have this PR merged. If the PR is from a forked repo, please download the patch files from the GitHub Actions web page and apply them locally.

@jackalcooper jackalcooper enabled auto-merge (squash) August 17, 2022 06:28
@jackalcooper jackalcooper requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 17, 2022 06:30
…flow-Inc/oneflow into support-tosa-make-broadcastable-pass
@github-actions
Copy link
Contributor

View latest API docs preview at: https://staging.oneflow.info/docs/Oneflow-Inc/oneflow/pr/8923/

@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

✔️ OneFlow resnet50 time: 128.4ms (= 12842.4ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 142.7ms (= 14267.9ms / 100, input_shape=[16, 3, 224, 224])
✔️ Relative speed: 1.11 (= 142.7ms / 128.4ms)

OneFlow resnet50 time: 75.3ms (= 7527.1ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 83.6ms (= 8364.0ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.11 (= 83.6ms / 75.3ms)

OneFlow resnet50 time: 48.3ms (= 9664.1ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 64.2ms (= 12844.3ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.33 (= 64.2ms / 48.3ms)

OneFlow resnet50 time: 35.9ms (= 7188.0ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 41.1ms (= 8217.4ms / 200, input_shape=[2, 3, 224, 224])
✔️ Relative speed: 1.14 (= 41.1ms / 35.9ms)

OneFlow resnet50 time: 28.2ms (= 5641.7ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 41.3ms (= 8268.5ms / 200, input_shape=[1, 3, 224, 224])
✔️ Relative speed: 1.47 (= 41.3ms / 28.2ms)

OneFlow swin dataloader time: 0.257s (= 51.493s / 200, num_workers=1)
PyTorch swin dataloader time: 0.150s (= 29.993s / 200, num_workers=1)
Relative speed: 0.582 (= 0.150s / 0.257s)

OneFlow swin dataloader time: 0.110s (= 22.087s / 200, num_workers=4)
PyTorch swin dataloader time: 0.042s (= 8.413s / 200, num_workers=4)
Relative speed: 0.381 (= 0.042s / 0.110s)

OneFlow swin dataloader time: 0.040s (= 7.901s / 200, num_workers=8)
PyTorch swin dataloader time: 0.021s (= 4.293s / 200, num_workers=8)
Relative speed: 0.543 (= 0.021s / 0.040s)

❌ OneFlow resnet50 time: 136.8ms (= 13682.1ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 159.6ms (= 15957.2ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.17 (= 159.6ms / 136.8ms)

OneFlow resnet50 time: 84.2ms (= 8415.8ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 105.8ms (= 10583.4ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.26 (= 105.8ms / 84.2ms)

OneFlow resnet50 time: 57.4ms (= 11478.3ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 77.1ms (= 15419.7ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.34 (= 77.1ms / 57.4ms)

OneFlow resnet50 time: 45.5ms (= 9093.4ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 70.8ms (= 14169.8ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.56 (= 70.8ms / 45.5ms)

OneFlow resnet50 time: 39.2ms (= 7849.3ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 73.9ms (= 14781.8ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.88 (= 73.9ms / 39.2ms)

@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 17, 2022 21:03
@github-actions
Copy link
Contributor

View latest API docs preview at: https://staging.oneflow.info/docs/Oneflow-Inc/oneflow/pr/8923/

@jackalcooper jackalcooper merged commit c0f06fd into master Aug 17, 2022
@jackalcooper jackalcooper deleted the support-tosa-make-broadcastable-pass branch August 17, 2022 23:43
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.

4 participants