| Showing 1-4 of 31 in category: all |
|
MON 15th DEC 08 Books |
We by Yevgeny Zamyatin - Book recommendation | |
| ||
|
15 December 2008 00:33:28 |
Books |
Comments (3)
|
||
|
TUE 9th DEC 08 Computer Science |
OpenCL 1.0 Specification released - Some thoughts... | |
|
Yesterday the specification for OpenCL 1.0 was released. For those who don't
know what OpenCL is here is a summary quote from the specification:
"OpenCL is an open industry standard for programming a heterogeneous collection of CPUs, GPUs and other discrete computing devices organized into a single platform. It is more than a language. OpenCL is a framework for parallel programming and includes a language, API, libraries and a runtime system to support software development. Using OpenCL, for example, a programmer can write general purpose programs that execute on GPUs without the need to map their algorithms onto a 3D graphics API such as OpenGL or DirectX." [p. 18]A worthy goal. But is OpenCL designed for use by anyone? "The target of OpenCL is expert programmers wanting to write portable yet efficient code. This includes library writers, middleware vendors, and performance oriented application programmers. Therefore OpenCL provides a low-level hardware abstraction plus a framework to support programming and many details of the underlying hardware are exposed." [p. 18]What about the general scientific computing community? Do we expect them to be expert programmers or have expert programmers on hand to write their simulations? While OpenCL addresses the expression of low-level programs for compilation to heterogeneous architectures it does not solve the human-tractability issues of manual parallel programming: it is complex, lengthy, tedious, error prone, and difficult to prove. OpenCL is not all things to all men/women. It does however provide a possible intermediate language for higher-level languages that abstract over low-level concurrency/parallel concepts. An interesting issue, that the specification picks up on, is that heterogeneity makes portability difficult when to porting code between a CPU and a GPU (as opposed to between different types of CPUs and different types of GPUs). "Unfortunately, there are a number of areas where idiosyncrasies of one hardware platform may allow it to do some things that do not work on another. " [p. 208] "Likewise, the heterogeneity of computing architectures might mean that a particular loop construct might execute at an acceptable speed on the CPU but very poorly on a GPU, for example. CPUs are designed in general to work well on latency sensitive algorithms on single threaded tasks, whereas common GPUs may encounter extremely long latencies, potentially orders of magnitude worse. A developer interested in writing portable code may find that it is necessary to test his design on a diversity of hardware designs to make sure that key algorithms are structured in a way that works well on a diversity of hardware. We suggest favoring more work-items over fewer. It is anticipated that over the coming months and years experience will produce a set of best practices that will help foster a uniformly favorable experience on a diversity of computing devices." [p. 208]This doesn't sound like the behaviour of a language with which people want to write "portable yet efficient code." [p. 18], but it is not the fault of OpenCL. This particular lack of portability is a necessary symptom of the low-level nature of the language. In OpenCL a loop is a loop. How can this be solved? Ideally we don't want our programmers to have to modify their algorithms to suit a set of possible hardware. Ideally algorithms and implementation should be separated by layers of specialization. A more abstract language may describe a loop that has a semantically equivalent efficient interpretation for a GPU and a standard efficient interpretation for the CPU. However, it is not desirable that a compiler perform significant transformations unbeknownst to the programmer, as this affects the programmer's (tacit or otherwise) cost-model for the language. Perhaps specializations should be expressed by the programmer (up to a point) via a multi-tiered approach to programming languages? Who knows! I'm just waving my hands in my head now and am going home for some tea. Check out the OpenCL project if you are interested. Bye. | ||
|
9 December 2008 20:27:06 |
Computer Science |
Comments (3)
|
||
|
SUN 23rd NOV 08 Science |
Einstein and Eddington | |
|
I just watched a brilliant drama on the BBC entitled Einstein and Eddington telling the story of Albert Einstein's formulation of General Relativity and its confirmation by British scientist Arthur Stanley Eddington around the time of World War 1. Plenty of details are elided and I am sure certain aspects are not entirely factually accurate but nevertheless this is a very interesting, wonderfully acted, and engaging portrayal of both scientists and their respective struggles against their peers in a politically charged climate.
Watch it on the BBC iPlayer if you can! | ||
|
23 November 2008 14:16:55 |
Science |
Comments (8)
|
||
|
SAT 8th NOV 08 General |
Another busy week...! | |
|
It's been another crazy (but very enjoyable) week for me. Tuesday was of course the night of the US election. I nearly went to bed as I'd been at a formal dinner with all the computer science students at my college and then to the cinema to see Quantum of Solace (which I highly recommend by the way). So by the time I got home at about 12:30am I thought I might just go to bed, then I came to my senses are realised that it would be great to witness this historical election live and to share in the experience with my friends. So I went down to the Cambridge Union with some friends and stayed up until Obama's acceptance speech -around 5am for us! There were so many students down at the Cambridge Union all night- joining in, cheering, and celebrating the final outcome. It was great to be part of it! I attemped to take a photo from the balcony with my phone, sadly it was too dark for my phone to capture the scene properly.
This week it seems I have done more talking and discussing than reading- but that's probably not the end of the world as some nice ideas have been forming about structured grid programming this week- especially yesterday- but I won't divulge anymore at the moment.
On another note: I have removed the doodles from this blog and moved them into their own section in an attempt to keep my blog a bit more serious and free from my unfunny and bizarre doodles! I have posted a new doodle this weekend. | ||
|
8 November 2008 14:01:30 |
General |
Comments (0)
|
||
| Showing 1-4 of 31 in category: all |

