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

Register ForeignCallback and Watcher in Multi-Client #5591

Merged
merged 1 commit into from
Jul 24, 2021

Conversation

chengtbf
Copy link
Contributor

  • RegisterForeignCallbackOnlyOnce -> RegisterGlobalForeignCallback 不再限制 ForeignCallback 和 Watcher 只能注册一次
  • 提供 Destroy ForeignCallback 和 Watcher 方法
  • Multi-Client 启动时也注册 ForeignCallback 和 Watcher (nn.Graph train 所需)
  • Single-Client 启动时先尝试 Destroy Multi-Client 注册的 Callback

@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

PyTorch resnet50 time: 141.0ms (= 7048.6ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 126.0ms (= 6298.8ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
Relative speed: 1.12 (= 141.0ms / 126.0ms)

PyTorch resnet50 time: 85.9ms (= 4293.1ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 73.4ms (= 3671.9ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
Relative speed: 1.17 (= 85.9ms / 73.4ms)

PyTorch resnet50 time: 57.8ms (= 2890.7ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 49.7ms (= 2484.8ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
Relative speed: 1.16 (= 57.8ms / 49.7ms)

PyTorch resnet50 time: 46.2ms (= 2308.2ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 48.8ms (= 2441.0ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
Relative speed: 0.95 (= 46.2ms / 48.8ms)

PyTorch resnet50 time: 40.6ms (= 2027.9ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 50.0ms (= 2497.8ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
Relative speed: 0.81 (= 40.6ms / 50.0ms)

@oneflow-ci-bot oneflow-ci-bot merged commit 3dbf6ae into master Jul 24, 2021
@oneflow-ci-bot oneflow-ci-bot deleted the dev_cc_multi_client_foreign_callback branch July 24, 2021 03:30
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

3 participants