-
Notifications
You must be signed in to change notification settings - Fork 697
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
Remove CUDA-only restriction for multi-tensor model updates in optimizer #10564
base: master
Are you sure you want to change the base?
Conversation
View latest API docs preview at: https://oneflow-staging.oss-cn-beijing.aliyuncs.com/docs/Oneflow-Inc/oneflow/pr/10564/ |
Speed stats:
|
@@ -163,10 +163,6 @@ def __init__( | |||
warnings.warn("Fused Adamw is not supported when amsgrad=True.") | |||
param_group["fused"] = False | |||
|
|||
if param_group["fused"] and not param.is_cuda: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个去掉,是不是cpu device会有影响,是否需要用param.is_cpu判断一下?
CI failed when running job: cuda-module. PR label automerge has been removed |
CI failed when running job: cuda-misc. PR label automerge has been removed |
This PR removes the CUDA-only restriction in the multi-tensor model update pass within both multi_tensor_model_update.cpp and adamw.py.
By commenting out the device type checks, we allow multi-tensor and fused updates to run on non-CUDA devices as well.