GithubHelp home page GithubHelp logo

clyther's Introduction

Welcome to Clyther's documentation!

CLyther is a Python tool similar to Cython and PyPy. CLyther is a just-in-time specialization engine for OpenCL. The main entry points for CLyther are its :class:`clyther.task` and :class:`clyther.kernel` decorators. Once a function is decorated with one of these the function will be compiled to OpenCL when called.

CLyther is a Python language extension that makes writing OpenCL code as easy as Python itself. CLyther currently only supports a subset of the Python language definition but adds many new features to OpenCL.

CLyther exposes both the OpenCL C library as well as the OpenCL language to python.

Objectives:
  • Make it easy for developers to take advantage of OpenCL
  • Take advantage existing Python numerical algorithms
  • Accelerate my code!
Philosophy:
  • Enable users to have 100% control via Python. Access one to one mapping from Python to OpenCL.
  • Endorse native Python abstractions for convenience. e.g. Slice an array, pass a function as an argument.

Warning

This is a brand new version of CLyther. I have not released this yet.

Links:

.. seealso::

    * `OpenCL for Python <http://srossross.github.com/oclpb>`_: Python bindings for OpenCL.
    * `Meta <http://srossross.github.com/meta>`_: Metaprogramming utilities for Python.


clyther's People

Contributors

srossross avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

clyther's Issues

the future ?

Quoting: "In an ideal world, the Clyther developers would move the core such that it was built on top of PyOpenCL, so we wouldn't have to choose, and to avoid duplication of labor. I doubt that will ever happen, though."
http://stackoverflow.com/a/4869923

Clyther looks like the most straightforward Python/OpenCL option, despite not being very complete, it is already very powerful and useful. However, it hasn't been updated in quite a while apparently. Given the ideas and features discussed on the website, I was wondering if it might be a feasible option to implement Clyther either on top of PyOpenCL or possibly llvm/llvmpy, llvm is already being used by AMD/NVIDIA to compile OpenCL and the tool chain is fully exposed, so that Python bytecode could be transparently processed and turned into corresponding CL kernels.

compile-to-opencl-source fails

Hello Sean,

I installed python2.7 and did a pip install clyther
I am trying this code:
http://srossross.github.com/Clyther/examples.html#compile-to-opencl-source
and I get

Traceback (most recent call last):
File "test1.py", line 32, in
print generate_sin.compile(ctx, a=cl.global_memory(cl.cl_float2), source_only=True)
File "/Library/Python/2.7/site-packages/clyther/cly_kernel.py", line 157, in compile
cl_kernel = self.compile_or_cly(ctx, source_only=source_only, cly_meta=cly_meta, **kwargs)
File "/Library/Python/2.7/site-packages/clyther/cly_kernel.py", line 207, in compile_or_cly
program = self._compile(ctx, args, defaults, kernel_name, source)
File "/Library/Python/2.7/site-packages/clyther/cly_kernel.py", line 261, in _compile
raise CLComileError('\n'.join(log_lines), program)
clyther.cly_kernel.CLComileError: <opencl.Device name='Intel(R) Core(TM) i7-2677M CPU @ 1.80GHz' type=2L>
No kernels or only kernel prototypes found

Any idea what I may be doing wrong?

opengl interop

I hope this is the right place to ask this.

Is it possible to have clyther and pyopengl or pyglet (or any other python graphics lib) interoperate on the gpu memory without having to copy the data back and forth from the GPU to main memory?

I'm referring to something like this http://enja.org/2011/03/22/adventures-in-pyopencl-part-2-particles-with-pyopengl/

Here's a video of a sim my friend hacked together from code above http://www.youtube.com/watch?v=xeOUxTSjowY

we are trying to create a particle simulation/visualization tool and some of the features of clyther would be extremely cool to use.

Thanks for your work thus far! Clyther is really cool!

Contact details

Hi Sean,

My apologies for getting in contact with you this way. The email address srossross doesn't appear to be working.
I would like to get in touch regarding a presentation on Clyther. Would you have alternate contact details I could use?

Regards,
John

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.