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

Align where op with torch #5850

Merged
merged 11 commits into from Aug 12, 2021
Merged

Align where op with torch #5850

merged 11 commits into from Aug 12, 2021

Conversation

BBuf
Copy link
Contributor

@BBuf BBuf commented Aug 12, 2021

支持where只传condition,和oneflow.nonzeros(condition, as_tuple=True)等价。和Pytorch对齐用法。

@BBuf BBuf requested a review from doombeaker August 12, 2021 05:48
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 12, 2021 08:31
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 12, 2021 10:25
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 12, 2021 12:13
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 12, 2021 13:46
@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

PyTorch resnet50 time: 139.9ms (= 6994.9ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 128.5ms (= 6422.7ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
Relative speed: 1.09 (= 139.9ms / 128.5ms)

PyTorch resnet50 time: 83.5ms (= 4177.1ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 74.5ms (= 3722.8ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
Relative speed: 1.12 (= 83.5ms / 74.5ms)

PyTorch resnet50 time: 58.2ms (= 2907.7ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 48.5ms (= 2423.6ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
Relative speed: 1.20 (= 58.2ms / 48.5ms)

PyTorch resnet50 time: 48.7ms (= 2436.4ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 40.2ms (= 2010.9ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
Relative speed: 1.21 (= 48.7ms / 40.2ms)

PyTorch resnet50 time: 44.0ms (= 2199.9ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 39.9ms (= 1994.0ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
Relative speed: 1.10 (= 44.0ms / 39.9ms)

@oneflow-ci-bot oneflow-ci-bot merged commit 326a19c into master Aug 12, 2021
@oneflow-ci-bot oneflow-ci-bot deleted the align_where_op_with_torch branch August 12, 2021 15:35
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

3 participants