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 swin dataloader bug #8037

Merged
merged 32 commits into from
Apr 19, 2022
Merged

Fix swin dataloader bug #8037

merged 32 commits into from
Apr 19, 2022

Conversation

BBuf
Copy link
Contributor

@BBuf BBuf commented Apr 18, 2022

BBuf added 28 commits March 22, 2022 19:15
@BBuf BBuf requested a review from jackalcooper as a code owner April 18, 2022 01:37
@zhongshsh zhongshsh self-requested a review April 19, 2022 06:42
@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

✔️ OneFlow resnet50 time: 129.0ms (= 12902.5ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 137.6ms (= 13762.6ms / 100, input_shape=[16, 3, 224, 224])
✔️ Relative speed: 1.07 (= 137.6ms / 129.0ms)

OneFlow resnet50 time: 79.4ms (= 7935.8ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 83.7ms (= 8374.3ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.06 (= 83.7ms / 79.4ms)

OneFlow resnet50 time: 52.0ms (= 10400.0ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 58.2ms (= 11630.3ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.12 (= 58.2ms / 52.0ms)

OneFlow resnet50 time: 43.5ms (= 8705.8ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 49.1ms (= 9816.6ms / 200, input_shape=[2, 3, 224, 224])
✔️ Relative speed: 1.13 (= 49.1ms / 43.5ms)

OneFlow resnet50 time: 38.7ms (= 7736.9ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 37.2ms (= 7445.9ms / 200, input_shape=[1, 3, 224, 224])
✔️ Relative speed: 0.96 (= 37.2ms / 38.7ms)

OneFlow swin dataloader time: 0.249s (= 49.752s / 200, num_workers=1)
PyTorch swin dataloader time: 0.147s (= 29.397s / 200, num_workers=1)
Relative speed: 0.591 (= 0.147s / 0.249s)

OneFlow swin dataloader time: 0.068s (= 13.546s / 200, num_workers=4)
PyTorch swin dataloader time: 0.041s (= 8.234s / 200, num_workers=4)
Relative speed: 0.608 (= 0.041s / 0.068s)

OneFlow swin dataloader time: 0.036s (= 7.151s / 200, num_workers=8)
PyTorch swin dataloader time: 0.021s (= 4.258s / 200, num_workers=8)
Relative speed: 0.595 (= 0.021s / 0.036s)

✔️ OneFlow resnet50 time: 135.5ms (= 13551.4ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 163.4ms (= 16339.9ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.21 (= 163.4ms / 135.5ms)

OneFlow resnet50 time: 87.7ms (= 8769.9ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 99.8ms (= 9982.7ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.14 (= 99.8ms / 87.7ms)

OneFlow resnet50 time: 60.8ms (= 12168.3ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 85.5ms (= 17099.8ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.41 (= 85.5ms / 60.8ms)

OneFlow resnet50 time: 51.8ms (= 10359.8ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 76.4ms (= 15276.3ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.47 (= 76.4ms / 51.8ms)

OneFlow resnet50 time: 47.3ms (= 9450.8ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 61.8ms (= 12350.6ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.31 (= 61.8ms / 47.3ms)

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

✔️ OneFlow resnet50 time: 128.7ms (= 12868.9ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 144.6ms (= 14459.9ms / 100, input_shape=[16, 3, 224, 224])
✔️ Relative speed: 1.12 (= 144.6ms / 128.7ms)

OneFlow resnet50 time: 78.4ms (= 7841.7ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 84.3ms (= 8425.8ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.07 (= 84.3ms / 78.4ms)

OneFlow resnet50 time: 54.4ms (= 10871.7ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 60.8ms (= 12163.1ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.12 (= 60.8ms / 54.4ms)

OneFlow resnet50 time: 43.8ms (= 8751.2ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 42.4ms (= 8482.4ms / 200, input_shape=[2, 3, 224, 224])
❌ Relative speed: 0.97 (= 42.4ms / 43.8ms)

OneFlow resnet50 time: 35.3ms (= 7065.2ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 38.6ms (= 7722.7ms / 200, input_shape=[1, 3, 224, 224])
✔️ Relative speed: 1.09 (= 38.6ms / 35.3ms)

OneFlow swin dataloader time: 0.260s (= 52.011s / 200, num_workers=1)
PyTorch swin dataloader time: 0.150s (= 29.978s / 200, num_workers=1)
Relative speed: 0.576 (= 0.150s / 0.260s)

OneFlow swin dataloader time: 0.067s (= 13.393s / 200, num_workers=4)
PyTorch swin dataloader time: 0.043s (= 8.538s / 200, num_workers=4)
Relative speed: 0.637 (= 0.043s / 0.067s)

OneFlow swin dataloader time: 0.037s (= 7.496s / 200, num_workers=8)
PyTorch swin dataloader time: 0.023s (= 4.535s / 200, num_workers=8)
Relative speed: 0.605 (= 0.023s / 0.037s)

✔️ OneFlow resnet50 time: 135.5ms (= 13550.3ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 162.0ms (= 16197.5ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.20 (= 162.0ms / 135.5ms)

OneFlow resnet50 time: 87.5ms (= 8748.0ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 101.5ms (= 10147.4ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.16 (= 101.5ms / 87.5ms)

OneFlow resnet50 time: 61.5ms (= 12303.9ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 78.6ms (= 15724.9ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.28 (= 78.6ms / 61.5ms)

OneFlow resnet50 time: 52.4ms (= 10489.5ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 69.5ms (= 13892.8ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.32 (= 69.5ms / 52.4ms)

OneFlow resnet50 time: 48.3ms (= 9665.8ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 66.7ms (= 13347.9ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.38 (= 66.7ms / 48.3ms)

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

✔️ OneFlow resnet50 time: 128.9ms (= 12888.0ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 144.8ms (= 14478.5ms / 100, input_shape=[16, 3, 224, 224])
✔️ Relative speed: 1.12 (= 144.8ms / 128.9ms)

OneFlow resnet50 time: 77.3ms (= 7730.8ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 83.7ms (= 8366.0ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.08 (= 83.7ms / 77.3ms)

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

OneFlow resnet50 time: 43.2ms (= 8633.1ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 40.5ms (= 8108.0ms / 200, input_shape=[2, 3, 224, 224])
❌ Relative speed: 0.94 (= 40.5ms / 43.2ms)

OneFlow resnet50 time: 38.5ms (= 7706.8ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 37.9ms (= 7573.7ms / 200, input_shape=[1, 3, 224, 224])
✔️ Relative speed: 0.98 (= 37.9ms / 38.5ms)

OneFlow swin dataloader time: 0.267s (= 53.449s / 200, num_workers=1)
PyTorch swin dataloader time: 0.151s (= 30.210s / 200, num_workers=1)
Relative speed: 0.565 (= 0.151s / 0.267s)

OneFlow swin dataloader time: 0.069s (= 13.813s / 200, num_workers=4)
PyTorch swin dataloader time: 0.042s (= 8.337s / 200, num_workers=4)
Relative speed: 0.604 (= 0.042s / 0.069s)

OneFlow swin dataloader time: 0.037s (= 7.473s / 200, num_workers=8)
PyTorch swin dataloader time: 0.023s (= 4.516s / 200, num_workers=8)
Relative speed: 0.604 (= 0.023s / 0.037s)

✔️ OneFlow resnet50 time: 135.0ms (= 13502.5ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 160.4ms (= 16040.1ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.19 (= 160.4ms / 135.0ms)

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

OneFlow resnet50 time: 59.5ms (= 11892.1ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 77.2ms (= 15449.7ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.30 (= 77.2ms / 59.5ms)

OneFlow resnet50 time: 51.1ms (= 10224.4ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 76.0ms (= 15197.8ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.49 (= 76.0ms / 51.1ms)

OneFlow resnet50 time: 47.7ms (= 9537.3ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 75.4ms (= 15075.3ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.58 (= 75.4ms / 47.7ms)

@mergify mergify bot merged commit 0c129fe into master Apr 19, 2022
@mergify mergify bot deleted the fix_swin_dataloader_bug branch April 19, 2022 12:14
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.

3 participants