diff --git a/hpvm/test/parboil/benchmarks/sgemm/src/hpvm/kernel.cl b/hpvm/test/parboil/benchmarks/sgemm/src/hpvm/kernel.cl deleted file mode 100644 index abf5d790ac927f2563f6c6e67a3571e689782495..0000000000000000000000000000000000000000 --- a/hpvm/test/parboil/benchmarks/sgemm/src/hpvm/kernel.cl +++ /dev/null @@ -1,27 +0,0 @@ -/*************************************************************************** - *cr - *cr (C) Copyright 2010 The Board of Trustees of the - *cr University of Illinois - *cr All Rights Reserved - *cr - ***************************************************************************/ - -/* - * Kernel of dense matrix-matrix multiplication kernel. - */ - -__kernel void mysgemmNT(__global const float* A, long bytes_A, int lda, __global const float* B, long bytes_B, int ldb, __global float* C, long bytes_C, - int ldc, int k, float alpha, float beta) -{ - float c = 0.0f; - int m = get_global_id(0); - int n = get_global_id(1); - - for (int i = 0; i < k; ++i) { - float a = A[m + i * lda]; - float b = B[n + i * ldb]; - c += a * b; - } - C[m+n*ldc] = C[m+n*ldc] * beta + alpha * c; -} - diff --git a/hpvm/test/parboil/benchmarks/spmv/src/hpvm/kernel.cl b/hpvm/test/parboil/benchmarks/spmv/src/hpvm/kernel.cl deleted file mode 100644 index 8c19a22511cd4c65364cb55c5df1a22d12b182b7..0000000000000000000000000000000000000000 --- a/hpvm/test/parboil/benchmarks/spmv/src/hpvm/kernel.cl +++ /dev/null @@ -1,73 +0,0 @@ -/*************************************************************************** - *cr - *cr (C) Copyright 2010 The Board of Trustees of the - *cr University of Illinois - *cr All Rights Reserved - *cr - ***************************************************************************/ -#define WARP_BITS 5 - -__kernel void spmv_jds(__global float *dst_vector, __global float *d_data, - __global int *d_index, __global int *d_perm, - __global float *x_vec, const int dim, - __constant int *jds_ptr_int, - __constant int *sh_zcnt_int) -{ - int ix = get_global_id(0); - int warp_id=ix>>WARP_BITS; - - if(ix<dim) - { - float sum=0.0f; - int bound=sh_zcnt_int[warp_id]; - //prefetch 0 - int j=jds_ptr_int[0]+ix; - float d = d_data[j]; - int i = d_index[j]; - float t = x_vec[i]; - - if (bound>1) //bound >=2 - { - //prefetch 1 - j=jds_ptr_int[1]+ix; - i = d_index[j]; - int in; - float dn; - float tn; - for(int k=2;k<bound;k++ ) - { - //prefetch k-1 - dn = d_data[j]; - //prefetch k - j=jds_ptr_int[k]+ix; - in = d_index[j]; - //prefetch k-1 - tn = x_vec[i]; - - //compute k-2 - sum += d*t; - //sweep to k - i = in; - //sweep to k-1 - d = dn; - t =tn; - } - - //fetch last - dn = d_data[j]; - tn = x_vec[i]; - - //compute last-1 - sum += d*t; - //sweep to last - d=dn; - t=tn; - } - //compute last - sum += d*t; // 3 3 - - //write out data - dst_vector[d_perm[ix]]=sum; - } -} - diff --git a/hpvm/test/parboil/benchmarks/spmv/vectorgen/vectorgen.cc b/hpvm/test/parboil/benchmarks/spmv/vectorgen/vectorgen.cc deleted file mode 100644 index e94700924dba991140c6db55994f3e7805f90a29..0000000000000000000000000000000000000000 --- a/hpvm/test/parboil/benchmarks/spmv/vectorgen/vectorgen.cc +++ /dev/null @@ -1,41 +0,0 @@ -#include <endian.h> -#include <inttypes.h> -#include <stdio.h> -#include <stdlib.h> - -#if __BYTE_ORDER != __LITTLE_ENDIAN -#error "File I/O is not implemented for this system: wrong endianness." -#endif - -static int generate_vector(float *x_vector, int dim) { - srand(54321); - int i; - for (i = 0; i < dim; i++) { - x_vector[i] = (rand() / (float)RAND_MAX); - } - return 0; -} - -void outputData(char *fName, float *A0, int dim) { - FILE *fid = fopen(fName, "w"); - if (fid == NULL) { - fprintf(stderr, "Cannot open output file\n"); - exit(-1); - } - - fwrite(A0, sizeof(float), dim, fid); - - fclose(fid); -} - -int main(int argc, char **argv) { - - int dim; - dim = atoi(argv[1]); - char *writefn = argv[2]; - float *outV = (float *)malloc(dim * sizeof(float)); - generate_vector(outV, dim); - outputData(writefn, outV, dim); - - return 0; -} diff --git a/hpvm/test/parboil/benchmarks/stencil/src/hpvm/kernel.cl b/hpvm/test/parboil/benchmarks/stencil/src/hpvm/kernel.cl deleted file mode 100644 index 4c5d1263db5948e4e61ea2baa27261613cd0ea06..0000000000000000000000000000000000000000 --- a/hpvm/test/parboil/benchmarks/stencil/src/hpvm/kernel.cl +++ /dev/null @@ -1,28 +0,0 @@ -/*************************************************************************** - *cr - *cr (C) Copyright 2010 The Board of Trustees of the - *cr University of Illinois - *cr All Rights Reserved - *cr - ***************************************************************************/ - -#include "common.h" - -__kernel void naive_kernel(float c0,float c1,__global float* A0,__global float *Anext,int nx,int ny,int nz) -{ - int i = get_global_id(0)+1; - int j = get_global_id(1)+1; - int k = get_global_id(2)+1; - -if(i<nx-1) -{ - Anext[Index3D (nx, ny, i, j, k)] = c1 * - ( A0[Index3D (nx, ny, i, j, k + 1)] + - A0[Index3D (nx, ny, i, j, k - 1)] + - A0[Index3D (nx, ny, i, j + 1, k)] + - A0[Index3D (nx, ny, i, j - 1, k)] + - A0[Index3D (nx, ny, i + 1, j, k)] + - A0[Index3D (nx, ny, i - 1, j, k)] ) - - A0[Index3D (nx, ny, i, j, k)] * c0; -} -}