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

Grad strides do not match bucket view strides #275

Open
julkaztwittera opened this issue Jan 23, 2023 · 1 comment
Open

Grad strides do not match bucket view strides #275

julkaztwittera opened this issue Jan 23, 2023 · 1 comment

Comments

@julkaztwittera
Copy link

I am trying to train a model. What I get is such a warning:
/home/jchylak/.local/lib/python3.8/site-packages/torch/autograd/__init__.py:197: UserWarning: Grad strides do not match bucket view strides. This may indicate grad was not created according to the gradient layout contract, or that the param's strides changed since DDP was constructed. This is not an error, but may impair performance. grad.sizes() = [1, 512], strides() = [1, 1] bucket_view.sizes() = [1, 512], strides() = [512, 1] (Triggered internally at ../torch/csrc/distributed/c10d/reducer.cpp:325.) Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass
Has anyone ever got it? I've seen some issues about it in PyTorch, but I don't know how to manage it here.

@rakhon9
Copy link

rakhon9 commented May 20, 2024

Dear Julia.
I am having the same error. Can you please let me know if you have solved this problem or not?

C:\Users\palmcove\anaconda3\envs\cuda_l\lib\site-packages\torch\autograd\__init
__.py:197: UserWarning: Grad strides do not match bucket view strides. This may
 indicate grad was not created according to the gradient layout contract, or th
at the param's strides changed since DDP was constructed.  This is not an error, but may impair performance.
grad.sizes() = [1, 512], strides() = [1, 1]
bucket_view.sizes() = [1, 512], strides() = [512, 1] (Triggered internally at C
:\actions-runner\_work\pytorch\pytorch\builder\windows\pytorch\torch\csrc\distributed\c10d\reducer.cpp:339.)
  Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass

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

2 participants