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

fix requires_grad check and precison in higher derivative #8963

Merged
merged 13 commits into from
Aug 20, 2022

Conversation

pingzhuu
Copy link
Contributor

No description provided.

@small1945 small1945 self-requested a review August 19, 2022 07:06
@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

Speed stats:

@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

✔️ OneFlow resnet50 time: 128.7ms (= 12868.0ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 142.1ms (= 14214.7ms / 100, input_shape=[16, 3, 224, 224])
✔️ Relative speed: 1.10 (= 142.1ms / 128.7ms)

OneFlow resnet50 time: 75.5ms (= 7549.8ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 85.1ms (= 8511.9ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.13 (= 85.1ms / 75.5ms)

OneFlow resnet50 time: 49.3ms (= 9867.2ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 59.9ms (= 11982.1ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.21 (= 59.9ms / 49.3ms)

OneFlow resnet50 time: 36.7ms (= 7341.4ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 42.6ms (= 8516.2ms / 200, input_shape=[2, 3, 224, 224])
✔️ Relative speed: 1.16 (= 42.6ms / 36.7ms)

OneFlow resnet50 time: 28.7ms (= 5745.5ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 43.0ms (= 8604.6ms / 200, input_shape=[1, 3, 224, 224])
✔️ Relative speed: 1.50 (= 43.0ms / 28.7ms)

OneFlow swin dataloader time: 0.259s (= 51.850s / 200, num_workers=1)
PyTorch swin dataloader time: 0.153s (= 30.552s / 200, num_workers=1)
Relative speed: 0.589 (= 0.153s / 0.259s)

OneFlow swin dataloader time: 0.068s (= 13.692s / 200, num_workers=4)
PyTorch swin dataloader time: 0.040s (= 8.045s / 200, num_workers=4)
Relative speed: 0.588 (= 0.040s / 0.068s)

OneFlow swin dataloader time: 0.063s (= 12.534s / 200, num_workers=8)
PyTorch swin dataloader time: 0.022s (= 4.472s / 200, num_workers=8)
Relative speed: 0.357 (= 0.022s / 0.063s)

❌ OneFlow resnet50 time: 136.7ms (= 13673.5ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 162.0ms (= 16195.1ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.18 (= 162.0ms / 136.7ms)

OneFlow resnet50 time: 86.1ms (= 8607.3ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 103.5ms (= 10348.7ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.20 (= 103.5ms / 86.1ms)

OneFlow resnet50 time: 58.7ms (= 11749.9ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 84.6ms (= 16911.6ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.44 (= 84.6ms / 58.7ms)

OneFlow resnet50 time: 45.8ms (= 9160.9ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 69.0ms (= 13793.8ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.51 (= 69.0ms / 45.8ms)

OneFlow resnet50 time: 39.4ms (= 7874.6ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 75.2ms (= 15049.0ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.91 (= 75.2ms / 39.4ms)

@pingzhuu pingzhuu changed the title fix requires_grad check bug in higher derivative fix requires_grad check and precison in higher derivative Aug 20, 2022
@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

✔️ OneFlow resnet50 time: 128.3ms (= 12834.0ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 146.0ms (= 14600.0ms / 100, input_shape=[16, 3, 224, 224])
✔️ Relative speed: 1.14 (= 146.0ms / 128.3ms)

OneFlow resnet50 time: 75.4ms (= 7544.7ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 83.4ms (= 8337.4ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.11 (= 83.4ms / 75.4ms)

OneFlow resnet50 time: 48.8ms (= 9767.0ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 60.0ms (= 11992.9ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.23 (= 60.0ms / 48.8ms)

OneFlow resnet50 time: 36.3ms (= 7269.3ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 41.7ms (= 8343.6ms / 200, input_shape=[2, 3, 224, 224])
✔️ Relative speed: 1.15 (= 41.7ms / 36.3ms)

OneFlow resnet50 time: 28.3ms (= 5668.5ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 42.2ms (= 8443.7ms / 200, input_shape=[1, 3, 224, 224])
✔️ Relative speed: 1.49 (= 42.2ms / 28.3ms)

OneFlow swin dataloader time: 0.266s (= 53.226s / 200, num_workers=1)
PyTorch swin dataloader time: 0.153s (= 30.550s / 200, num_workers=1)
Relative speed: 0.574 (= 0.153s / 0.266s)

OneFlow swin dataloader time: 0.072s (= 14.473s / 200, num_workers=4)
PyTorch swin dataloader time: 0.041s (= 8.135s / 200, num_workers=4)
Relative speed: 0.562 (= 0.041s / 0.072s)

OneFlow swin dataloader time: 0.039s (= 7.810s / 200, num_workers=8)
PyTorch swin dataloader time: 0.022s (= 4.349s / 200, num_workers=8)
Relative speed: 0.557 (= 0.022s / 0.039s)

❌ OneFlow resnet50 time: 136.6ms (= 13661.5ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 163.1ms (= 16311.3ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.19 (= 163.1ms / 136.6ms)

OneFlow resnet50 time: 85.1ms (= 8508.6ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 102.2ms (= 10216.2ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.20 (= 102.2ms / 85.1ms)

OneFlow resnet50 time: 58.1ms (= 11610.2ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 90.0ms (= 17998.2ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.55 (= 90.0ms / 58.1ms)

OneFlow resnet50 time: 45.4ms (= 9075.3ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 69.5ms (= 13898.5ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.53 (= 69.5ms / 45.4ms)

OneFlow resnet50 time: 39.0ms (= 7800.2ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 67.8ms (= 13565.4ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.74 (= 67.8ms / 39.0ms)

@mergify mergify bot merged commit cd96862 into master Aug 20, 2022
@mergify mergify bot deleted the fix-higher_derivative_check_requires_grad_bug branch August 20, 2022 22:14
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