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

Cowardly refusing to serialize non-leaf tensor which requires_grad, since autograd #35

Open
sunshineywz123 opened this issue Dec 7, 2022 · 0 comments

Comments

@sunshineywz123
Copy link

sunshineywz123 commented Dec 7, 2022

image

image
hparams.num_gpus set 2
run
scripts/train.sh exp_name ./config/train.yaml 2 1
throw errors
Cowardly refusing to serialize non-leaf tensor which requires_grad, since autograd
The original logic is required to grad back to the derivative
In multi-threaded parallelism serialize a tensor requires gradient calculation, the calculation graph is separated, autograd does not support to do synchronization between multiple processes
I can find this tensor, but this tensor originally needs gradient calculation, if I set it to require_grads=False, won't it change the original logic. At present, the desired state is to support multiple processes in parallel, but also support the autograd of this tensor
The current problem is that autograd does not support synchronization between multiple processes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant