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

some op test #6095

Merged
merged 8 commits into from
Sep 3, 2021
Merged

some op test #6095

merged 8 commits into from
Sep 3, 2021

Conversation

xiezipeng-ML
Copy link
Contributor

  • oneflow.cat
  • oneflow.nn.Dropout
  • oneflow.new_ones
  • oneflow.Tensor.diag
  • oneflow.diag

return m(x)

@autotest()
def test_dropout_p1(test_case):
Copy link
Contributor

Choose a reason for hiding this comment

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

测一下p!=0&&p!=1的随机值

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这个dropout随机drop其tensor,所以没办法确保pytorch和oneflow的tensor被相同的drop,只能测试p=0和p=1的情况

@oneflow-ci-bot oneflow-ci-bot self-requested a review September 3, 2021 03:02
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot September 3, 2021 05:18
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot September 3, 2021 06:31
@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2021

Speed stats:
GPU Name: GeForce GTX 1080 

OneFlow resnet50 time: 128.6ms (= 6431.5ms / 50, input_shape=[16, 3, 224, 224])
PyTorch resnet50 time: 141.1ms (= 7056.6ms / 50, input_shape=[16, 3, 224, 224])
Relative speed: 1.10 (= 141.1ms / 128.6ms)

OneFlow resnet50 time: 74.8ms (= 3737.9ms / 50, input_shape=[8, 3, 224, 224])
PyTorch resnet50 time: 84.9ms (= 4247.4ms / 50, input_shape=[8, 3, 224, 224])
Relative speed: 1.14 (= 84.9ms / 74.8ms)

OneFlow resnet50 time: 48.8ms (= 2441.2ms / 50, input_shape=[4, 3, 224, 224])
PyTorch resnet50 time: 56.9ms (= 2844.7ms / 50, input_shape=[4, 3, 224, 224])
Relative speed: 1.17 (= 56.9ms / 48.8ms)

OneFlow resnet50 time: 41.9ms (= 2097.3ms / 50, input_shape=[2, 3, 224, 224])
PyTorch resnet50 time: 46.8ms (= 2341.4ms / 50, input_shape=[2, 3, 224, 224])
Relative speed: 1.12 (= 46.8ms / 41.9ms)

OneFlow resnet50 time: 41.3ms (= 2064.7ms / 50, input_shape=[1, 3, 224, 224])
PyTorch resnet50 time: 44.3ms (= 2216.8ms / 50, input_shape=[1, 3, 224, 224])
Relative speed: 1.07 (= 44.3ms / 41.3ms)

OneFlow resnet50 time: 154.0ms (= 7698.9ms / 50, input_shape=[16, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 166.5ms (= 8326.6ms / 50, input_shape=[16, 3, 224, 224], ddp, world size=2)
Relative speed: 1.08 (= 166.5ms / 154.0ms)

OneFlow resnet50 time: 96.9ms (= 4843.3ms / 50, input_shape=[8, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 107.5ms (= 5372.8ms / 50, input_shape=[8, 3, 224, 224], ddp, world size=2)
Relative speed: 1.11 (= 107.5ms / 96.9ms)

OneFlow resnet50 time: 67.7ms (= 3386.1ms / 50, input_shape=[4, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 83.1ms (= 4153.5ms / 50, input_shape=[4, 3, 224, 224], ddp, world size=2)
Relative speed: 1.23 (= 83.1ms / 67.7ms)

OneFlow resnet50 time: 61.7ms (= 3086.3ms / 50, input_shape=[2, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 69.7ms (= 3483.3ms / 50, input_shape=[2, 3, 224, 224], ddp, world size=2)
Relative speed: 1.13 (= 69.7ms / 61.7ms)

OneFlow resnet50 time: 60.1ms (= 3006.9ms / 50, input_shape=[1, 3, 224, 224], ddp, world size=2)
PyTorch resnet50 time: 66.1ms (= 3305.1ms / 50, input_shape=[1, 3, 224, 224], ddp, world size=2)
Relative speed: 1.10 (= 66.1ms / 60.1ms)

@oneflow-ci-bot oneflow-ci-bot removed their request for review September 3, 2021 07:40
@oneflow-ci-bot oneflow-ci-bot merged commit d92dcfb into master Sep 3, 2021
@oneflow-ci-bot oneflow-ci-bot deleted the op_test branch September 3, 2021 07:41
@xiezipeng-ML xiezipeng-ML mentioned this pull request Oct 15, 2021
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