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

Dev pure scalar div #7483

Merged
merged 28 commits into from
Feb 14, 2022
Merged

Dev pure scalar div #7483

merged 28 commits into from
Feb 14, 2022

Conversation

simonJJJ
Copy link
Contributor

Add pure scalar div for the same floating-point accuracy with torch.

@github-actions
Copy link
Contributor

Static analysis with clang failed. PR label automerge has been removed

@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

✔️ OneFlow resnet50 time: 128.9ms (= 12886.8ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 139.9ms (= 13985.1ms / 100, input_shape=[16, 3, 224, 224])
✔️ Relative speed: 1.09 (= 139.9ms / 128.9ms)

✔️ OneFlow resnet50 time: 77.1ms (= 7708.1ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 85.2ms (= 8520.8ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.11 (= 85.2ms / 77.1ms)

OneFlow resnet50 time: 51.6ms (= 10312.2ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 56.6ms (= 11321.5ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.10 (= 56.6ms / 51.6ms)

OneFlow resnet50 time: 44.5ms (= 8905.7ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 48.5ms (= 9709.2ms / 200, input_shape=[2, 3, 224, 224])
✔️ Relative speed: 1.09 (= 48.5ms / 44.5ms)

OneFlow resnet50 time: 41.1ms (= 8227.5ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 38.4ms (= 7674.4ms / 200, input_shape=[1, 3, 224, 224])
✔️ Relative speed: 0.93 (= 38.4ms / 41.1ms)

✔️ OneFlow resnet50 time: 143.0ms (= 14295.3ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 159.4ms (= 15936.1ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.11 (= 159.4ms / 143.0ms)

OneFlow resnet50 time: 87.8ms (= 8779.6ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 105.3ms (= 10526.1ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.20 (= 105.3ms / 87.8ms)

OneFlow resnet50 time: 61.2ms (= 12249.6ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 74.7ms (= 14941.9ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.22 (= 74.7ms / 61.2ms)

OneFlow resnet50 time: 55.4ms (= 11085.3ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 63.9ms (= 12774.1ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.15 (= 63.9ms / 55.4ms)

OneFlow resnet50 time: 55.5ms (= 11098.4ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 63.8ms (= 12765.0ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.15 (= 63.8ms / 55.5ms)

@oneflow-ci-bot oneflow-ci-bot removed their request for review February 14, 2022 06:35
@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.

@simonJJJ simonJJJ requested review from oneflow-ci-bot and removed request for oneflow-ci-bot February 14, 2022 07:50
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot February 14, 2022 07:56
@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

✔️ OneFlow resnet50 time: 129.1ms (= 12914.3ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 141.3ms (= 14131.4ms / 100, input_shape=[16, 3, 224, 224])
✔️ Relative speed: 1.09 (= 141.3ms / 129.1ms)

✔️ OneFlow resnet50 time: 78.3ms (= 7830.0ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 86.7ms (= 8670.2ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.11 (= 86.7ms / 78.3ms)

OneFlow resnet50 time: 53.1ms (= 10610.3ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 59.0ms (= 11796.9ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.11 (= 59.0ms / 53.1ms)

OneFlow resnet50 time: 44.7ms (= 8937.1ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 43.3ms (= 8667.8ms / 200, input_shape=[2, 3, 224, 224])
❌ Relative speed: 0.97 (= 43.3ms / 44.7ms)

OneFlow resnet50 time: 39.6ms (= 7917.6ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 37.7ms (= 7537.3ms / 200, input_shape=[1, 3, 224, 224])
✔️ Relative speed: 0.95 (= 37.7ms / 39.6ms)

✔️ OneFlow resnet50 time: 142.6ms (= 14257.3ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 162.9ms (= 16287.7ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.14 (= 162.9ms / 142.6ms)

OneFlow resnet50 time: 87.4ms (= 8739.8ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 103.5ms (= 10349.0ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.18 (= 103.5ms / 87.4ms)

OneFlow resnet50 time: 61.8ms (= 12352.4ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 76.4ms (= 15280.1ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.24 (= 76.4ms / 61.8ms)

OneFlow resnet50 time: 52.6ms (= 10513.6ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 69.0ms (= 13808.4ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.31 (= 69.0ms / 52.6ms)

OneFlow resnet50 time: 50.2ms (= 10040.9ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 62.0ms (= 12405.0ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.24 (= 62.0ms / 50.2ms)

@github-actions
Copy link
Contributor

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

@oneflow-ci-bot oneflow-ci-bot removed their request for review February 14, 2022 09:03
@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

✔️ OneFlow resnet50 time: 129.0ms (= 12898.2ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 140.8ms (= 14076.4ms / 100, input_shape=[16, 3, 224, 224])
✔️ Relative speed: 1.09 (= 140.8ms / 129.0ms)

✔️ OneFlow resnet50 time: 78.0ms (= 7802.0ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 87.5ms (= 8745.0ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.12 (= 87.5ms / 78.0ms)

OneFlow resnet50 time: 53.5ms (= 10707.5ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 58.9ms (= 11789.3ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.10 (= 58.9ms / 53.5ms)

OneFlow resnet50 time: 44.6ms (= 8925.7ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 49.6ms (= 9911.9ms / 200, input_shape=[2, 3, 224, 224])
✔️ Relative speed: 1.11 (= 49.6ms / 44.6ms)

OneFlow resnet50 time: 39.9ms (= 7979.8ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 43.4ms (= 8678.4ms / 200, input_shape=[1, 3, 224, 224])
✔️ Relative speed: 1.09 (= 43.4ms / 39.9ms)

✔️ OneFlow resnet50 time: 142.1ms (= 14212.9ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 158.4ms (= 15838.0ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.11 (= 158.4ms / 142.1ms)

OneFlow resnet50 time: 89.6ms (= 8957.0ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 102.7ms (= 10267.2ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.15 (= 102.7ms / 89.6ms)

OneFlow resnet50 time: 62.4ms (= 12479.8ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 84.3ms (= 16866.9ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.35 (= 84.3ms / 62.4ms)

OneFlow resnet50 time: 51.7ms (= 10330.3ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 68.7ms (= 13740.4ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.33 (= 68.7ms / 51.7ms)

OneFlow resnet50 time: 53.8ms (= 10769.3ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 65.6ms (= 13110.1ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.22 (= 65.6ms / 53.8ms)

@oneflow-ci-bot oneflow-ci-bot removed their request for review February 14, 2022 10:04
@oneflow-ci-bot oneflow-ci-bot merged commit 4a4f5d1 into master Feb 14, 2022
@oneflow-ci-bot oneflow-ci-bot deleted the dev_pure_scalar_div branch February 14, 2022 10:04
marigoold pushed a commit that referenced this pull request Mar 15, 2022
* fix typo

* add pure scalar div

* fix static check

* fix vectorat

* auto format by CI

Co-authored-by: oneflow-ci-bot <69100618+oneflow-ci-bot@users.noreply.github.com>
Co-authored-by: oneflow-ci-bot <ci-bot@oneflow.org>
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