Giter Club home page Giter Club logo

Comments (6)

marbre avatar marbre commented on August 29, 2024

I assume we are talking about multiple returns? This is indeed not possible, see https://github.com/iml130/mlir-emitc/blob/cbbeed65364e9e1b62737fec18e08587e3945bee/lib/Dialect/EmitC/Conversion/MHLORegionOpsToEmitC.cpp#L153%C3%9FL157 and reported in our MHLO HLO Op Coverage docs. Is this a requirement for the work on your side?

from mlir-emitc.

jpienaar avatar jpienaar commented on August 29, 2024

Indeed else for example argmax lowering to MHLO doesn't work which rules out a large class of models.

from mlir-emitc.

marbre avatar marbre commented on August 29, 2024

On the one hand, we can of course work on supporting multiple returns to mhlo.reduce (a reproducer that doesn't requires to be touched before running it would be super helpful!).
On the other hand, with lowering argmax, you're referring to lowering https://www.tensorflow.org/api_docs/python/tf/math/argmax to MHLO? In that case #278 would be an alternative to improve the mhlo.reduce support or not? Since our resources are limited, do you have a preference?

from mlir-emitc.

simon-camp avatar simon-camp commented on August 29, 2024

I've briefly looked into this. It should be fairly easy to support the two results case via an overload, but I don't see an easy way to generalize the reduction function to arbitrary arity.

from mlir-emitc.

jpienaar avatar jpienaar commented on August 29, 2024

Two result case would go a long way (I think it is probably second most common post plain single result). That would be very helpful.

For the arbitrary arity case, could it be expanded to a for loop constantly reapplying function? (for (...) { x = f(val[it], x) } kind). So you'd need a function to be able to get the slice of the tensor at iteration I kind.

from mlir-emitc.

marbre avatar marbre commented on August 29, 2024

The two result case is now supported with #285 landed.

from mlir-emitc.

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.