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 check meta args in to global api #8027

Merged
merged 64 commits into from
Apr 24, 2022

Conversation

clackhan
Copy link
Contributor

@clackhan clackhan commented Apr 15, 2022

根据 https://github.com/Oneflow-Inc/OneTeam/issues/1311#issuecomment-1098711629 讨论结果,添加tensor.local_to_global/tensor.global_to_global接口,并给tensor.to_global接口添加check_meta参数。

  • tensor.local_to_global

image

  • tensor.global_to_global

image

  • tensor.to_global

image

image

clackhan and others added 30 commits March 8, 2022 11:21
…add_local_to_global_balanced_override_env_var
@clackhan clackhan requested review from oneflow-ci-bot and removed request for oneflow-ci-bot April 21, 2022 03:14
@clackhan clackhan requested review from oneflow-ci-bot and removed request for oneflow-ci-bot April 22, 2022 07:54
@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

✔️ OneFlow resnet50 time: 128.4ms (= 12837.9ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 149.9ms (= 14987.2ms / 100, input_shape=[16, 3, 224, 224])
✔️ Relative speed: 1.17 (= 149.9ms / 128.4ms)

OneFlow resnet50 time: 80.2ms (= 8018.0ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 85.9ms (= 8588.7ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.07 (= 85.9ms / 80.2ms)

OneFlow resnet50 time: 53.9ms (= 10781.5ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 58.4ms (= 11684.6ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.08 (= 58.4ms / 53.9ms)

OneFlow resnet50 time: 45.1ms (= 9016.7ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 44.4ms (= 8883.6ms / 200, input_shape=[2, 3, 224, 224])
✔️ Relative speed: 0.99 (= 44.4ms / 45.1ms)

OneFlow resnet50 time: 41.0ms (= 8200.9ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 35.4ms (= 7075.7ms / 200, input_shape=[1, 3, 224, 224])
❌ Relative speed: 0.86 (= 35.4ms / 41.0ms)

OneFlow swin dataloader time: 0.258s (= 51.569s / 200, num_workers=1)
PyTorch swin dataloader time: 0.153s (= 30.661s / 200, num_workers=1)
Relative speed: 0.595 (= 0.153s / 0.258s)

OneFlow swin dataloader time: 0.069s (= 13.759s / 200, num_workers=4)
PyTorch swin dataloader time: 0.042s (= 8.367s / 200, num_workers=4)
Relative speed: 0.608 (= 0.042s / 0.069s)

OneFlow swin dataloader time: 0.038s (= 7.683s / 200, num_workers=8)
PyTorch swin dataloader time: 0.022s (= 4.473s / 200, num_workers=8)
Relative speed: 0.582 (= 0.022s / 0.038s)

❌ OneFlow resnet50 time: 140.4ms (= 14044.5ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 160.9ms (= 16086.0ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.15 (= 160.9ms / 140.4ms)

OneFlow resnet50 time: 86.0ms (= 8601.1ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 101.2ms (= 10119.0ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.18 (= 101.2ms / 86.0ms)

OneFlow resnet50 time: 65.3ms (= 13050.8ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 80.8ms (= 16161.7ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.24 (= 80.8ms / 65.3ms)

OneFlow resnet50 time: 54.6ms (= 10927.5ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 69.9ms (= 13974.9ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.28 (= 69.9ms / 54.6ms)

OneFlow resnet50 time: 49.6ms (= 9923.8ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 67.6ms (= 13514.5ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.36 (= 67.6ms / 49.6ms)

@github-actions
Copy link
Contributor

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

@clackhan clackhan requested review from oneflow-ci-bot and removed request for oneflow-ci-bot April 24, 2022 00:16
@github-actions
Copy link
Contributor

Speed stats:

@github-actions
Copy link
Contributor

Speed stats:

@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

✔️ OneFlow resnet50 time: 128.5ms (= 12852.3ms / 100, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 150.5ms (= 15046.8ms / 100, input_shape=[16, 3, 224, 224])
✔️ Relative speed: 1.17 (= 150.5ms / 128.5ms)

OneFlow resnet50 time: 80.6ms (= 8059.1ms / 100, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 86.0ms (= 8601.1ms / 100, input_shape=[8, 3, 224, 224])
✔️ Relative speed: 1.07 (= 86.0ms / 80.6ms)

OneFlow resnet50 time: 53.8ms (= 10768.9ms / 200, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 61.4ms (= 12285.5ms / 200, input_shape=[4, 3, 224, 224])
✔️ Relative speed: 1.14 (= 61.4ms / 53.8ms)

OneFlow resnet50 time: 43.4ms (= 8682.2ms / 200, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 41.0ms (= 8196.1ms / 200, input_shape=[2, 3, 224, 224])
❌ Relative speed: 0.94 (= 41.0ms / 43.4ms)

OneFlow resnet50 time: 42.3ms (= 8450.2ms / 200, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 33.8ms (= 6754.6ms / 200, input_shape=[1, 3, 224, 224])
❌ Relative speed: 0.80 (= 33.8ms / 42.3ms)

OneFlow swin dataloader time: 0.257s (= 51.403s / 200, num_workers=1)
PyTorch swin dataloader time: 0.150s (= 29.916s / 200, num_workers=1)
Relative speed: 0.582 (= 0.150s / 0.257s)

OneFlow swin dataloader time: 0.066s (= 13.167s / 200, num_workers=4)
PyTorch swin dataloader time: 0.042s (= 8.365s / 200, num_workers=4)
Relative speed: 0.635 (= 0.042s / 0.066s)

OneFlow swin dataloader time: 0.037s (= 7.476s / 200, num_workers=8)
PyTorch swin dataloader time: 0.022s (= 4.463s / 200, num_workers=8)
Relative speed: 0.597 (= 0.022s / 0.037s)

✔️ OneFlow resnet50 time: 136.0ms (= 13599.8ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 162.5ms (= 16253.3ms / 100, input_shape=[16, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.20 (= 162.5ms / 136.0ms)

OneFlow resnet50 time: 89.6ms (= 8957.1ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 101.3ms (= 10133.0ms / 100, input_shape=[8, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.13 (= 101.3ms / 89.6ms)

OneFlow resnet50 time: 63.1ms (= 12625.8ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 79.2ms (= 15841.9ms / 200, input_shape=[4, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.25 (= 79.2ms / 63.1ms)

OneFlow resnet50 time: 55.6ms (= 11119.4ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 80.8ms (= 16166.0ms / 200, input_shape=[2, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.45 (= 80.8ms / 55.6ms)

OneFlow resnet50 time: 50.9ms (= 10176.4ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 68.2ms (= 13636.8ms / 200, input_shape=[1, 3, 224, 224], ddp, world size=2)
✔️ Relative speed: 1.34 (= 68.2ms / 50.9ms)

@github-actions
Copy link
Contributor

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

@mergify mergify bot merged commit fa88236 into master Apr 24, 2022
@mergify mergify bot deleted the add_check_meta_args_in_to_global_api branch April 24, 2022 09:19
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