Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Compiler optimizations on GPU?

1 view
Skip to first unread message

shrey

unread,
Apr 29, 2008, 1:03:01 PM4/29/08
to
Can any one give me some broad hints on what sort of compiler
optimizations are important for GPU's especially those on mobile
platforms? Do traditional heavy weight optimizations/analysis like
IPA, PRE, loop transformations hold any usefulness ?

thanks
shrey

Giridhar S

unread,
Apr 29, 2008, 8:51:30 PM4/29/08
to
If you're talking of general-purpose computations on GPUs (GPGPU),
then many of the traditional optimizations are indeed useful and
necessary, since the code structure is general and not specialized
graphics code. Optimizations related to performance could be quite
important - strength reduction, induction variable optimizations, code
motion and so on. IPA may not be very important because most of the
compute-intensive "kernels" that run on the GPU are loops with a high
degree of data-parallelism and minimal control-flow branching (like in
function calls).

In fact, NVIDIA's compiler for CUDA uses the high-level optimizer from
the Open64 compiler framework for optimizing the general purpose code
before performing register allocation, scheduling and other
optimizations specific to the underlying GPU.

--
Giridhar

Torben Ægidius Mogensen

unread,
Apr 30, 2008, 3:34:30 AM4/30/08
to
shrey <shre...@gmail.com> writes:

Vectorisation must be the most useful optimisation for GPUs. This
includes blocking of loops over arrays that are too large to fit a
vector.

Torben

Inderaj Bains

unread,
Apr 30, 2008, 4:53:02 PM4/30/08
to
It depends on the programming language you are using If you are using
a language like cuda, the parallelism is expressed well and you need
no rocket science in compilation but basic good codegen

Reducing operation counts is important on GPU's as well So most of the
same high level optimizations are required

One biggest difference is low or no cache, due to which you need to be
especially mindful of not creating too many extra lifetimes.In that
sense is tradeoff point of computation vs lifetime is different from
regular processors

Inderaj

Anton Lokhmotov

unread,
May 6, 2008, 5:34:33 AM5/6/08
to
Shrey:

> Can any one give me some broad hints on what sort of compiler
> optimizations are important for GPU's

Have a look at the recent work of guys from the Ohio State University:
http://www.cse.ohio-state.edu/%7Ebaskaran/ics08.pdf

Cheers,
Anton.

0 new messages