Modify CUDA code to compile with 12.4/12.5

repackage
sfilippone 4 months ago
parent 39cfcd3893
commit e3a55967a5

@ -1,8 +1,6 @@
#include <stdlib.h>
#include <stdio.h>
#include "cintrf.h"
#include "vectordev.h"
#include "psi_cuda_common.cuh"
@ -62,11 +60,9 @@ __global__ void CONCAT(GEN_PSI_FUNC_NAME(TYPE_SYMBOL),_krn)(int ii, int nrws,
ir += ldv;
}
idiag[i]=idval;
}
void CONCAT(GEN_PSI_FUNC_NAME(TYPE_SYMBOL),_)(spgpuHandle_t handle, int nrws, int i, int nr, int nza,
int baseIdx, int hacksz, int ldv, int nzm,
int *rS,int *devIdisp, int *devJa, VALUE_TYPE *devVal,
@ -76,8 +72,10 @@ void CONCAT(GEN_PSI_FUNC_NAME(TYPE_SYMBOL),_)(spgpuHandle_t handle, int nrws, i
dim3 grid ((nrws + THREAD_BLOCK - 1) / THREAD_BLOCK);
CONCAT(GEN_PSI_FUNC_NAME(TYPE_SYMBOL),_krn)
<<< grid, block, 0, handle->currentStream >>>(i,nrws, nr, nza, baseIdx, hacksz, ldv, nzm,
rS,devIdisp,devJa,devVal,idiag, rP,cM);
<<< grid, block, 0, handle->currentStream >>>(i,nrws, nr, nza, baseIdx,
hacksz, ldv, nzm,
rS,devIdisp,devJa,devVal,
idiag, rP,cM);
}
@ -89,16 +87,17 @@ GEN_PSI_FUNC_NAME(TYPE_SYMBOL)
(spgpuHandle_t handle, int nr, int nc, int nza, int baseIdx, int hacksz, int ldv, int nzm,
int *rS,int *devIdisp, int *devJa, VALUE_TYPE *devVal,
int *idiag, int *rP, VALUE_TYPE *cM)
{ int i,j, nrws;
{ int i, nrws;
//int maxNForACall = THREAD_BLOCK*handle->maxGridSizeX;
int maxNForACall = max(handle->maxGridSizeX, THREAD_BLOCK*handle->maxGridSizeX);
//fprintf(stderr,"Loop on j: %d\n",j);
for (i=0; i<nr; i+=nrws) {
nrws = MIN(maxNForACall, nr - i);
//fprintf(stderr,"ifirst: %d i : %d nrws: %d i + ifirst + (nrws -1) -1 %d \n",ifirst,i,nrws,i + ifirst + (nrws -1) -1);
CONCAT(GEN_PSI_FUNC_NAME(TYPE_SYMBOL),_)(handle,nrws,i, nr, nza, baseIdx, hacksz, ldv, nzm,
rS,devIdisp, devJa, devVal, idiag, rP, cM);
CONCAT(GEN_PSI_FUNC_NAME(TYPE_SYMBOL),_)(handle,nrws,i, nr, nza, baseIdx,
hacksz, ldv, nzm,
rS,devIdisp, devJa, devVal,
idiag, rP, cM);
}
}

@ -1,8 +1,6 @@
#include <stdlib.h>
#include <stdio.h>
#include "cintrf.h"
#include "vectordev.h"
#include "psi_cuda_common.cuh"

@ -2,9 +2,7 @@
#include <stdio.h>
#include "cintrf.h"
#include "vectordev.h"
#define VALUE_TYPE cuFloatComplex
#define TYPE_SYMBOL c
#include "psi_cuda_CopyCooToElg.cuh"

@ -2,9 +2,6 @@
#include <stdio.h>
#include "cintrf.h"
#include "vectordev.h"
#define VALUE_TYPE cuFloatComplex
#define TYPE_SYMBOL c
#include "psi_cuda_CopyCooToHlg.cuh"

@ -2,9 +2,6 @@
#include <stdio.h>
#include "cintrf.h"
#include "vectordev.h"
#define VALUE_TYPE double
#define TYPE_SYMBOL d
#include "psi_cuda_CopyCooToElg.cuh"

@ -2,9 +2,6 @@
#include <stdio.h>
#include "cintrf.h"
#include "vectordev.h"
#define VALUE_TYPE double
#define TYPE_SYMBOL d
#include "psi_cuda_CopyCooToHlg.cuh"

@ -2,9 +2,6 @@
#include <stdio.h>
#include "cintrf.h"
#include "vectordev.h"
#define VALUE_TYPE float
#define TYPE_SYMBOL s
#include "psi_cuda_CopyCooToElg.cuh"

@ -2,9 +2,6 @@
#include <stdio.h>
#include "cintrf.h"
#include "vectordev.h"
#define VALUE_TYPE float
#define TYPE_SYMBOL s
#include "psi_cuda_CopyCooToHlg.cuh"

@ -2,9 +2,6 @@
#include <stdio.h>
#include "cintrf.h"
#include "vectordev.h"
#define VALUE_TYPE cuDoubleComplex
#define TYPE_SYMBOL z
#include "psi_cuda_CopyCooToElg.cuh"

@ -2,9 +2,6 @@
#include <stdio.h>
#include "cintrf.h"
#include "vectordev.h"
#define VALUE_TYPE cuDoubleComplex
#define TYPE_SYMBOL z
#include "psi_cuda_CopyCooToHlg.cuh"

@ -35,7 +35,6 @@
#include <cuda_runtime.h>
#include <cusparse_v2.h>
#include "cintrf.h"
#include "fcusparse.h"
#include "ccusparse.h"

@ -37,10 +37,9 @@
#include <stdio.h>
#include "core.h"
#include "cuda_util.h"
#include "vector.h"
#include "vectordev.h"
//#include "cuda_util.h"
//#include "vector.h"
//#include "vectordev.h"
#define ELL_PITCH_ALIGN_S 32
#define ELL_PITCH_ALIGN_D 16

@ -35,7 +35,6 @@
#include <cuda_runtime.h>
#include <cusparse_v2.h>
#include "cintrf.h"
#include "fcusparse.h"
#include "dcusparse.h"

@ -33,6 +33,7 @@
#define _DIAGDEV_H_
#include "cintrf.h"
#include "vectordev.h"
#include "dia.h"
struct DiagDevice

@ -34,6 +34,7 @@
#define _DNSDEV_H_
#include "cintrf.h"
#include "vectordev.h"
#include "cuComplex.h"
#include "cublas_v2.h"

@ -34,6 +34,7 @@
#define _ELLDEV_H_
#include "cintrf.h"
#include "vectordev.h"
#include "cuComplex.h"
#include "ell.h"

@ -34,7 +34,6 @@
#include <stdlib.h>
#include <cuda_runtime.h>
#include "cintrf.h"
#include "fcusparse.h"
static cusparseHandle_t *cusparse_handle=NULL;

@ -40,6 +40,7 @@
#include <cusparse.h>
#endif
#include "cintrf.h"
#include "vectordev.h"
int FcusparseCreate();
int FcusparseDestroy();

@ -33,6 +33,7 @@
#define _HDIAGDEV_H_
#include "cintrf.h"
#include "vectordev.h"
#include "hdia.h"
struct HdiagDevice

@ -34,7 +34,7 @@
#include "cintrf.h"
#include "hell.h"
#include "vectordev.h"
typedef struct hlldevice
{

@ -35,7 +35,6 @@
#include <cuda_runtime.h>
#include <cusparse_v2.h>
#include "cintrf.h"
#include "fcusparse.h"
#include "scusparse.h"

@ -28,13 +28,12 @@
/* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */
/* POSSIBILITY OF SUCH DAMAGE. */
#pragma once
//#include "utils.h"
#include "cuda_runtime.h"
//#include "common.h"
#include "cintrf.h"
//#include "cintrf.h"
#include <complex.h>
struct MultiVectDevice
@ -85,3 +84,4 @@ int allocMultiVecDevice(void ** remoteMultiVec, struct MultiVectorDeviceParams *
int getMultiVecDeviceSize(void* deviceVec);
int getMultiVecDeviceCount(void* deviceVec);
int getMultiVecDevicePitch(void* deviceVec);

@ -35,7 +35,6 @@
#include <cuda_runtime.h>
#include <cusparse_v2.h>
#include "cintrf.h"
#include "fcusparse.h"
#include "zcusparse.h"

Loading…
Cancel
Save