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

Reduce arg combinations of sgd/adam/adamw unittest to prevent timeout #9886

Merged
merged 9 commits into from
Feb 22, 2023

Conversation

marigoold
Copy link
Contributor

@marigoold marigoold commented Feb 22, 2023

image

sgd / adam / adamw 的单测中参数组合爆炸导致 ci 容易超时,这里对部分参数进行了采样来减少组合数。

修改之后,slowest top 50 已经没有这几个单测了。

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.

@marigoold marigoold requested review from oneflow-ci-bot and removed request for oneflow-ci-bot February 22, 2023 02:40
@github-actions
Copy link
Contributor

Speed stats:

arg_dict["tensor_num"] = [1, 4]
for arg in GenArgDict(arg_dict):
compare_with_numpy_sgd(test_case, **arg)

@autotest(n=10)
Copy link
Contributor

Choose a reason for hiding this comment

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

这个是不是也不用加,遍历 arg_dict 本身就循环快 300 次了

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这个是不是也不用加,遍历 arg_dict 本身就循环快 300 次了

这个我也比较纠结;这里加上是我考虑因为参数里面本身就有随机量,多跑几次能多取一些值,覆盖得稍微全面一些

Copy link
Contributor

@daquexian daquexian Feb 22, 2023

Choose a reason for hiding this comment

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

感觉 300 次足够了,很多参数是正交的,不必把每种组合都跑到

Copy link
Contributor Author

Choose a reason for hiding this comment

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

感觉 300 次足够了,很多参数是正交的,不必把每种组合都跑到

ok,那我这里去掉

@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

