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

Fix rand/randn bug #7914

Merged
merged 46 commits into from
Apr 3, 2022
Merged

Fix rand/randn bug #7914

merged 46 commits into from
Apr 3, 2022

Conversation

BBuf
Copy link
Contributor

@BBuf BBuf commented Mar 28, 2022

fix rand and randn tuple input bug.

@@ -146,50 +146,6 @@ def rand_op(
)


class RandN(Module):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个类过时了,已经迁移到Functor了,这里去掉。

@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

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.

@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot March 28, 2022 11:32
@BBuf BBuf added the automerge label Apr 1, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Apr 1, 2022

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

@github-actions
Copy link
Contributor

github-actions bot commented Apr 1, 2022

Speed stats:
GPU Name: GeForce GTX 1080 

✔️ OneFlow resnet50 time: 128.5ms (= 12851.2ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 139.7ms (= 13968.4ms / 100, input_shape=[16, 3, 224, 224])
✔️ Relative speed: 1.09 (= 139.7ms / 128.5ms)

✔️ OneFlow resnet50 time: 79.0ms (= 7903.1ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 85.5ms (= 8547.8ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.08 (= 85.5ms / 79.0ms)

OneFlow resnet50 time: 52.8ms (= 10555.0ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 61.0ms (= 12194.6ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.16 (= 61.0ms / 52.8ms)

OneFlow resnet50 time: 41.1ms (= 8216.9ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 49.1ms (= 9815.9ms / 200, input_shape=[2, 3, 224, 224])
✔️ Relative speed: 1.19 (= 49.1ms / 41.1ms)

OneFlow resnet50 time: 40.0ms (= 8004.2ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 38.7ms (= 7744.8ms / 200, input_shape=[1, 3, 224, 224])
✔️ Relative speed: 0.97 (= 38.7ms / 40.0ms)

OneFlow swin dataloader time: 0.248s (= 49.691s / 200, num_workers=1)
PyTorch swin dataloader time: 0.251s (= 50.194s / 200, num_workers=1)
✔️ Relative speed: 1.010 (= 0.251s / 0.248s)

OneFlow swin dataloader time: 0.064s (= 12.788s / 200, num_workers=4)
PyTorch swin dataloader time: 0.067s (= 13.384s / 200, num_workers=4)
✔️ Relative speed: 1.047 (= 0.067s / 0.064s)

OneFlow swin dataloader time: 0.037s (= 7.438s / 200, num_workers=8)
PyTorch swin dataloader time: 0.038s (= 7.532s / 200, num_workers=8)
✔️ Relative speed: 1.013 (= 0.038s / 0.037s)

✔️ OneFlow resnet50 time: 135.6ms (= 13557.0ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 156.7ms (= 15669.5ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.16 (= 156.7ms / 135.6ms)

OneFlow resnet50 time: 89.2ms (= 8921.0ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 101.4ms (= 10138.9ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.14 (= 101.4ms / 89.2ms)

OneFlow resnet50 time: 62.7ms (= 12533.4ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 77.7ms (= 15536.9ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.24 (= 77.7ms / 62.7ms)

OneFlow resnet50 time: 52.1ms (= 10421.9ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 67.3ms (= 13457.8ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.29 (= 67.3ms / 52.1ms)

OneFlow resnet50 time: 51.6ms (= 10318.0ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 64.0ms (= 12795.3ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.24 (= 64.0ms / 51.6ms)

@github-actions
Copy link
Contributor

github-actions bot commented Apr 1, 2022

CI failed when running job: cpu-module. PR label automerge has been removed

@github-actions github-actions bot removed the automerge label Apr 1, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Apr 2, 2022

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.

@BBuf BBuf requested review from oneflow-ci-bot and removed request for oneflow-ci-bot April 2, 2022 01:22
@BBuf BBuf added the automerge label Apr 2, 2022
@BBuf BBuf changed the title Fix randn bug Fix rand/randn bug Apr 2, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Apr 2, 2022

Speed stats:
GPU Name: GeForce GTX 1080 

✔️ OneFlow resnet50 time: 128.5ms (= 12850.9ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 140.7ms (= 14074.7ms / 100, input_shape=[16, 3, 224, 224])
✔️ Relative speed: 1.10 (= 140.7ms / 128.5ms)

❌ OneFlow resnet50 time: 82.0ms (= 8199.6ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 87.4ms (= 8743.0ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.07 (= 87.4ms / 82.0ms)

OneFlow resnet50 time: 54.4ms (= 10881.3ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 63.8ms (= 12769.5ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.17 (= 63.8ms / 54.4ms)

OneFlow resnet50 time: 42.0ms (= 8403.8ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 52.2ms (= 10447.3ms / 200, input_shape=[2, 3, 224, 224])
✔️ Relative speed: 1.24 (= 52.2ms / 42.0ms)

OneFlow resnet50 time: 38.9ms (= 7773.8ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 44.0ms (= 8795.5ms / 200, input_shape=[1, 3, 224, 224])
✔️ Relative speed: 1.13 (= 44.0ms / 38.9ms)

OneFlow swin dataloader time: 0.268s (= 53.589s / 200, num_workers=1)
PyTorch swin dataloader time: 0.255s (= 51.013s / 200, num_workers=1)
✔️ Relative speed: 0.952 (= 0.255s / 0.268s)

OneFlow swin dataloader time: 0.067s (= 13.365s / 200, num_workers=4)
PyTorch swin dataloader time: 0.070s (= 13.992s / 200, num_workers=4)
✔️ Relative speed: 1.047 (= 0.070s / 0.067s)

OneFlow swin dataloader time: 0.037s (= 7.302s / 200, num_workers=8)
PyTorch swin dataloader time: 0.040s (= 8.023s / 200, num_workers=8)
✔️ Relative speed: 1.099 (= 0.040s / 0.037s)

✔️ OneFlow resnet50 time: 135.9ms (= 13590.0ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 159.1ms (= 15912.3ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.17 (= 159.1ms / 135.9ms)

OneFlow resnet50 time: 89.2ms (= 8918.3ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 103.3ms (= 10333.8ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.16 (= 103.3ms / 89.2ms)

OneFlow resnet50 time: 62.4ms (= 12479.9ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 87.1ms (= 17412.4ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.40 (= 87.1ms / 62.4ms)

OneFlow resnet50 time: 55.6ms (= 11128.1ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 67.4ms (= 13470.7ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.21 (= 67.4ms / 55.6ms)

OneFlow resnet50 time: 46.2ms (= 9239.1ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 62.8ms (= 12568.5ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.36 (= 62.8ms / 46.2ms)

@github-actions
Copy link
Contributor

github-actions bot commented Apr 2, 2022

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

@github-actions
Copy link
Contributor

github-actions bot commented Apr 3, 2022

Speed stats:
GPU Name: GeForce GTX 1080 

✔️ OneFlow resnet50 time: 128.4ms (= 12843.6ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 141.1ms (= 14105.7ms / 100, input_shape=[16, 3, 224, 224])
✔️ Relative speed: 1.10 (= 141.1ms / 128.4ms)

✔️ OneFlow resnet50 time: 79.9ms (= 7990.0ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 85.6ms (= 8563.4ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.07 (= 85.6ms / 79.9ms)

OneFlow resnet50 time: 53.6ms (= 10714.6ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 55.0ms (= 11007.6ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.03 (= 55.0ms / 53.6ms)

OneFlow resnet50 time: 43.2ms (= 8642.1ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 48.4ms (= 9672.1ms / 200, input_shape=[2, 3, 224, 224])
✔️ Relative speed: 1.12 (= 48.4ms / 43.2ms)

OneFlow resnet50 time: 40.3ms (= 8055.7ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 41.2ms (= 8232.8ms / 200, input_shape=[1, 3, 224, 224])
✔️ Relative speed: 1.02 (= 41.2ms / 40.3ms)

OneFlow swin dataloader time: 0.251s (= 50.241s / 200, num_workers=1)
PyTorch swin dataloader time: 0.249s (= 49.877s / 200, num_workers=1)
✔️ Relative speed: 0.993 (= 0.249s / 0.251s)

OneFlow swin dataloader time: 0.072s (= 14.493s / 200, num_workers=4)
PyTorch swin dataloader time: 0.071s (= 14.166s / 200, num_workers=4)
✔️ Relative speed: 0.977 (= 0.071s / 0.072s)

OneFlow swin dataloader time: 0.037s (= 7.311s / 200, num_workers=8)
PyTorch swin dataloader time: 0.037s (= 7.303s / 200, num_workers=8)
✔️ Relative speed: 0.999 (= 0.037s / 0.037s)

✔️ OneFlow resnet50 time: 135.4ms (= 13540.6ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 156.2ms (= 15618.5ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.15 (= 156.2ms / 135.4ms)

OneFlow resnet50 time: 89.8ms (= 8980.6ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 104.7ms (= 10470.0ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.17 (= 104.7ms / 89.8ms)

OneFlow resnet50 time: 61.8ms (= 12358.6ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 77.1ms (= 15414.7ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.25 (= 77.1ms / 61.8ms)

OneFlow resnet50 time: 51.7ms (= 10341.2ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 66.2ms (= 13249.6ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.28 (= 66.2ms / 51.7ms)

OneFlow resnet50 time: 50.6ms (= 10110.5ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 69.4ms (= 13882.6ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.37 (= 69.4ms / 50.6ms)

@github-actions
Copy link
Contributor

github-actions bot commented Apr 3, 2022

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

@daquexian daquexian merged commit b8547c6 into master Apr 3, 2022
@daquexian daquexian deleted the fix_randn_bug branch April 3, 2022 02:11
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.

6 participants