Giter VIP home page Giter VIP logo

Comments (3)

JackCaoG avatar JackCaoG commented on August 11, 2024

@vanbasten23 can you take a look since you are offcall this week?

from xla.

vanbasten23 avatar vanbasten23 commented on August 11, 2024

I think there might be something wrong with

result = torch_xla._XLAC._xla_all_reduce(reduce_type, inputs, scale,
groups, pin_layout)
results = [result]
.

If you set pin_layout = True, I can see the correct result. To unblock you, can you try to replace new_t = xm.all_reduce('sum', new_t, pin_layout=False) with xm.all_reduce('sum', [new_t], pin_layout=False)?

from xla.

yitongh avatar yitongh commented on August 11, 2024

Sorry for the late reply. This issue isn't just with the all reduce API. If I switch to xm.collective_permute(new_t, [[0, 1], [1, 0]]), the result is also incorrect. However, the result of xm.collective_permute(new_t.clone(), [[0, 1], [1, 0]]) is correct. It seems that this issue is related to XLA’s own implementation of custom ops, and there are some incompatibilities with PyTorch's inplace operators. Moreover, this issue can easily cause pitfalls for users.

from xla.

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.