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

Support BN affine=False #7755

Merged
merged 12 commits into from
Mar 12, 2022
Merged

Support BN affine=False #7755

merged 12 commits into from
Mar 12, 2022

Conversation

MARD1NO
Copy link
Contributor

@MARD1NO MARD1NO commented Mar 11, 2022

No description provided.

Copy link
Contributor

@simonJJJ simonJJJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

加一个单测如何?

@MARD1NO MARD1NO marked this pull request as ready for review March 11, 2022 07:28
@MARD1NO MARD1NO requested a review from oneflow-ci-bot March 11, 2022 07:29
@github-actions
Copy link
Contributor

Speed stats:

@MARD1NO MARD1NO requested review from oneflow-ci-bot and removed request for oneflow-ci-bot March 11, 2022 10:41
@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

✔️ OneFlow resnet50 time: 128.6ms (= 12859.3ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 138.7ms (= 13867.3ms / 100, input_shape=[16, 3, 224, 224])
✔️ Relative speed: 1.08 (= 138.7ms / 128.6ms)

✔️ OneFlow resnet50 time: 76.9ms (= 7692.6ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 86.1ms (= 8609.2ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.12 (= 86.1ms / 76.9ms)

OneFlow resnet50 time: 52.8ms (= 10559.6ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 58.7ms (= 11735.0ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.11 (= 58.7ms / 52.8ms)

OneFlow resnet50 time: 42.4ms (= 8475.0ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 52.4ms (= 10481.7ms / 200, input_shape=[2, 3, 224, 224])
✔️ Relative speed: 1.24 (= 52.4ms / 42.4ms)

OneFlow resnet50 time: 39.8ms (= 7963.7ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 38.7ms (= 7735.6ms / 200, input_shape=[1, 3, 224, 224])
✔️ Relative speed: 0.97 (= 38.7ms / 39.8ms)

✔️ OneFlow resnet50 time: 142.3ms (= 14230.3ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 164.9ms (= 16488.6ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.16 (= 164.9ms / 142.3ms)

OneFlow resnet50 time: 88.9ms (= 8885.5ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 108.2ms (= 10822.4ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.22 (= 108.2ms / 88.9ms)

OneFlow resnet50 time: 61.5ms (= 12293.2ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 79.8ms (= 15968.0ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.30 (= 79.8ms / 61.5ms)

OneFlow resnet50 time: 52.5ms (= 10497.2ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 67.2ms (= 13444.9ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.28 (= 67.2ms / 52.5ms)

OneFlow resnet50 time: 47.9ms (= 9572.2ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 62.3ms (= 12460.4ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.30 (= 62.3ms / 47.9ms)

@github-actions
Copy link
Contributor

CI failed when running job: cpu-misc. PR label automerge has been removed

@MARD1NO MARD1NO removed the request for review from oneflow-ci-bot March 12, 2022 01:11
@MARD1NO MARD1NO requested a review from oneflow-ci-bot March 12, 2022 01:11
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot March 12, 2022 05:47
@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

✔️ OneFlow resnet50 time: 128.6ms (= 12863.0ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 138.8ms (= 13878.6ms / 100, input_shape=[16, 3, 224, 224])
✔️ Relative speed: 1.08 (= 138.8ms / 128.6ms)

✔️ OneFlow resnet50 time: 76.6ms (= 7661.6ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 88.6ms (= 8863.6ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.16 (= 88.6ms / 76.6ms)

OneFlow resnet50 time: 53.5ms (= 10695.8ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 61.7ms (= 12349.7ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.15 (= 61.7ms / 53.5ms)

OneFlow resnet50 time: 43.3ms (= 8651.5ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 49.6ms (= 9926.3ms / 200, input_shape=[2, 3, 224, 224])
✔️ Relative speed: 1.15 (= 49.6ms / 43.3ms)

OneFlow resnet50 time: 39.0ms (= 7793.2ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 38.9ms (= 7784.9ms / 200, input_shape=[1, 3, 224, 224])
✔️ Relative speed: 1.00 (= 38.9ms / 39.0ms)

✔️ OneFlow resnet50 time: 142.4ms (= 14235.9ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 163.3ms (= 16334.4ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.15 (= 163.3ms / 142.4ms)

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

OneFlow resnet50 time: 61.7ms (= 12347.5ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 84.6ms (= 16925.1ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.37 (= 84.6ms / 61.7ms)

OneFlow resnet50 time: 52.1ms (= 10422.7ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 67.3ms (= 13467.6ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.29 (= 67.3ms / 52.1ms)

OneFlow resnet50 time: 52.2ms (= 10436.0ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 62.8ms (= 12567.0ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.20 (= 62.8ms / 52.2ms)

@mergify mergify bot merged commit cfe3d53 into master Mar 12, 2022
@mergify mergify bot deleted the dev_affine_bn branch March 12, 2022 11:37
marigoold pushed a commit that referenced this pull request Mar 15, 2022
* support affine bn

* Add just for device

* remove header file

* add unittest and check

* add return

* fix check

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
wyg1997 pushed a commit that referenced this pull request Mar 17, 2022
* support affine bn

* Add just for device

* remove header file

* add unittest and check

* add return

* fix check

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants