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

align repr of nn.Embedding #8922

Merged
merged 9 commits into from
Aug 19, 2022
Merged

align repr of nn.Embedding #8922

merged 9 commits into from
Aug 19, 2022

Conversation

Flowingsun007
Copy link
Contributor

@Flowingsun007 Flowingsun007 commented Aug 16, 2022

对齐前:

image

对齐后:

image

@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.

@Flowingsun007 Flowingsun007 requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 16, 2022 02:35
@github-actions
Copy link
Contributor

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

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

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

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

Speed stats:
GPU Name: GeForce GTX 1080 

✔️ OneFlow resnet50 time: 128.3ms (= 12831.7ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 140.5ms (= 14045.5ms / 100, input_shape=[16, 3, 224, 224])
✔️ Relative speed: 1.09 (= 140.5ms / 128.3ms)

OneFlow resnet50 time: 75.2ms (= 7523.7ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 85.2ms (= 8522.4ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.13 (= 85.2ms / 75.2ms)

OneFlow resnet50 time: 48.2ms (= 9643.9ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 58.5ms (= 11703.8ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.21 (= 58.5ms / 48.2ms)

OneFlow resnet50 time: 35.9ms (= 7184.7ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 41.5ms (= 8300.3ms / 200, input_shape=[2, 3, 224, 224])
✔️ Relative speed: 1.16 (= 41.5ms / 35.9ms)

OneFlow resnet50 time: 28.1ms (= 5621.6ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 38.0ms (= 7596.4ms / 200, input_shape=[1, 3, 224, 224])
✔️ Relative speed: 1.35 (= 38.0ms / 28.1ms)

OneFlow swin dataloader time: 0.266s (= 53.150s / 200, num_workers=1)
PyTorch swin dataloader time: 0.152s (= 30.481s / 200, num_workers=1)
Relative speed: 0.573 (= 0.152s / 0.266s)

OneFlow swin dataloader time: 0.071s (= 14.152s / 200, num_workers=4)
PyTorch swin dataloader time: 0.042s (= 8.462s / 200, num_workers=4)
Relative speed: 0.598 (= 0.042s / 0.071s)

OneFlow swin dataloader time: 0.039s (= 7.885s / 200, num_workers=8)
PyTorch swin dataloader time: 0.022s (= 4.324s / 200, num_workers=8)
Relative speed: 0.548 (= 0.022s / 0.039s)

❌ OneFlow resnet50 time: 136.8ms (= 13679.4ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 161.4ms (= 16144.8ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.18 (= 161.4ms / 136.8ms)

OneFlow resnet50 time: 84.3ms (= 8432.6ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 101.9ms (= 10188.8ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.21 (= 101.9ms / 84.3ms)

OneFlow resnet50 time: 57.6ms (= 11520.9ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 76.6ms (= 15310.0ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.33 (= 76.6ms / 57.6ms)

OneFlow resnet50 time: 45.4ms (= 9078.3ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 71.1ms (= 14229.8ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.57 (= 71.1ms / 45.4ms)

OneFlow resnet50 time: 39.1ms (= 7826.6ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 67.5ms (= 13502.5ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.73 (= 67.5ms / 39.1ms)

@Flowingsun007 Flowingsun007 requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 17, 2022 14:51
@oneflow-ci-bot oneflow-ci-bot removed their request for review August 17, 2022 21:03
@Flowingsun007 Flowingsun007 requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 18, 2022 05:51
@Flowingsun007 Flowingsun007 requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 19, 2022 01:54
@Flowingsun007 Flowingsun007 requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 19, 2022 03:04
@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

✔️ OneFlow resnet50 time: 128.3ms (= 12826.9ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 149.0ms (= 14901.9ms / 100, input_shape=[16, 3, 224, 224])
✔️ Relative speed: 1.16 (= 149.0ms / 128.3ms)

OneFlow resnet50 time: 75.3ms (= 7527.9ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 85.3ms (= 8527.7ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.13 (= 85.3ms / 75.3ms)

OneFlow resnet50 time: 48.5ms (= 9709.2ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 60.2ms (= 12043.0ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.24 (= 60.2ms / 48.5ms)

OneFlow resnet50 time: 35.8ms (= 7163.1ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 45.0ms (= 8990.2ms / 200, input_shape=[2, 3, 224, 224])
✔️ Relative speed: 1.26 (= 45.0ms / 35.8ms)

OneFlow resnet50 time: 28.2ms (= 5646.1ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 36.8ms (= 7358.6ms / 200, input_shape=[1, 3, 224, 224])
✔️ Relative speed: 1.30 (= 36.8ms / 28.2ms)

OneFlow swin dataloader time: 0.261s (= 52.221s / 200, num_workers=1)
PyTorch swin dataloader time: 0.151s (= 30.137s / 200, num_workers=1)
Relative speed: 0.577 (= 0.151s / 0.261s)

OneFlow swin dataloader time: 0.070s (= 13.968s / 200, num_workers=4)
PyTorch swin dataloader time: 0.041s (= 8.260s / 200, num_workers=4)
Relative speed: 0.591 (= 0.041s / 0.070s)

OneFlow swin dataloader time: 0.039s (= 7.776s / 200, num_workers=8)
PyTorch swin dataloader time: 0.022s (= 4.426s / 200, num_workers=8)
Relative speed: 0.569 (= 0.022s / 0.039s)

❌ OneFlow resnet50 time: 136.5ms (= 13651.5ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 160.8ms (= 16081.7ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.18 (= 160.8ms / 136.5ms)

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

OneFlow resnet50 time: 58.4ms (= 11678.8ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 86.3ms (= 17252.8ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.48 (= 86.3ms / 58.4ms)

OneFlow resnet50 time: 45.1ms (= 9018.9ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 70.0ms (= 14003.2ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.55 (= 70.0ms / 45.1ms)

OneFlow resnet50 time: 39.2ms (= 7847.7ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 68.5ms (= 13692.9ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.74 (= 68.5ms / 39.2ms)

@github-actions
Copy link
Contributor

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

@Flowingsun007 Flowingsun007 merged commit a86efb6 into master Aug 19, 2022
@Flowingsun007 Flowingsun007 deleted the align_repr_of_nn.Embedding branch August 19, 2022 12:41
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