Giter Site home page Giter Site logo

Comments (3)

janeyx99 avatar janeyx99 commented on June 11, 2024

Could be related to #110758

from pytorch.

xmfan avatar xmfan commented on June 11, 2024

works on aot_eager backend, looks like a stride mismatch?

{(1,), (3, 1, 1, 1), (128, 1, 1, 1)}  # aot_eager
{(1,), (3, 1, 3, 3), (128, 1, 128, 128), (128, 1, 1, 1)}  # inductor
diff --git a/torch/optim/adam.py b/torch/optim/adam.py
index fba4b2027b0..f7f13029cef 100644
--- a/torch/optim/adam.py
+++ b/torch/optim/adam.py
@@ -672,6 +672,13 @@ def _fused_adam(
             lr_dict[device] = lr.to(device=device, non_blocking=True)  # type: ignore[union-attr]
             lr = lr_dict[device]
         torch._foreach_add_(device_state_steps, 1)
+
+        strides = set()
+        for l in [device_params, device_grads, device_exp_avgs, device_exp_avg_sqs]:
+            for x in l:
+                strides.add(x.stride())
+        breakpoint()
+
         torch._fused_adam_(
             device_params,
             device_grads,

from pytorch.

mlazos avatar mlazos commented on June 11, 2024

@shunting314 isnt there a stride optimization in inductor? Iirc there was a similar issue with distributed

from pytorch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.