❌ OneFlow resnet50 time: 141.0ms (= 14098.3ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 143.3ms (= 14327.4ms / 100, input_shape=[16, 3, 224, 224])
❌ Relative speed: 1.02 (= 143.3ms / 141.0ms)

OneFlow resnet50 time: 80.8ms (= 8077.4ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 86.1ms (= 8608.7ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.07 (= 86.1ms / 80.8ms)

OneFlow resnet50 time: 50.0ms (= 9995.8ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 57.3ms (= 11454.0ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.15 (= 57.3ms / 50.0ms)

OneFlow resnet50 time: 33.4ms (= 6680.8ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 46.5ms (= 9291.2ms / 200, input_shape=[2, 3, 224, 224])
✔️ Relative speed: 1.39 (= 46.5ms / 33.4ms)

OneFlow resnet50 time: 25.5ms (= 5099.3ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 42.6ms (= 8529.5ms / 200, input_shape=[1, 3, 224, 224])
✔️ Relative speed: 1.67 (= 42.6ms / 25.5ms)

OneFlow swin dataloader time: 0.235s (= 47.095s / 200, num_workers=1)
PyTorch swin dataloader time: 0.150s (= 29.980s / 200, num_workers=1)
Relative speed: 0.637 (= 0.150s / 0.235s)

OneFlow swin dataloader time: 0.064s (= 12.766s / 200, num_workers=4)
PyTorch swin dataloader time: 0.040s (= 8.071s / 200, num_workers=4)
Relative speed: 0.632 (= 0.040s / 0.064s)

OneFlow swin dataloader time: 0.036s (= 7.147s / 200, num_workers=8)
PyTorch swin dataloader time: 0.023s (= 4.538s / 200, num_workers=8)
Relative speed: 0.635 (= 0.023s / 0.036s)

❌ OneFlow resnet50 time: 152.7ms (= 15272.5ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 162.7ms (= 16266.5ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
❌ Relative speed: 1.07 (= 162.7ms / 152.7ms)

OneFlow resnet50 time: 91.9ms (= 9192.6ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 103.4ms (= 10335.9ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.12 (= 103.4ms / 91.9ms)

OneFlow resnet50 time: 60.3ms (= 12063.7ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 78.7ms (= 15743.0ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.30 (= 78.7ms / 60.3ms)

OneFlow resnet50 time: 42.2ms (= 8445.0ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 72.4ms (= 14487.0ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.72 (= 72.4ms / 42.2ms)

OneFlow resnet50 time: 36.1ms (= 7220.9ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 67.5ms (= 13496.8ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.87 (= 67.5ms / 36.1ms)

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

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

@marigoold marigoold changed the title Reduce arg combinations of sgd unittest to prevent timeout Reduce arg combinations of sgd/adam/adamw unittest to prevent timeout Feb 22, 2023
@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:

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

@marigoold marigoold requested review from oneflow-ci-bot and removed request for oneflow-ci-bot February 22, 2023 03:17
@github-actions
Copy link
Contributor

Speed stats:

@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

❌ OneFlow resnet50 time: 141.1ms (= 14106.7ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 142.2ms (= 14216.6ms / 100, input_shape=[16, 3, 224, 224])
❌ Relative speed: 1.01 (= 142.2ms / 141.1ms)

OneFlow resnet50 time: 81.2ms (= 8118.3ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 84.2ms (= 8416.1ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.04 (= 84.2ms / 81.2ms)

OneFlow resnet50 time: 50.8ms (= 10151.1ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 55.4ms (= 11083.9ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.09 (= 55.4ms / 50.8ms)

OneFlow resnet50 time: 33.6ms (= 6711.7ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 42.3ms (= 8451.4ms / 200, input_shape=[2, 3, 224, 224])
✔️ Relative speed: 1.26 (= 42.3ms / 33.6ms)

OneFlow resnet50 time: 24.9ms (= 4983.9ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 36.3ms (= 7250.7ms / 200, input_shape=[1, 3, 224, 224])
✔️ Relative speed: 1.45 (= 36.3ms / 24.9ms)

OneFlow swin dataloader time: 0.235s (= 46.925s / 200, num_workers=1)
PyTorch swin dataloader time: 0.149s (= 29.809s / 200, num_workers=1)
Relative speed: 0.635 (= 0.149s / 0.235s)

OneFlow swin dataloader time: 0.063s (= 12.673s / 200, num_workers=4)
PyTorch swin dataloader time: 0.041s (= 8.246s / 200, num_workers=4)
Relative speed: 0.651 (= 0.041s / 0.063s)

OneFlow swin dataloader time: 0.036s (= 7.236s / 200, num_workers=8)
PyTorch swin dataloader time: 0.022s (= 4.420s / 200, num_workers=8)
Relative speed: 0.611 (= 0.022s / 0.036s)

❌ OneFlow resnet50 time: 152.8ms (= 15277.9ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 162.1ms (= 16211.1ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
❌ Relative speed: 1.06 (= 162.1ms / 152.8ms)

OneFlow resnet50 time: 92.4ms (= 9239.9ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 104.1ms (= 10411.5ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.13 (= 104.1ms / 92.4ms)

OneFlow resnet50 time: 60.0ms (= 11996.9ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 79.0ms (= 15809.9ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.32 (= 79.0ms / 60.0ms)

OneFlow resnet50 time: 42.0ms (= 8398.8ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 71.2ms (= 14245.1ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.70 (= 71.2ms / 42.0ms)

OneFlow resnet50 time: 36.4ms (= 7286.1ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 69.9ms (= 13979.3ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.92 (= 69.9ms / 36.4ms)

@github-actions
Copy link
Contributor

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

@marigoold marigoold enabled auto-merge (squash) February 22, 2023 04:39
@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

❌ OneFlow resnet50 time: 141.1ms (= 14112.3ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 146.2ms (= 14620.1ms / 100, input_shape=[16, 3, 224, 224])
❌ Relative speed: 1.04 (= 146.2ms / 141.1ms)

OneFlow resnet50 time: 81.7ms (= 8167.0ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 88.1ms (= 8809.9ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.08 (= 88.1ms / 81.7ms)

OneFlow resnet50 time: 50.7ms (= 10135.3ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 56.7ms (= 11349.0ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.12 (= 56.7ms / 50.7ms)

OneFlow resnet50 time: 34.1ms (= 6827.8ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 44.6ms (= 8921.1ms / 200, input_shape=[2, 3, 224, 224])
✔️ Relative speed: 1.31 (= 44.6ms / 34.1ms)

OneFlow resnet50 time: 25.0ms (= 5000.3ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 41.5ms (= 8290.1ms / 200, input_shape=[1, 3, 224, 224])
✔️ Relative speed: 1.66 (= 41.5ms / 25.0ms)

OneFlow swin dataloader time: 0.239s (= 47.713s / 200, num_workers=1)
PyTorch swin dataloader time: 0.151s (= 30.139s / 200, num_workers=1)
Relative speed: 0.632 (= 0.151s / 0.239s)

OneFlow swin dataloader time: 0.068s (= 13.564s / 200, num_workers=4)
PyTorch swin dataloader time: 0.042s (= 8.311s / 200, num_workers=4)
Relative speed: 0.613 (= 0.042s / 0.068s)

OneFlow swin dataloader time: 0.038s (= 7.543s / 200, num_workers=8)
PyTorch swin dataloader time: 0.023s (= 4.500s / 200, num_workers=8)
Relative speed: 0.597 (= 0.023s / 0.038s)

❌ OneFlow resnet50 time: 152.7ms (= 15272.6ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 163.4ms (= 16335.4ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
❌ Relative speed: 1.07 (= 163.4ms / 152.7ms)

OneFlow resnet50 time: 92.7ms (= 9266.4ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 108.3ms (= 10827.2ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.17 (= 108.3ms / 92.7ms)

OneFlow resnet50 time: 60.6ms (= 12128.6ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 80.7ms (= 16143.2ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.33 (= 80.7ms / 60.6ms)

OneFlow resnet50 time: 42.8ms (= 8567.3ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 71.8ms (= 14354.5ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.68 (= 71.8ms / 42.8ms)

OneFlow resnet50 time: 35.6ms (= 7119.2ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 67.6ms (= 13512.4ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.90 (= 67.6ms / 35.6ms)

@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

❌ OneFlow resnet50 time: 141.2ms (= 14119.1ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 141.2ms (= 14120.4ms / 100, input_shape=[16, 3, 224, 224])
❌ Relative speed: 1.00 (= 141.2ms / 141.2ms)

OneFlow resnet50 time: 82.1ms (= 8205.7ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 88.2ms (= 8825.0ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.08 (= 88.2ms / 82.1ms)

OneFlow resnet50 time: 51.1ms (= 10222.2ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 57.5ms (= 11498.8ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.12 (= 57.5ms / 51.1ms)

OneFlow resnet50 time: 33.5ms (= 6697.8ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 43.4ms (= 8683.9ms / 200, input_shape=[2, 3, 224, 224])
✔️ Relative speed: 1.30 (= 43.4ms / 33.5ms)

OneFlow resnet50 time: 25.6ms (= 5120.7ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 42.6ms (= 8529.0ms / 200, input_shape=[1, 3, 224, 224])
✔️ Relative speed: 1.67 (= 42.6ms / 25.6ms)

OneFlow swin dataloader time: 0.241s (= 48.253s / 200, num_workers=1)
PyTorch swin dataloader time: 0.151s (= 30.107s / 200, num_workers=1)
Relative speed: 0.624 (= 0.151s / 0.241s)

OneFlow swin dataloader time: 0.068s (= 13.593s / 200, num_workers=4)
PyTorch swin dataloader time: 0.042s (= 8.408s / 200, num_workers=4)
Relative speed: 0.619 (= 0.042s / 0.068s)

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

❌ OneFlow resnet50 time: 153.4ms (= 15341.8ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 163.6ms (= 16357.1ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
❌ Relative speed: 1.07 (= 163.6ms / 153.4ms)

OneFlow resnet50 time: 92.9ms (= 9294.7ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 103.3ms (= 10330.0ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.11 (= 103.3ms / 92.9ms)

OneFlow resnet50 time: 60.3ms (= 12066.7ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 78.7ms (= 15735.0ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.30 (= 78.7ms / 60.3ms)

OneFlow resnet50 time: 42.8ms (= 8551.8ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 79.0ms (= 15796.5ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.85 (= 79.0ms / 42.8ms)

OneFlow resnet50 time: 37.0ms (= 7409.0ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 69.4ms (= 13882.8ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.87 (= 69.4ms / 37.0ms)

@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

❌ OneFlow resnet50 time: 141.3ms (= 14125.4ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 143.3ms (= 14328.9ms / 100, input_shape=[16, 3, 224, 224])
❌ Relative speed: 1.01 (= 143.3ms / 141.3ms)

OneFlow resnet50 time: 82.1ms (= 8214.1ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 88.9ms (= 8888.6ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.08 (= 88.9ms / 82.1ms)

OneFlow resnet50 time: 51.0ms (= 10192.5ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 57.1ms (= 11428.0ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.12 (= 57.1ms / 51.0ms)

OneFlow resnet50 time: 33.5ms (= 6709.8ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 43.2ms (= 8648.2ms / 200, input_shape=[2, 3, 224, 224])
✔️ Relative speed: 1.29 (= 43.2ms / 33.5ms)

OneFlow resnet50 time: 25.9ms (= 5177.0ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 41.8ms (= 8364.9ms / 200, input_shape=[1, 3, 224, 224])
✔️ Relative speed: 1.62 (= 41.8ms / 25.9ms)

OneFlow swin dataloader time: 0.237s (= 47.392s / 200, num_workers=1)
PyTorch swin dataloader time: 0.149s (= 29.781s / 200, num_workers=1)
Relative speed: 0.628 (= 0.149s / 0.237s)

OneFlow swin dataloader time: 0.068s (= 13.590s / 200, num_workers=4)
PyTorch swin dataloader time: 0.044s (= 8.836s / 200, num_workers=4)
Relative speed: 0.650 (= 0.044s / 0.068s)

OneFlow swin dataloader time: 0.040s (= 7.955s / 200, num_workers=8)
PyTorch swin dataloader time: 0.022s (= 4.329s / 200, num_workers=8)
Relative speed: 0.544 (= 0.022s / 0.040s)

❌ OneFlow resnet50 time: 152.8ms (= 15283.8ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 164.1ms (= 16413.3ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
❌ Relative speed: 1.07 (= 164.1ms / 152.8ms)

OneFlow resnet50 time: 92.8ms (= 9284.6ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 103.4ms (= 10343.6ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.11 (= 103.4ms / 92.8ms)

OneFlow resnet50 time: 60.6ms (= 12113.1ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 79.1ms (= 15812.4ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.31 (= 79.1ms / 60.6ms)

OneFlow resnet50 time: 42.6ms (= 8512.4ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 71.1ms (= 14217.1ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.67 (= 71.1ms / 42.6ms)

OneFlow resnet50 time: 36.6ms (= 7326.2ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 70.2ms (= 14034.2ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.92 (= 70.2ms / 36.6ms)

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

Speed stats:

@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

❌ OneFlow resnet50 time: 141.4ms (= 14135.4ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 146.0ms (= 14597.6ms / 100, input_shape=[16, 3, 224, 224])
❌ Relative speed: 1.03 (= 146.0ms / 141.4ms)

OneFlow resnet50 time: 82.8ms (= 8282.7ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 89.1ms (= 8909.4ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.08 (= 89.1ms / 82.8ms)

OneFlow resnet50 time: 51.1ms (= 10217.7ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 60.5ms (= 12092.4ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.18 (= 60.5ms / 51.1ms)

OneFlow resnet50 time: 34.6ms (= 6928.2ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 47.1ms (= 9410.7ms / 200, input_shape=[2, 3, 224, 224])
✔️ Relative speed: 1.36 (= 47.1ms / 34.6ms)

OneFlow resnet50 time: 25.5ms (= 5102.9ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 37.6ms (= 7529.7ms / 200, input_shape=[1, 3, 224, 224])
✔️ Relative speed: 1.48 (= 37.6ms / 25.5ms)

OneFlow swin dataloader time: 0.240s (= 48.075s / 200, num_workers=1)
PyTorch swin dataloader time: 0.149s (= 29.750s / 200, num_workers=1)
Relative speed: 0.619 (= 0.149s / 0.240s)

OneFlow swin dataloader time: 0.067s (= 13.351s / 200, num_workers=4)
PyTorch swin dataloader time: 0.040s (= 8.028s / 200, num_workers=4)
Relative speed: 0.601 (= 0.040s / 0.067s)

OneFlow swin dataloader time: 0.041s (= 8.127s / 200, num_workers=8)
PyTorch swin dataloader time: 0.023s (= 4.543s / 200, num_workers=8)
Relative speed: 0.559 (= 0.023s / 0.041s)

❌ OneFlow resnet50 time: 153.6ms (= 15355.7ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 164.2ms (= 16424.1ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
❌ Relative speed: 1.07 (= 164.2ms / 153.6ms)

OneFlow resnet50 time: 93.4ms (= 9335.9ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 103.8ms (= 10384.1ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.11 (= 103.8ms / 93.4ms)

OneFlow resnet50 time: 61.7ms (= 12346.2ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 79.1ms (= 15825.0ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.28 (= 79.1ms / 61.7ms)

OneFlow resnet50 time: 43.1ms (= 8620.4ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 69.9ms (= 13985.0ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.62 (= 69.9ms / 43.1ms)

OneFlow resnet50 time: 36.2ms (= 7231.1ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 67.9ms (= 13576.2ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.88 (= 67.9ms / 36.2ms)

@github-actions
Copy link
Contributor

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

1 similar comment
@github-actions
Copy link
Contributor

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

@marigoold marigoold merged commit 3887640 into master Feb 22, 2023
@marigoold marigoold deleted the fix_reduce_arglist_of_sgd_unittest branch February 22, 2023 09: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.

5 participants