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 all_gather and fix bug of multi rank doctest #6189

Merged
merged 8 commits into from
Sep 9, 2021

Conversation

liufengwei0103
Copy link
Contributor

add all_gather and fix bug of multi rank doctest

assert tensor.device.index == flow.env.get_local_rank()
assert tensor.is_local
shape = tensor.shape
tensor = tensor.expand([1] + [shape[i] for i in range(tensor.ndim)])
Copy link
Contributor

Choose a reason for hiding this comment

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

可以直接 [1] + list(tensor.shape)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

可以直接 [1] + list(tensor.shape)

已修改

@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot September 9, 2021 07:10
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot September 9, 2021 07:53
@github-actions
Copy link
Contributor

github-actions bot commented Sep 9, 2021

Speed stats:
GPU Name: GeForce GTX 1080 

OneFlow resnet50 time: 128.5ms (= 6426.0ms / 50, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 143.1ms (= 7154.3ms / 50, input_shape=[16, 3, 224, 224])
Relative speed: 1.11 (= 143.1ms / 128.5ms)

OneFlow resnet50 time: 74.4ms (= 3720.5ms / 50, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 85.1ms (= 4253.5ms / 50, input_shape=[8, 3, 224, 224])
Relative speed: 1.14 (= 85.1ms / 74.4ms)

OneFlow resnet50 time: 49.6ms (= 2481.5ms / 50, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 59.0ms (= 2951.5ms / 50, input_shape=[4, 3, 224, 224])
Relative speed: 1.19 (= 59.0ms / 49.6ms)

OneFlow resnet50 time: 43.8ms (= 2188.2ms / 50, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 49.6ms (= 2479.7ms / 50, input_shape=[2, 3, 224, 224])
Relative speed: 1.13 (= 49.6ms / 43.8ms)

OneFlow resnet50 time: 34.8ms (= 1740.1ms / 50, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 39.1ms (= 1953.1ms / 50, input_shape=[1, 3, 224, 224])
Relative speed: 1.12 (= 39.1ms / 34.8ms)

@oneflow-ci-bot oneflow-ci-bot merged commit 37da9ba into master Sep 9, 2021
@oneflow-ci-bot oneflow-ci-bot deleted the add_allgather branch September 9, 2021 09:36
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.

None yet

4 participants