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 module.zero_grad #7587

Merged
merged 14 commits into from
Feb 25, 2022
Merged

add module.zero_grad #7587

merged 14 commits into from
Feb 25, 2022

Conversation

Flowingsun007
Copy link
Contributor

No description provided.

@daquexian
Copy link
Contributor

添加一个测试用例吧

@Flowingsun007
Copy link
Contributor Author

添加一个测试用例吧

好的,我后面补一个

@Flowingsun007 Flowingsun007 enabled auto-merge (squash) February 24, 2022 10:17
@github-actions
Copy link
Contributor

Code got formatted by CI. Please request CI again if you still want to have this PR merged. If the PR is from a forked repo, please download the patch files from the GitHub Actions web page and apply them locally.

@Flowingsun007 Flowingsun007 requested review from oneflow-ci-bot and removed request for oneflow-ci-bot February 24, 2022 10:25
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot February 24, 2022 10:44
@Flowingsun007 Flowingsun007 added enhancement and removed bottleneck blocking another feature/PR labels Feb 24, 2022
@Flowingsun007 Flowingsun007 requested review from oneflow-ci-bot and removed request for oneflow-ci-bot February 24, 2022 12:22
@oneflow-ci-bot oneflow-ci-bot removed their request for review February 24, 2022 12:23
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot February 24, 2022 14:14
@oneflow-ci-bot oneflow-ci-bot removed their request for review February 24, 2022 17:18
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot February 24, 2022 19:38
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot February 24, 2022 23:55
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot February 25, 2022 02:18
@oneflow-ci-bot oneflow-ci-bot removed their request for review February 25, 2022 04:11
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot February 25, 2022 07:30
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot February 25, 2022 09:22
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot February 25, 2022 11:13
@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

✔️ OneFlow resnet50 time: 128.7ms (= 12868.1ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 137.5ms (= 13745.9ms / 100, input_shape=[16, 3, 224, 224])
✔️ Relative speed: 1.07 (= 137.5ms / 128.7ms)

✔️ OneFlow resnet50 time: 76.9ms (= 7693.7ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 84.8ms (= 8478.2ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.10 (= 84.8ms / 76.9ms)

OneFlow resnet50 time: 53.2ms (= 10635.3ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 56.4ms (= 11271.2ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.06 (= 56.4ms / 53.2ms)

OneFlow resnet50 time: 44.2ms (= 8847.0ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 49.1ms (= 9828.4ms / 200, input_shape=[2, 3, 224, 224])
✔️ Relative speed: 1.11 (= 49.1ms / 44.2ms)

OneFlow resnet50 time: 38.1ms (= 7610.5ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 38.9ms (= 7776.2ms / 200, input_shape=[1, 3, 224, 224])
✔️ Relative speed: 1.02 (= 38.9ms / 38.1ms)

✔️ OneFlow resnet50 time: 142.8ms (= 14276.3ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 162.6ms (= 16260.6ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.14 (= 162.6ms / 142.8ms)

OneFlow resnet50 time: 90.2ms (= 9020.8ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 101.4ms (= 10138.3ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.12 (= 101.4ms / 90.2ms)

OneFlow resnet50 time: 61.9ms (= 12382.8ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 75.8ms (= 15169.0ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.23 (= 75.8ms / 61.9ms)

OneFlow resnet50 time: 53.8ms (= 10753.8ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 66.4ms (= 13277.3ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.23 (= 66.4ms / 53.8ms)

OneFlow resnet50 time: 46.6ms (= 9326.5ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 58.0ms (= 11598.8ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.24 (= 58.0ms / 46.6ms)

@Flowingsun007 Flowingsun007 merged commit 1893a12 into master Feb 25, 2022
@Flowingsun007 Flowingsun007 deleted the add_module_zero_grad_fn branch February 25, 2022 16:13
marigoold pushed a commit that referenced this pull request Mar 15, 2022
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.

4 participants