This introduces LipoProteinLipase (lpl), a simple tool for creating fat binaries. It represents a direct replacement of the creaky hccgenco.sh script, which had various issues. The format it uses is that of a code object bundle, generated by the Clang Offload Bundler. The output is always suffixed with the ".adipose" extension. It is shared with HCC. The hipcc script and associated tests are modified to use lpl. Help can be obtained by invoking lpl --help. A more computer-sciency / corporate friendly name is likely to be beneficial, which is a reason for choosing easily searchable/replaceable names such as lpl or adipose.

[ROCm/clr commit: 4e0739c68a]
Tento commit je obsažen v:
Alex Voicu
2017-12-08 04:22:57 +00:00
rodič a25a01f2c9
revize aa48cc7b55
17 změnil soubory, kde provedl 3958 přidání a 94 odebrání
+3 -4
Zobrazit soubor
@@ -30,7 +30,7 @@ THE SOFTWARE.
#define LEN 64
#define SIZE LEN*sizeof(float)
#define fileName "vcpy_kernel.code"
#define fileName "vcpy_kernel.code.adipose"
float myDeviceGlobal;
float myDeviceGlobalArray[16];
#define HIP_CHECK(cmd) \
@@ -80,7 +80,6 @@ int main(){
uint32_t one = 1;
struct {
uint32_t _hidden[6]; // genco path + wrapper-gen pass use hidden arguments.
void * _Ad;
void * _Bd;
} args;
@@ -111,7 +110,7 @@ int main(){
HIP_LAUNCH_PARAM_END
};
{
{
hipFunction_t Function;
HIP_CHECK(hipModuleGetFunction(&Function, Module, "hello_world"));
HIP_CHECK(hipModuleLaunchKernel(Function, 1, 1, 1, LEN, 1, 1, 0, 0, NULL, (void**)&config));
@@ -136,7 +135,7 @@ int main(){
};
}
{
{
hipFunction_t Function;
HIP_CHECK(hipModuleGetFunction(&Function, Module, "test_globals"));
HIP_CHECK(hipModuleLaunchKernel(Function, 1, 1, 1, LEN, 1, 1, 0, 0, NULL, (void**)&config));
+2 -2
Zobrazit soubor
@@ -27,13 +27,13 @@ THE SOFTWARE.
extern float myDeviceGlobal;
extern float myDeviceGlobalArray[16];;
extern "C" __global__ void hello_world(hipLaunchParm lp, const float *a, float *b)
extern "C" __global__ void hello_world(const float *a, float *b)
{
int tx = hipThreadIdx_x;
b[tx] = a[tx];
}
extern "C" __global__ void test_globals(hipLaunchParm lp, const float *a, float *b)
extern "C" __global__ void test_globals(const float *a, float *b)
{
int tx = hipThreadIdx_x;
b[tx] = a[tx] + myDeviceGlobal+ myDeviceGlobalArray[tx%ARRAY_SIZE] ;