Commit Graph

32 Commits

Author SHA1 Message Date
Tobias Grosser 89fda2bde2 GPURuntime: ensure compilation with C99
Otherwise, older compiler will error out on some of the C99 features we use.

llvm-svn: 281159
2016-09-11 07:32:50 +00:00
Tobias Grosser b187515784 GPGPU: Cache PTX kernels
We always keep a number of already compiled kernels available to ensure to avoid
costly recompilation.

llvm-svn: 277707
2016-08-04 09:15:58 +00:00
Tobias Grosser 79a947c233 GPGPU: Add basic support for kernel launches
llvm-svn: 276863
2016-07-27 13:20:16 +00:00
Tobias Grosser 5779359624 GPGPU: Load GPU kernels
We embed the PTX code into the host IR as a global variable and compile it
at run-time into a GPU kernel.

llvm-svn: 276645
2016-07-25 16:31:21 +00:00
Tobias Grosser 13c78e4d51 GPGPU: Emit data-transfer code
Also factor out getArraySize() to avoid code dupliciation and reorder some
function arguments to indicate the direction into which data is transferred.

llvm-svn: 276636
2016-07-25 12:47:39 +00:00
Tobias Grosser 7287aeddf1 GPGPU: Complete code to allocate and free device arrays
At the beginning of each SCoP, we allocate device arrays for all arrays
used on the GPU and we free such arrays after the SCoP has been executed.

llvm-svn: 276635
2016-07-25 12:47:33 +00:00
Tobias Grosser 19b8a0bbfb GPURuntime: Add missing debug output
llvm-svn: 276634
2016-07-25 12:47:28 +00:00
Tobias Grosser 9855e8bd80 GPURuntime: Fix typo in docu
llvm-svn: 276633
2016-07-25 12:47:25 +00:00
Tobias Grosser a71eedd4c5 GPURuntime: Drop polly_cleanupGPGPUResources
This function is currently unused and won't be used in this form again. Instead
of freeing many unrelated items at the same time, we will instead explicitly
call free function from the host-IR we generate for each object we want to free.
These specific free functions will be added together with the corresponding
host-IR generation code.

llvm-svn: 276632
2016-07-25 12:47:22 +00:00
Tobias Grosser fa7b080218 GPGPU: initialize GPU context and simplify the corresponding GPURuntime interface.
There is no need to expose the selected device at the moment. We also pass back
pointers as return values, as this simplifies the interface.

llvm-svn: 276623
2016-07-25 09:16:01 +00:00
Tobias Grosser 0a1a2720c8 GPURuntime: Check for debug-mode early on
Before this change, the debug statements in polly_initDevice would all be
skipped, as debug-mode would only be enabled _after_ they have already been run.

llvm-svn: 276621
2016-07-25 09:15:53 +00:00
Tobias Grosser dc816da455 GPURuntime: Drop timing functionality (some leftover II)
llvm-svn: 276617
2016-07-25 08:03:08 +00:00
Tobias Grosser 97aa23519e GPURuntime: Drop timing functionality (some leftover)
llvm-svn: 276612
2016-07-25 07:11:49 +00:00
Tobias Grosser 92713bea42 GPURuntime: Drop timing functionality
This functionality won't be used in the current iteration. Drop it for now to
reduce the surface of the library. We can always add it back in when we need
it again.

llvm-svn: 276611
2016-07-25 07:10:45 +00:00
Tobias Grosser 91990ab3ac GPURuntime: Only print status in debug mode
This change moves all status messages that are printed in non-error mode behind
the POLLY_DEBUG flag.

llvm-svn: 274598
2016-07-06 03:04:53 +00:00
Tobias Grosser 856e31bb9c GPURuntime: Drop polly_allocateMemoryForHostAndDevice
There is function is currently unused and will be replaced in the future by
functions that allow to allocate memory only on the host or only on the device.

llvm-svn: 274597
2016-07-06 03:04:50 +00:00
Tobias Grosser a24d3ba26a GPURuntime: Add basic debug tracing infrastructure
When setting the POLLY_DEBUG environment variable, on calls to the run-time
library the name of the function called is printed to stderr.

llvm-svn: 274596
2016-07-06 03:04:47 +00:00
Paul Robinson a7e5210eec Update copyright year to 2016.
llvm-svn: 264955
2016-03-30 22:41:38 +00:00
Tobias Grosser 114180db5b Also clang-format *.c run-time library files
llvm-svn: 262917
2016-03-08 07:34:58 +00:00
Michael Kruse 26311f00e8 Remove autotools build system
The autotools build system is based on and requires LLVM's autotools
build system to work, which has been depricated and finally removed in
r258861. Consequently we also remove the autotools build system from
Polly.

Differential Revision: http://reviews.llvm.org/D16655

llvm-svn: 259041
2016-01-28 12:00:33 +00:00
Tobias Grosser 9696a3f903 Do not compile GPU library with sanitizers
llvm-svn: 243411
2015-07-28 12:51:23 +00:00
Tobias Grosser 1346663551 Fix formatting issues in banner
llvm-svn: 235867
2015-04-27 12:02:36 +00:00
Tobias Grosser 36b8dd144d Ensure the functions in our GPURuntime are visible
llvm-svn: 231835
2015-03-10 20:23:14 +00:00
NAKAMURA Takumi d40d387fb1 Update the copyright credits -- Happy new year 2014!
FIXME: Dragonegg may be updated at non-trivial changes.
llvm-svn: 198274
2014-01-01 08:27:31 +00:00
Tobias Grosser e602a07662 Reformat with clang-format
clang-format become way more stable. This time we mainly reformat function
signatures.

llvm-svn: 181294
2013-05-07 07:30:56 +00:00
Tobias Grosser d7e58640a5 Update formatting to latest version of clang-format
llvm-svn: 179160
2013-04-10 06:55:45 +00:00
Tobias Grosser 4d96c8d714 clang-format: Many more files
After this commit, polly is clang-format clean. This can be tested with
'ninja polly-check-format'. Updates to clang-format may change this, but the
differences will hopefully be both small and general improvements to the
formatting.

We currently have some not very nice formatting for a couple of items, DEBUG()
stmts for example. I believe the benefit of being clang-format clean outweights
the not perfect layout of this code.

llvm-svn: 177796
2013-03-23 01:05:07 +00:00
NAKAMURA Takumi 43632a26a5 Update the copyright coredits -- Happy new year 2013!
llvm-svn: 171342
2013-01-01 10:00:19 +00:00
Tobias Grosser 903c242662 Update libGPURuntime to be dual licensed under MIT and UIUC license.
Contributed by: Yabin Hu  <yabin.hwu@gmail.com>

llvm-svn: 159815
2012-07-06 10:40:15 +00:00
Tobias Grosser 5c0f6f3350 Replace CUDA data types with Polly's GPGPU data types.
Contributed by:  Yabin Hu  <yabin.hwu@gmail.com>

llvm-svn: 159725
2012-07-04 21:45:03 +00:00
Tobias Grosser fb4842ff95 Add the runtime library for GPGPU code generation.
Contributed by: Yabin Hu <yabin.hwu@gmail.com>

llvm-svn: 158304
2012-06-11 09:25:01 +00:00
Tobias Grosser 758053788b Add initial version of Polly
This version is equivalent to commit ba26ebece8f5be84e9bd6315611d412af797147e
in the old git repository.

llvm-svn: 130476
2011-04-29 06:27:02 +00:00