there are so many cores

Just another WordPress.com site

JIT working again

Got the JIT working again at 3 am this morning. It’s been a long way back.

There was a working JIT six months ago: Trivial example of the JIT with OpenCL. The design was based on functional programming concepts: code as data; memory management and concurrency with deep copies; laziness and boxes everywhere. You can see where this is going… nowhere.

Stream processing may not require explicit shared mutable data. It does require gather/scatter of threads into kernels. Another requirement for a PeakStream style tracing JIT is heuristic loop rolling. That might be possible with a clever recursion over boxed ASTs. But now this is becoming compiler rocket-science. Why make things complicated?

So I threw out the entire design and started over.

Memory management turned out to be far more complex in this new design. There are effectively three different memory spaces requiring active management: application data; host runtime memory; OpenCL compute device memory buffers and images. There are also multiple compute devices and an interpreter, all of which may run concurrently and interdependently within an application.

Well, I figured it out.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: