Giter VIP home page Giter VIP logo

Comments (7)

math-fehr avatar math-fehr commented on July 30, 2024 1

I would prefer not removing IntAttr, because its purpose is to encapsulate a python int.
However, we can indeed rename it to something else!

from xdsl.

PapyChacal avatar PapyChacal commented on July 30, 2024 1

Walking the issues for some reason; forgot this even was a problem as I got through it myself, but it would make sense to solve that still!
I would be in favor of keeping IntegerAttr as-is for MLIR consistency; IntAttr being the xDSL novelty, we could make this one more explicit? Like IntegerValueAttr or something in that direction?

from xdsl.

Dinistro avatar Dinistro commented on July 30, 2024

There is no rush for such a thing. I just wanted to write this down somewhere.

from xdsl.

K-W-Li avatar K-W-Li commented on July 30, 2024

At first sight I thought it was like Haskell's Int (bounded) and Integer (unbounded) but looks the other way round.

from xdsl.

K-W-Li avatar K-W-Li commented on July 30, 2024

Can we make the bounded integer inherit from unbounded integer? So we can access the value by ".data.value" instead of ".data.data.value"

from xdsl.

math-fehr avatar math-fehr commented on July 30, 2024

Hey! A bit of explanation on the IntAttr versus IntegerAttr.
An IntAttr is an attribute that only contains an integer.
An IntegerAttr is an attribute that contains an IntAttr and an IntegerType. This is a way to have a typed integer.
The problem is that the naming is not that great. One proposition Michel had was to change IntegerAttr to ValueAttr, which makes more sense in my opinion! The only problem is that we would need to write some more code for the translation to MLIR.

from xdsl.

webmiche avatar webmiche commented on July 30, 2024

Or maybe TypedIntegerValue?

from xdsl.

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.