Giter VIP home page Giter VIP logo

Comments (3)

ailzhang avatar ailzhang commented on September 25, 2024

Hmm if I run the script above it still gives wrong answer. Test passed tho.

from xla.

dlibenzi avatar dlibenzi commented on September 25, 2024

I think the issue is with shape reporting. Data looks right AFAICT:

tensor([[[0.2436, 0.8010],
         [0.2436, 0.8010],
         [0.5483, 0.8010],
         [0.7193, 0.8010]],

        [[0.3733, 0.9327],
         [0.3733, 0.9327],
         [0.5483, 0.9327],
         [0.7193, 0.9327]],

        [[0.9229, 0.3699],
         [0.9229, 0.7067],
         [0.9229, 0.7648],
         [0.9229, 0.3699]]])
torch.Size([4, 2])

from xla.

dlibenzi avatar dlibenzi commented on September 25, 2024

Shape inference is broken

IR {
  %0 = f32[3,1,2]{2,1,0} xla::device_data(), device=CPU:0
  %1 = f32[4,2]{1,0} xla::device_data(), device=CPU:0
  %2 = f32[4,2]{1,0} aten::max(%1, %0)
}

HloModule DumpHloComputation.9

ENTRY %DumpHloComputation.9 (param_0.1: f32[3,1,2], param_1.2: f32[4,2]) -> (f32[3,4,2]) {
  %param_1.2 = f32[4,2]{1,0} parameter(1)
  %broadcast.3 = f32[3,4,2]{2,1,0} broadcast(f32[4,2]{1,0} %param_1.2), dimensions={1,2}
  %param_0.1 = f32[3,1,2]{2,1,0} parameter(0)
  %broadcast.4 = f32[3,1,2]{2,1,0} broadcast(f32[3,1,2]{2,1,0} %param_0.1), dimensions={0,1,2}
  %reshape.5 = f32[3,2]{1,0} reshape(f32[3,1,2]{2,1,0} %broadcast.4)
  %broadcast.6 = f32[3,4,2]{2,1,0} broadcast(f32[3,2]{1,0} %reshape.5), dimensions={0,2}
  %maximum.7 = f32[3,4,2]{2,1,0} maximum(f32[3,4,2]{2,1,0} %broadcast.3, f32[3,4,2]{2,1,0} %broadcast.6)
  ROOT %tuple.8 = (f32[3,4,2]{2,1,0}) tuple(f32[3,4,2]{2,1,0} %maximum.7)
}

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.