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

SliceOp support S->S, not support S->P(TODO) #8521

Merged
merged 8 commits into from
Jun 29, 2022
Merged

Conversation

wyg1997
Copy link
Contributor

@wyg1997 wyg1997 commented Jun 29, 2022

SliceOp 先只支持 S->S(FullSlice),P->P,B->B,先解决 https://github.com/Oneflow-Inc/OneTeam/issues/1514#issuecomment-1169585270 中的推导问题。

后续再支持 S->P。

@wyg1997 wyg1997 requested review from hjchen2 and strint June 29, 2022 08:15
@github-actions
Copy link
Contributor

Static analysis with clang failed. PR label automerge has been removed

@wyg1997 wyg1997 requested review from oneflow-ci-bot and removed request for oneflow-ci-bot June 29, 2022 12:04
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot June 29, 2022 21:03
@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

Speed stats:
GPU Name: NVIDIA GeForce GTX 1080 

❌ OneFlow resnet50 time: 129.3ms (= 12926.3ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 143.6ms (= 14361.4ms / 100, input_shape=[16, 3, 224, 224])
✔️ Relative speed: 1.11 (= 143.6ms / 129.3ms)

OneFlow resnet50 time: 75.7ms (= 7568.5ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 85.6ms (= 8562.0ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.13 (= 85.6ms / 75.7ms)

OneFlow resnet50 time: 47.7ms (= 9542.8ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 53.0ms (= 10601.1ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.11 (= 53.0ms / 47.7ms)

OneFlow resnet50 time: 39.9ms (= 7988.5ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 45.0ms (= 8994.0ms / 200, input_shape=[2, 3, 224, 224])
✔️ Relative speed: 1.13 (= 45.0ms / 39.9ms)

OneFlow resnet50 time: 35.5ms (= 7091.2ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 42.1ms (= 8417.4ms / 200, input_shape=[1, 3, 224, 224])
✔️ Relative speed: 1.19 (= 42.1ms / 35.5ms)

OneFlow swin dataloader time: 0.268s (= 53.518s / 200, num_workers=1)
PyTorch swin dataloader time: 0.151s (= 30.149s / 200, num_workers=1)
Relative speed: 0.563 (= 0.151s / 0.268s)

OneFlow swin dataloader time: 0.075s (= 14.975s / 200, num_workers=4)
PyTorch swin dataloader time: 0.042s (= 8.430s / 200, num_workers=4)
Relative speed: 0.563 (= 0.042s / 0.075s)

OneFlow swin dataloader time: 0.062s (= 12.313s / 200, num_workers=8)
PyTorch swin dataloader time: 0.022s (= 4.383s / 200, num_workers=8)
Relative speed: 0.356 (= 0.022s / 0.062s)

❌ OneFlow resnet50 time: 144.9ms (= 14488.3ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 170.1ms (= 17011.8ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.17 (= 170.1ms / 144.9ms)

OneFlow resnet50 time: 93.2ms (= 9319.3ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 113.6ms (= 11360.1ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.22 (= 113.6ms / 93.2ms)

OneFlow resnet50 time: 69.6ms (= 13925.9ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 87.7ms (= 17531.0ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.26 (= 87.7ms / 69.6ms)

OneFlow resnet50 time: 56.9ms (= 11389.2ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 74.5ms (= 14891.4ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.31 (= 74.5ms / 56.9ms)

OneFlow resnet50 time: 51.4ms (= 10272.8ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 68.2ms (= 13647.9ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.33 (= 68.2ms / 51.4ms)

@mergify mergify bot merged commit f7c0f3a into master Jun 29, 2022
@mergify mergify bot deleted the fix-slice_op_support_s2s branch June 29, 2022 23:59
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