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

[part2]Remove singleclient outdated api #5568

Merged
merged 7 commits into from
Jul 25, 2021

Conversation

doombeaker
Copy link
Contributor

移除 single client 下的不必要的接口 part 2。
等 part1合并后,这个分支直接往 master 合并。

	modified:   ../oneflow/python/nn/modules/masked_select.py
	modified:   ../oneflow/python/ops/array_ops.py
@doombeaker doombeaker changed the title Remove singleclient outdated api part2 [part2]Remove singleclient outdated api Jul 22, 2021
Base automatically changed from remove_singleclient_outdated_api to master July 23, 2021 17:55
@jackalcooper
Copy link
Collaborator

为什么把summary去掉了?

import numpy as np


@oneflow_export("watch")
Copy link
Contributor

Choose a reason for hiding this comment

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

watch暂时不要删吧 @strint @clackhan @leaves-zwx @doombeaker ,lazy 新版的 nn.Graph 可能还用得到

Copy link
Contributor

Choose a reason for hiding this comment

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

也可以后面再加回来,因为没有下面的 hob 判断了(global_function 和 enable_eager)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这套代码 compatible_single_client_python 里还有一个。我不了解正在开发的 nn.Graph。不过我的朴素理解是,refine完的效果是:

  1. 原来静态图那套(watch这种),都在 compatible_single_client_python 里
  2. interface 1.0 的这套,都在 python 目录下

至于 interface 1.0 的接口和老接口有交集,就交给新接口的开发者自己去搬比较好……

@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

PyTorch resnet50 time: 137.6ms (= 6880.4ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 123.9ms (= 6196.1ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
Relative speed: 1.11 (= 137.6ms / 123.9ms)

PyTorch resnet50 time: 82.2ms (= 4109.9ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 72.0ms (= 3601.2ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
Relative speed: 1.14 (= 82.2ms / 72.0ms)

PyTorch resnet50 time: 56.1ms (= 2802.6ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 56.9ms (= 2847.2ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
Relative speed: 0.98 (= 56.1ms / 56.9ms)

PyTorch resnet50 time: 47.5ms (= 2376.6ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 50.8ms (= 2540.0ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
Relative speed: 0.94 (= 47.5ms / 50.8ms)

PyTorch resnet50 time: 41.1ms (= 2055.9ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 50.4ms (= 2520.7ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
Relative speed: 0.82 (= 41.1ms / 50.4ms)

@oneflow-ci-bot oneflow-ci-bot merged commit 89b5c21 into master Jul 25, 2021
@oneflow-ci-bot oneflow-ci-bot deleted the remove_singleclient_outdated_api_part2 branch July 25, 2021 15:57
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.

5 participants