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

Restruct MathOps AutoTest #5654

Merged
merged 41 commits into from
Jul 29, 2021
Merged

Restruct MathOps AutoTest #5654

merged 41 commits into from
Jul 29, 2021

Conversation

BBuf
Copy link
Contributor

@BBuf BBuf commented Jul 29, 2021

把所有的三角函数替换为新版自动测试框架,删除之前的手动测试。

所有三角函数的单独测试文件均删除,移动到math_ops的测试文件中。

另外修复了自动测试框架制定Tensor的数值范围失效的BUG,新增了避免死循环的循环次数检查。

新增了一些其它自动测试例子,Conv2d,Floor等等。

BBuf and others added 30 commits June 29, 2021 21:41
Co-authored-by: oneflow-ci-bot <69100618+oneflow-ci-bot@users.noreply.github.com>
bias=random() | nothing(),
padding_mode=constant("zeros") | nothing(),
)
m = torch.nn.Conv2d(in_channels=channels, out_channels=random(1, 129), kernel_size=random(1, 4),
Copy link
Contributor

Choose a reason for hiding this comment

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

out channels这里要不要设置小点,跑起来快点?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好的

return z

@autotest()
def test_atanh_tensor_with_random_data(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.

和833行测试重复了,删除下

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好的

@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot July 29, 2021 10:13
@oneflow-ci-bot oneflow-ci-bot removed their request for review July 29, 2021 12:24
@BBuf BBuf requested a review from oneflow-ci-bot July 29, 2021 15:18
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot July 29, 2021 17:09
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot July 29, 2021 19:38
@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

PyTorch resnet50 time: 140.6ms (= 7030.7ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 126.2ms (= 6309.0ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
Relative speed: 1.11 (= 140.6ms / 126.2ms)

PyTorch resnet50 time: 83.7ms (= 4185.1ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 73.7ms (= 3686.7ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
Relative speed: 1.14 (= 83.7ms / 73.7ms)

PyTorch resnet50 time: 57.2ms (= 2861.9ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 47.7ms (= 2383.1ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
Relative speed: 1.20 (= 57.2ms / 47.7ms)

PyTorch resnet50 time: 49.1ms (= 2456.9ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 41.7ms (= 2087.3ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
Relative speed: 1.18 (= 49.1ms / 41.7ms)

PyTorch resnet50 time: 43.6ms (= 2181.0ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 48.2ms (= 2410.9ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
Relative speed: 0.90 (= 43.6ms / 48.2ms)

@oneflow-ci-bot oneflow-ci-bot removed their request for review July 29, 2021 21:24
@oneflow-ci-bot oneflow-ci-bot merged commit 3e3fef5 into master Jul 29, 2021
@oneflow-ci-bot oneflow-ci-bot deleted the add_new_autotest_part4 branch July 29, 2021 21:26
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