Code Monkey home page Code Monkey logo

Comments (3)

hughperkins avatar hughperkins commented on May 19, 2024

Well.. the opencl is generated at runtime, not at compile time. This is because we only find out a lot of key type and address space information at runtime.

You can dump the opencl files at runtime though, by doing export COCL_DUMP_CL=1, see https://github.com/hughperkins/coriander/blob/master/doc/options.md

from coriander.

JulyJohn avatar JulyJohn commented on May 19, 2024

ok..thanks a lot !
besides, suppose I don't have any gpus, and I want to run it on a cpu, how can I change the config from gpu to cpu? Surely I know it might encounter some problems, but I still want to give it a try :-P

Since in your another project : https://github.com/hughperkins/tf-coriander/ , I have tried it on a cpu, and it does work.

thanks for your attention~

from coriander.

hughperkins avatar hughperkins commented on May 19, 2024

What do you mean by 'run on a cpu'? Coriander will work only on OpenCL 1.2 devices. If you want to run it on an OpenCL 1.2 CPU, bearing in mind it wont actually run, because the workgroup sizes are too big, but if you want to tweak the workgroup sizes, you'd need to hack on this line, https://github.com/hughperkins/coriander/blob/master/src/cocl_context.cpp#L43

       cocl::CoclDevice *coclDevice = cocl::getCoclDeviceByGpuOrdinal(gpuOrdinal);

which calls into https://github.com/hughperkins/coriander/blob/master/src/cocl_device.cpp#L108-L120

...and modify something about this so it can return CPU OpenCL devices, instead of just GPU OpenCL devices. As you state, this wont work very well though, and you'll need to hack around with workgroup sizes and so on.

from coriander.

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.