Giter Club home page Giter Club logo

Comments (3)

blueberry avatar blueberry commented on June 14, 2024

Hi. You are indeed doing SP yourself, but you're trying to invoke built-in Neanderthal code written with OpenCL that tries to generate double and single precision variants of certain code.

We need to identify why that feature gets invoked in your program. If you look here (https://github.com/uncomplicate/neanderthal/blob/d7f683cab829a401420e03b52869d953341377f0/src/clojure/uncomplicate/neanderthal/internal/device/clblast.clj#L2316) you'll see that both double and single precision engines are created lazily, only when you explicitly create them. (That's dealt in https://github.com/uncomplicate/neanderthal/blob/master/src/clojure/uncomplicate/neanderthal/opencl.clj). That all seems to give warnings (it would be useful to test why), so it might not be crashing your program.

However, the file https://github.com/uncomplicate/neanderthal/blob/5c76fb83eb43b7aa3307e6e90d5025e41750a00f/src/device/uncomplicate/neanderthal/internal/device/opencl/random.cl contains code for both double and single precision numbers, and this produces errors. I must have overlook that the GPU might be not supporting doubles at all, so I didn't split that into two files.

Long term solution is (I hope) that I split this file into double and single specific parts, and load them in https://github.com/uncomplicate/neanderthal/blob/d7f683cab829a401420e03b52869d953341377f0/src/clojure/uncomplicate/neanderthal/internal/device/clblast.clj#L2312 appropriately.

Short term solution is that you test this approach on your machine:

  1. clone neanderthal
  2. split random.cl into random-float.cl and random-double.cl
  3. in clblast.clj provide separate source files for random instead of the unified random.cl
  4. build neanderthal (skip tests because these obviously can't all pass on your machine)
  5. see whether your program works, so I can apply this in upstream Neanderthal.
  6. (if possible, open new issue for this discussion in Neanderthal, since the problem is not in ClojureCL)

from clojurecl.

futuro avatar futuro commented on June 14, 2024

That makes a lot of sense, thank you! I was also confused why the warnings seemed to trigger build failures, but there are also errors mixed in that huge text dump.

I'll give that workaround a try and open up a new issue in neanderthal with the results.

from clojurecl.

futuro avatar futuro commented on June 14, 2024

I've opened uncomplicate/neanderthal#114, and will close this issue out. Let me know in that PR if you'd like a companion issue opened in Neanderthal.

from clojurecl.

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.