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

Optim upsample backward #9424

Merged
merged 13 commits into from
Nov 15, 2022
Merged

Optim upsample backward #9424

merged 13 commits into from
Nov 15, 2022

Conversation

BBuf
Copy link
Contributor

@BBuf BBuf commented Nov 14, 2022

UpsampleNearesrt2D在采样倍率为2的时候不使用NdIndexOffsetHelper,减少计算量。

Pack dy减少访存,避免使用atomicAdd。

@BBuf BBuf requested a review from liujuncheng as a code owner November 14, 2022 14:56
@BBuf BBuf requested review from oneflow-ci-bot and removed request for oneflow-ci-bot November 15, 2022 02:45
@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.

@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 









❌ OneFlow resnet50 time: 140.1ms (= 14009.1ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 165.2ms (= 16518.4ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.18 (= 165.2ms / 140.1ms)

OneFlow resnet50 time: 85.2ms (= 8522.5ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 102.8ms (= 10283.7ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.21 (= 102.8ms / 85.2ms)

OneFlow resnet50 time: 57.8ms (= 11560.9ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 81.5ms (= 16309.6ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.41 (= 81.5ms / 57.8ms)

OneFlow resnet50 time: 44.7ms (= 8944.8ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 72.3ms (= 14450.5ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.62 (= 72.3ms / 44.7ms)

OneFlow resnet50 time: 40.0ms (= 8006.0ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 67.9ms (= 13571.1ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.70 (= 67.9ms / 40.0ms)

@github-actions
Copy link
Contributor

CI failed when running job: cuda-misc. PR label automerge has been removed

@BBuf BBuf requested review from oneflow-ci-bot and removed request for oneflow-ci-bot November 15, 2022 14:02
@BBuf BBuf added the automerge label Nov 15, 2022
@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 









❌ OneFlow resnet50 time: 139.9ms (= 13987.4ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 160.6ms (= 16063.0ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.15 (= 160.6ms / 139.9ms)

OneFlow resnet50 time: 84.9ms (= 8492.3ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 101.9ms (= 10190.7ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.20 (= 101.9ms / 84.9ms)

OneFlow resnet50 time: 57.6ms (= 11520.4ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 80.1ms (= 16012.3ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.39 (= 80.1ms / 57.6ms)

OneFlow resnet50 time: 45.8ms (= 9155.9ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 72.1ms (= 14425.8ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.58 (= 72.1ms / 45.8ms)

OneFlow resnet50 time: 41.2ms (= 8248.1ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 69.3ms (= 13851.2ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.68 (= 69.3ms / 41.2ms)

@github-actions
Copy link
Contributor

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

@mergify mergify bot merged commit 1894d07 into master Nov 15, 2022
@mergify mergify bot deleted the optim_upsample_backward branch November 15, 2022 15:49
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