-
Notifications
You must be signed in to change notification settings - Fork 802
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
Feat graph load to new device #10335
Conversation
Code got formatted by CI. Please request CI again if you still want to have this PR merged. If the PR is from a forked repo, please download the patch files from the GitHub Actions web page and apply them locally. |
View latest API docs preview at: https://oneflow-staging.oss-cn-beijing.aliyuncs.com/docs/Oneflow-Inc/oneflow/pr/10335/ |
Speed stats:
|
…-Inc/oneflow into feat_graph_to_new_device
Code got formatted by CI. Please request CI again if you still want to have this PR merged. If the PR is from a forked repo, please download the patch files from the GitHub Actions web page and apply them locally. |
Speed stats:
|
Code got formatted by CI. Please request CI again if you still want to have this PR merged. If the PR is from a forked repo, please download the patch files from the GitHub Actions web page and apply them locally. |
View latest API docs preview at: https://oneflow-staging.oss-cn-beijing.aliyuncs.com/docs/Oneflow-Inc/oneflow/pr/10335/ |
Speed stats:
|
Code got formatted by CI. Please request CI again if you still want to have this PR merged. If the PR is from a forked repo, please download the patch files from the GitHub Actions web page and apply them locally. |
Speed stats:
|
Code got formatted by CI. Please request CI again if you still want to have this PR merged. If the PR is from a forked repo, please download the patch files from the GitHub Actions web page and apply them locally. |
Speed stats:
|
Speed stats:
|
Speed stats:
|
Code got formatted by CI. Please request CI again if you still want to have this PR merged. If the PR is from a forked repo, please download the patch files from the GitHub Actions web page and apply them locally. |
View latest API docs preview at: https://oneflow-staging.oss-cn-beijing.aliyuncs.com/docs/Oneflow-Inc/oneflow/pr/10335/ |
Speed stats:
|
Code got formatted by CI. Please request CI again if you still want to have this PR merged. If the PR is from a forked repo, please download the patch files from the GitHub Actions web page and apply them locally. |
View latest API docs preview at: https://oneflow-staging.oss-cn-beijing.aliyuncs.com/docs/Oneflow-Inc/oneflow/pr/10335/ |
Speed stats:
|
View latest API docs preview at: https://oneflow-staging.oss-cn-beijing.aliyuncs.com/docs/Oneflow-Inc/oneflow/pr/10335/ |
Speed stats:
|
Support changing runtime_state_dict's device with `runtime_state_dict_to` ```python def warmup_with_load(self, file_path, device=None): state_dict = flow.load(file_path) if device is not None: state_dict = flow.nn.Graph.runtime_state_dict_to(state_dict, device) self.load_runtime_state_dict(state_dict) ``` Depends on PR in oneflow: Oneflow-Inc/oneflow#10335 # Performance check ## save - speed: 5.99~6.08 it/s - mem: - before compile: 7.4G - after compile: 8.6 G - run: 15G ## load - speed: 5.94~6.11 it/s - mem: - before compile: 8.5G - after compile: 8.5G - run: 15G ## load from cuda 0 to cuda 1 - speed: 6.17~6.22 it/s - mem: - before compile: 7.3G - after compile: 8.5G - run: 15G ## load from cuda 0 to cuda 0 and cuda 1 - speed: 6.05~6.12 it/s - mem: - before compile: 7.3G - after compile: 8.5G - run: 15G --------- Co-authored-by: Shenghang Tsai <[email protected]>
This reverts commit dea3f43.
This reverts commit dea3f43.
No description provided.