Alex Voicu
b881cf713c
Fix compiler version check.
2017-11-29 03:05:53 +00:00
Alex Voicu
faa546d194
Fix oversight in selection mechanism which led to erroneous code to be compiled for the grid_launch_GGL component.
2017-11-29 01:37:52 +00:00
Alex Voicu
89e9399427
Choose whether or not to use functional grid_launch based on the version of HCC used to compile.
2017-11-29 00:17:44 +00:00
Alex Voicu
08f252e4bf
Remove leftover comment.
2017-11-22 19:37:03 +00:00
Alex Voicu
c2482d1255
This switches HIP from its currently convoluted macro + pfe based dispatch mechanism to a more natural one partially based on the existing module API. The basic idea is that HCC will always correctly emit __global__ functions: as empty-bodied stubs, on host, and as kernels, on device. It then becomes trivial to obtain the mangled name on host, at dispatch, from the function's address, and then to use the mangled name to retrieve the kernel. This should address all problems stemming from serialisation, dubious mismatches due to the manufactured functor, macro-isms et al. It also immediately enables support for generalised globals as a consequence of that being available in the module API. Finally, it will make debug much easier, since the actual names of the __global__ functions will automatically be used in traces etc. One detail is that due to how dispatch works now (hipLaunchKernel and hipLaunchKernelGGL are themselves variadic function templates which deduce the function type of the callee), in certain cases it may be necesssary to insert explicit casts to ensure that the variadic argument list selects a viable overload - this can be observed in some unit tests. Eventually we may be able to remove this limitation, but for now it does not appear terribly onerous. The code is not extremely HIPpie, nor is it fully optimised, but rather is intended as a starting point for the HIP team to make its own.
2017-11-01 15:09:59 +00:00
Ben Sander
9c229f7530
Refactor hip_hcc.
...
Don't require setting __HIP_PLATFORM_HCC__ ; Instead check if compiler is HCC.
The functions here use HCC-specific functionality so only work with HCC.
ANd they work regardless of the __HIP_PLATFORM_HCC__ setting so don't
require that.
Also remove the "hcc_detail" extra hierarchy level for hip_hcc.h as
it is not necessary. Remove hcc_detail/hip_hcc.h.
2017-06-30 08:26:15 -05:00
Sun, Peng
fd36303c24
Additional GGL make_kernel_functor_* macros, contributed by Alex
...
Change-Id: I01aabb7d2b5418fcefb1bbf78eb5d1888dbc5c96
2017-06-14 11:10:52 -05:00
Sun, Peng
a9808961bd
Improve HIP kernel names, attributes and codegen, contributed by Alex Voicu
...
Change-Id: I2cafbdc5a98e26c7f4fad84739c915e7dc09993c
2017-06-05 11:39:00 -05:00
Sun, Peng
6d4af1ab1f
update GGL to log launched kernel information
...
Change-Id: Ied0aa6055673c687071b4a579aecd17f0f3f09ce
2017-04-07 14:06:31 -05:00
Sun, Peng
ad18bf3b29
GGL update, add while 0 guard for hipLaunchKernel API
...
Change-Id: Ie48ef8ca2ab5e26a51febfcd92417902c33fbf66
2017-04-06 10:48:11 -05:00
Sun, Peng
1a8ea82497
add extra guard to grid_launch_GGL header
...
Change-Id: I120619c08ea2d084804fcb1639efbe6c4648dde9
2017-04-05 22:25:41 -05:00
Sun, Peng
a92cdbaf29
Add more include header file for GGL, to make it self-compilable
...
Change-Id: I833cb194784450fb86e7961a7f9fe196ce3c7da5
2017-04-03 11:16:35 -05:00
Sun, Peng
b1ed910942
GGL update, fix for thread-safe access to streams (accelerator_views).
...
Change-Id: I6dd329a85b3ba7de23d52823febee0c53857a981
2017-04-01 14:50:39 -05:00