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

Refacotr maximum minimum py2cpp #5724

Merged
merged 35 commits into from
Aug 5, 2021

Conversation

clackhan
Copy link
Contributor

@clackhan clackhan commented Aug 4, 2021

No description provided.

hjchen2 and others added 30 commits August 2, 2021 23:21
…flow-Inc/oneflow into refacotr_maximum_minimum__py2cpp

Conflicts:
	oneflow/api/python/functional/python_functions.cpp
	python/oneflow/nn/modules/math_ops.py
@@ -236,6 +236,56 @@ py::object PyDiv(py::args py_args, py::kwargs py_kwargs) {
return py::cast(result.GetPtrOrThrow());
}

py::object PyMaximum(py::args py_args, py::kwargs py_kwargs) {
// "Add(Tensor x, Tensor y)"
Copy link
Contributor

Choose a reason for hiding this comment

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

这个注释要更换下(如果需要给 maximum 注释 signature 提示)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已更改

}

py::object PyMinimum(py::args py_args, py::kwargs py_kwargs) {
// "Add(Tensor x, Tensor y)"
Copy link
Contributor

Choose a reason for hiding this comment

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

同上,注释要改一下

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已更改

Base automatically changed from dev_refactor_mul_and_div_api to master August 4, 2021 14:26
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 5, 2021 02:12
@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2021

Speed stats:
GPU Name: GeForce GTX 1080 

PyTorch resnet50 time: 137.3ms (= 6864.3ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 125.7ms (= 6284.2ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
Relative speed: 1.09 (= 137.3ms / 125.7ms)

PyTorch resnet50 time: 81.4ms (= 4070.0ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 72.9ms (= 3646.8ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
Relative speed: 1.12 (= 81.4ms / 72.9ms)

PyTorch resnet50 time: 58.0ms (= 2898.6ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 47.1ms (= 2354.9ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
Relative speed: 1.23 (= 58.0ms / 47.1ms)

PyTorch resnet50 time: 46.7ms (= 2335.7ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 45.9ms (= 2293.9ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
Relative speed: 1.02 (= 46.7ms / 45.9ms)

PyTorch resnet50 time: 43.2ms (= 2159.1ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 52.2ms (= 2610.7ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
Relative speed: 0.83 (= 43.2ms / 52.2ms)

@oneflow-ci-bot oneflow-ci-bot removed their request for review August 5, 2021 04:24
@oneflow-ci-bot oneflow-ci-bot merged commit 9308f54 into master Aug 5, 2021
@oneflow-ci-bot oneflow-ci-bot deleted the refacotr_maximum_minimum__py2cpp branch August 5, 2021 04:25
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

5 participants