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 affine_grid and add global unittest #7578

Merged
merged 22 commits into from
Feb 28, 2022

Conversation

hjchen2
Copy link
Contributor

@hjchen2 hjchen2 commented Feb 23, 2022

原本的实现没有考虑S0切分的问题,直接从属性中拿size是不对的,如果S0切分的话N实际上应该等于size(0) / parallel_num

@hjchen2 hjchen2 enabled auto-merge (squash) February 23, 2022 12:43
@yuanms2
Copy link
Contributor

yuanms2 commented Feb 23, 2022

这修复的是什么问题

@oneflow-ci-bot oneflow-ci-bot removed their request for review February 23, 2022 15:45
@hjchen2
Copy link
Contributor Author

hjchen2 commented Feb 24, 2022

这修复的是什么问题

原本的实现没有考虑S0切分的问题,直接从属性中拿size是不对的,如果S0切分的话N实际上应该等于size(0) / parallel_num

@oneflow-ci-bot oneflow-ci-bot removed their request for review February 24, 2022 02:27
@oneflow-ci-bot oneflow-ci-bot self-requested a review February 24, 2022 03:37
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot February 24, 2022 05:23
@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

✔️ OneFlow resnet50 time: 128.7ms (= 12868.5ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 140.2ms (= 14020.7ms / 100, input_shape=[16, 3, 224, 224])
✔️ Relative speed: 1.09 (= 140.2ms / 128.7ms)

❌ OneFlow resnet50 time: 79.0ms (= 7897.8ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 86.8ms (= 8679.3ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.10 (= 86.8ms / 79.0ms)

OneFlow resnet50 time: 53.5ms (= 10697.6ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 62.3ms (= 12466.6ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.17 (= 62.3ms / 53.5ms)

OneFlow resnet50 time: 43.7ms (= 8745.1ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 45.6ms (= 9111.0ms / 200, input_shape=[2, 3, 224, 224])
✔️ Relative speed: 1.04 (= 45.6ms / 43.7ms)

OneFlow resnet50 time: 37.0ms (= 7397.5ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 40.7ms (= 8145.7ms / 200, input_shape=[1, 3, 224, 224])
✔️ Relative speed: 1.10 (= 40.7ms / 37.0ms)

✔️ OneFlow resnet50 time: 142.4ms (= 14240.3ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 158.6ms (= 15864.6ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.11 (= 158.6ms / 142.4ms)

OneFlow resnet50 time: 90.4ms (= 9037.4ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 102.6ms (= 10263.0ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.14 (= 102.6ms / 90.4ms)

OneFlow resnet50 time: 63.2ms (= 12634.7ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 74.6ms (= 14928.8ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.18 (= 74.6ms / 63.2ms)

OneFlow resnet50 time: 52.9ms (= 10587.5ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 66.4ms (= 13270.3ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.25 (= 66.4ms / 52.9ms)

OneFlow resnet50 time: 49.2ms (= 9844.1ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 59.7ms (= 11942.7ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.21 (= 59.7ms / 49.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 25, 2022 09:24
@oneflow-ci-bot oneflow-ci-bot self-requested a review February 25, 2022 11:13
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot February 25, 2022 13:46
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot February 25, 2022 16:15
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot February 25, 2022 18:54
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot February 25, 2022 20:51
@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

✔️ OneFlow resnet50 time: 128.5ms (= 12847.6ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 138.9ms (= 13885.3ms / 100, input_shape=[16, 3, 224, 224])
✔️ Relative speed: 1.08 (= 138.9ms / 128.5ms)

❌ OneFlow resnet50 time: 81.8ms (= 8181.3ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 84.3ms (= 8428.0ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.03 (= 84.3ms / 81.8ms)

OneFlow resnet50 time: 52.1ms (= 10421.3ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 54.8ms (= 10966.7ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.05 (= 54.8ms / 52.1ms)

OneFlow resnet50 time: 41.8ms (= 8363.5ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 45.0ms (= 8995.0ms / 200, input_shape=[2, 3, 224, 224])
✔️ Relative speed: 1.08 (= 45.0ms / 41.8ms)

OneFlow resnet50 time: 36.8ms (= 7365.7ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 39.7ms (= 7932.8ms / 200, input_shape=[1, 3, 224, 224])
✔️ Relative speed: 1.08 (= 39.7ms / 36.8ms)

✔️ OneFlow resnet50 time: 141.7ms (= 14170.7ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 161.2ms (= 16118.5ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.14 (= 161.2ms / 141.7ms)

OneFlow resnet50 time: 86.0ms (= 8601.1ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 101.3ms (= 10132.0ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.18 (= 101.3ms / 86.0ms)

OneFlow resnet50 time: 60.8ms (= 12151.1ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 76.6ms (= 15326.6ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.26 (= 76.6ms / 60.8ms)

OneFlow resnet50 time: 50.9ms (= 10181.9ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 62.0ms (= 12396.1ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.22 (= 62.0ms / 50.9ms)

OneFlow resnet50 time: 48.1ms (= 9629.4ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 56.7ms (= 11332.5ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.18 (= 56.7ms / 48.1ms)

@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 25, 2022 22:15
@oneflow-ci-bot oneflow-ci-bot removed their request for review February 28, 2022 03:30
@oneflow-ci-bot oneflow-ci-bot self-requested a review February 28, 2022 03:39
@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

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

✔️ OneFlow resnet50 time: 77.1ms (= 7707.6ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 86.2ms (= 8621.2ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.12 (= 86.2ms / 77.1ms)

OneFlow resnet50 time: 51.8ms (= 10364.2ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 59.3ms (= 11859.2ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.14 (= 59.3ms / 51.8ms)

OneFlow resnet50 time: 43.1ms (= 8610.7ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 46.4ms (= 9271.3ms / 200, input_shape=[2, 3, 224, 224])
✔️ Relative speed: 1.08 (= 46.4ms / 43.1ms)

OneFlow resnet50 time: 37.2ms (= 7448.2ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 38.4ms (= 7684.8ms / 200, input_shape=[1, 3, 224, 224])
✔️ Relative speed: 1.03 (= 38.4ms / 37.2ms)

✔️ OneFlow resnet50 time: 141.7ms (= 14172.1ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 160.2ms (= 16021.8ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.13 (= 160.2ms / 141.7ms)

OneFlow resnet50 time: 89.5ms (= 8950.2ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 99.4ms (= 9943.8ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.11 (= 99.4ms / 89.5ms)

OneFlow resnet50 time: 61.6ms (= 12319.5ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 76.1ms (= 15226.7ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.24 (= 76.1ms / 61.6ms)

OneFlow resnet50 time: 52.8ms (= 10561.0ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 65.1ms (= 13028.0ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.23 (= 65.1ms / 52.8ms)

OneFlow resnet50 time: 47.3ms (= 9469.6ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 60.2ms (= 12046.9ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.27 (= 60.2ms / 47.3ms)

@hjchen2 hjchen2 merged commit b4b26be into master Feb 28, 2022
@hjchen2 hjchen2 deleted the dev_fix_affine_grid_and_add_global_unittest branch February 28, 2022 05:52
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