Giter Site home page Giter Site logo

Comments (4)

maleadt avatar maleadt commented on July 22, 2024

which is also what Base does

Wait, what? No, Base doesn't do any eager conversions. Having cu([1]) == [1f0] seems like a recipe for disaster, why do you want that conversion back? The fact that you were silently dispatching to floating-point operations when asking for (unsupported) integer versions is an argument for the current behavior, to me.

from cuarrays.jl.

CarloLucibello avatar CarloLucibello commented on July 22, 2024

sorry I meant Base converts when doing mathematical operations such as log.([1, 1]), so I would expect the same for log.(cu([1, 1]))

from cuarrays.jl.

CarloLucibello avatar CarloLucibello commented on July 22, 2024

I see now that on CuArrays 1.7 cu performed the casting, I agree that should be avoided and current behavior for cu is preferable. On the other hand, I'd like all mathematical operations to work on integer cuarrays through conversion

from cuarrays.jl.

maleadt avatar maleadt commented on July 22, 2024

I'd like all mathematical operations to work on integer cuarrays through conversion

Yeah, understandably. We're in the annoying situation now where we've been hoping to reuse Base's conversions through Cassette, only redefining the bottommost calls to incompatible CPU library intrinsics with NVIDIA ones, but progress on Cassette inferability has been... slow. In the meantime, we don't have a good policy or place to add higher-level functions like log accepting integers. I guess we should just add them to CUDAnative for now, e.g. like JuliaGPU/CUDAnative.jl#445. If you have the need, and the time to create a PR, feel free to add some implementations there!

from cuarrays.jl.

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.