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

[part10]Remove singleclient outdated api #5756

Merged
merged 11 commits into from
Aug 9, 2021

Conversation

luqiang-guo
Copy link
Contributor

@luqiang-guo luqiang-guo commented Aug 5, 2021

删除multiclient 下single client的接口
总删除列表

此pr完成了一部分接口清理。

  • FixedTensorDef
  • MirroredTensorDef
  • inter_job_reuse_mem_strategy
  • acc
  • hierarchical_parallel_cast
  • pack
  • parallel_cast
  • unpack
  • device_prior_placement
  • fixed_placement
  • InitEagerGlobalSession
  • eager_execution_enabled

@luqiang-guo luqiang-guo requested review from doombeaker and oneflow-ci-bot and removed request for oneflow-ci-bot August 6, 2021 11:12
@luqiang-guo luqiang-guo requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 6, 2021 12:06
func = enable_if.unique([pack])
return func(input, pack_num, name=name)


@enable_if.condition(hob.in_global_mode & ~hob.eager_execution_enabled)
def pack(input, pack_num, name=None):
Copy link
Contributor

Choose a reason for hiding this comment

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

这个也没用了吧

max_acc_num: int,
name: Optional[str] = None,
) -> oneflow._oneflow_internal.BlobDesc:
func = enable_if.unique([acc])
Copy link
Contributor

Choose a reason for hiding this comment

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

这种api_acc包一层的接口,都可以把对应的函数删除

Copy link
Contributor

Choose a reason for hiding this comment

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

后面几个pr都是同样的问题,一起处理一下吧

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好的我一起处理

Comment on lines -257 to -258
class DeprecatedFixedTensorDef(FixedTensorDef):
def __init__(self, *args, **kwargs):
Copy link
Contributor

Choose a reason for hiding this comment

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

FixedTensorDef和下面的MirroredTensorDef可以直接删除

grad_parallel_distribution: Sequence[str] = None,
name: Optional[str] = None,
) -> oneflow._oneflow_internal.BlobDesc:
func = enable_if.unique([hierarchical_parallel_cast])
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.

已经清理干净

@chengtbf chengtbf removed the request for review from oneflow-ci-bot August 6, 2021 16:29
.RemoteBlobList()[0]
)


def api_parallel_cast(
Copy link
Contributor

Choose a reason for hiding this comment

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

没清理干净。。。这些都没删

.RemoteBlobList()[0]
)


def api_unpack(
Copy link
Contributor

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 August 9, 2021 09:51
@oneflow-ci-bot oneflow-ci-bot self-requested a review August 9, 2021 12:12
@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2021

Speed stats:
GPU Name: GeForce GTX 1080 

PyTorch resnet50 time: 136.1ms (= 6803.4ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 125.4ms (= 6269.3ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
Relative speed: 1.09 (= 136.1ms / 125.4ms)

PyTorch resnet50 time: 83.1ms (= 4154.9ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 72.4ms (= 3622.5ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
Relative speed: 1.15 (= 83.1ms / 72.4ms)

PyTorch resnet50 time: 57.9ms (= 2893.1ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 45.8ms (= 2288.6ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
Relative speed: 1.26 (= 57.9ms / 45.8ms)

PyTorch resnet50 time: 48.3ms (= 2414.3ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 51.0ms (= 2551.8ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
Relative speed: 0.95 (= 48.3ms / 51.0ms)

PyTorch resnet50 time: 42.6ms (= 2132.2ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 42.0ms (= 2098.9ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
Relative speed: 1.02 (= 42.6ms / 42.0ms)

@oneflow-ci-bot oneflow-ci-bot merged commit b93f48c into master Aug 9, 2021
@oneflow-ci-bot oneflow-ci-bot deleted the remove_singleclient_outdated_api_part10 branch August 9, 2021 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge purge purge obsolete code python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants