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

Remove GpuDeviceNum #8166

Merged
merged 12 commits into from
May 10, 2022
Merged

Remove GpuDeviceNum #8166

merged 12 commits into from
May 10, 2022

Conversation

liujuncheng
Copy link
Collaborator

移除 GpuDeviceNum 的使用,改为依赖实际的设备数量,避免和具体的设备类型耦合

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

Speed stats:
GPU Name: NVIDIA GeForce GTX 1080 

✔️ OneFlow resnet50 time: 129.0ms (= 12899.3ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 142.3ms (= 14233.3ms / 100, input_shape=[16, 3, 224, 224])
✔️ Relative speed: 1.10 (= 142.3ms / 129.0ms)

OneFlow resnet50 time: 76.6ms (= 7661.0ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 84.3ms (= 8427.1ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.10 (= 84.3ms / 76.6ms)

OneFlow resnet50 time: 51.6ms (= 10324.5ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 58.6ms (= 11729.9ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.14 (= 58.6ms / 51.6ms)

OneFlow resnet50 time: 43.3ms (= 8663.1ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 39.2ms (= 7834.7ms / 200, input_shape=[2, 3, 224, 224])
❌ Relative speed: 0.90 (= 39.2ms / 43.3ms)

OneFlow resnet50 time: 38.7ms (= 7748.6ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 43.8ms (= 8764.0ms / 200, input_shape=[1, 3, 224, 224])
✔️ Relative speed: 1.13 (= 43.8ms / 38.7ms)

OneFlow swin dataloader time: 0.259s (= 51.781s / 200, num_workers=1)
PyTorch swin dataloader time: 0.151s (= 30.118s / 200, num_workers=1)
Relative speed: 0.582 (= 0.151s / 0.259s)

OneFlow swin dataloader time: 0.066s (= 13.205s / 200, num_workers=4)
PyTorch swin dataloader time: 0.043s (= 8.598s / 200, num_workers=4)
Relative speed: 0.651 (= 0.043s / 0.066s)

OneFlow swin dataloader time: 0.038s (= 7.601s / 200, num_workers=8)
PyTorch swin dataloader time: 0.022s (= 4.482s / 200, num_workers=8)
Relative speed: 0.590 (= 0.022s / 0.038s)

❌ OneFlow resnet50 time: 145.2ms (= 14524.9ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 176.1ms (= 17607.9ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.21 (= 176.1ms / 145.2ms)

OneFlow resnet50 time: 97.3ms (= 9730.6ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 109.8ms (= 10979.0ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.13 (= 109.8ms / 97.3ms)

OneFlow resnet50 time: 76.7ms (= 15347.5ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 99.4ms (= 19870.2ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.29 (= 99.4ms / 76.7ms)

OneFlow resnet50 time: 65.3ms (= 13062.1ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 74.5ms (= 14908.1ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
❌ Relative speed: 1.14 (= 74.5ms / 65.3ms)

OneFlow resnet50 time: 55.1ms (= 11024.1ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 69.1ms (= 13816.6ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.25 (= 69.1ms / 55.1ms)

@mergify mergify bot merged commit e654dcc into master May 10, 2022
@mergify mergify bot deleted the dev_rm_gpu_device_num branch May 10, 2022 21:28
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.

None yet

5 participants