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

add is_cpu api #10172

Merged
merged 2 commits into from
Apr 20, 2023
Merged

add is_cpu api #10172

merged 2 commits into from
Apr 20, 2023

Conversation

hjchen2
Copy link
Contributor

@hjchen2 hjchen2 commented Apr 20, 2023

No description provided.

* Revert "transpose"

This reverts commit c29a8bf.

* fix normalization
@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

❌ OneFlow resnet50 time: 141.4ms (= 14135.0ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 147.4ms (= 14736.9ms / 100, input_shape=[16, 3, 224, 224])
❌ Relative speed: 1.04 (= 147.4ms / 141.4ms)

OneFlow resnet50 time: 83.0ms (= 8296.5ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 94.7ms (= 9471.1ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.14 (= 94.7ms / 83.0ms)

OneFlow resnet50 time: 51.8ms (= 10353.5ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 73.8ms (= 14765.3ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.43 (= 73.8ms / 51.8ms)

OneFlow resnet50 time: 34.2ms (= 6837.6ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 66.1ms (= 13218.7ms / 200, input_shape=[2, 3, 224, 224])
✔️ Relative speed: 1.93 (= 66.1ms / 34.2ms)

OneFlow resnet50 time: 26.3ms (= 5256.3ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 57.8ms (= 11565.8ms / 200, input_shape=[1, 3, 224, 224])
✔️ Relative speed: 2.20 (= 57.8ms / 26.3ms)

OneFlow swin dataloader time: 0.241s (= 48.175s / 200, num_workers=1)
PyTorch swin dataloader time: 0.149s (= 29.702s / 200, num_workers=1)
Relative speed: 0.617 (= 0.149s / 0.241s)

OneFlow swin dataloader time: 0.067s (= 13.481s / 200, num_workers=4)
PyTorch swin dataloader time: 0.041s (= 8.216s / 200, num_workers=4)
Relative speed: 0.609 (= 0.041s / 0.067s)

OneFlow swin dataloader time: 0.043s (= 8.638s / 200, num_workers=8)
PyTorch swin dataloader time: 0.022s (= 4.455s / 200, num_workers=8)
Relative speed: 0.516 (= 0.022s / 0.043s)

❌ OneFlow resnet50 time: 154.4ms (= 15443.1ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 164.2ms (= 16422.5ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
❌ Relative speed: 1.06 (= 164.2ms / 154.4ms)

OneFlow resnet50 time: 94.2ms (= 9420.4ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 104.6ms (= 10462.5ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.11 (= 104.6ms / 94.2ms)

OneFlow resnet50 time: 62.1ms (= 12422.8ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 79.8ms (= 15965.4ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.29 (= 79.8ms / 62.1ms)

OneFlow resnet50 time: 44.3ms (= 8860.0ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 71.4ms (= 14279.1ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.61 (= 71.4ms / 44.3ms)

OneFlow resnet50 time: 36.9ms (= 7387.8ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 66.9ms (= 13389.9ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.81 (= 66.9ms / 36.9ms)

@github-actions
Copy link
Contributor

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

@hjchen2 hjchen2 merged commit b9d012c into master Apr 20, 2023
@hjchen2 hjchen2 deleted the dev_add_is_cpu branch April 20, 2023 11:50
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