Advanced Computing Platform for Theoretical Physics

Commit dfe423a8 authored by mikeaclark's avatar mikeaclark
Browse files

First version of gauge field unpacking, not yet fully tested.

git-svn-id: http://lattice.bu.edu/qcdalg/cuda/quda@505 be54200a-260c-0410-bdd7-ce6af2a381ab
parent 08aea0d0
This diff is collapsed.
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
extern "C" { extern "C" {
#endif #endif
void createGaugeField(FullGauge *cudaGauge, void *cpuGauge, ReconstructType reconstruct, void createGaugeField(FullGauge *cudaGauge, void *cpuGauge, ReconstructType reconstruct, Tboundary t_boundary,
Precision precision, int *X, double anisotropy, int blockDim); Precision precision, int *X, double anisotropy, int blockDim);
void freeGaugeField(FullGauge *cudaCauge); void freeGaugeField(FullGauge *cudaCauge);
......
...@@ -122,12 +122,12 @@ void loadGaugeQuda(void *h_gauge, QudaGaugeParam *param) ...@@ -122,12 +122,12 @@ void loadGaugeQuda(void *h_gauge, QudaGaugeParam *param)
gauge_param->packed_size = (gauge_param->reconstruct == QUDA_RECONSTRUCT_8) ? 8 : 12; gauge_param->packed_size = (gauge_param->reconstruct == QUDA_RECONSTRUCT_8) ? 8 : 12;
createGaugeField(&cudaGaugePrecise, h_gauge, gauge_param->reconstruct, createGaugeField(&cudaGaugePrecise, h_gauge, gauge_param->reconstruct, gauge_param->t_boundary,
gauge_param->cuda_prec, gauge_param->X, gauge_param->anisotropy, gauge_param->blockDim); gauge_param->cuda_prec, gauge_param->X, gauge_param->anisotropy, gauge_param->blockDim);
gauge_param->gaugeGiB = 2.0*cudaGaugePrecise.bytes/ (1 << 30); gauge_param->gaugeGiB = 2.0*cudaGaugePrecise.bytes/ (1 << 30);
if (gauge_param->cuda_prec_sloppy != gauge_param->cuda_prec || if (gauge_param->cuda_prec_sloppy != gauge_param->cuda_prec ||
gauge_param->reconstruct_sloppy != gauge_param->reconstruct) { gauge_param->reconstruct_sloppy != gauge_param->reconstruct) {
createGaugeField(&cudaGaugeSloppy, h_gauge, gauge_param->reconstruct_sloppy, createGaugeField(&cudaGaugeSloppy, h_gauge, gauge_param->reconstruct_sloppy, gauge_param->t_boundary,
gauge_param->cuda_prec_sloppy, gauge_param->X, gauge_param->anisotropy, gauge_param->cuda_prec_sloppy, gauge_param->X, gauge_param->anisotropy,
gauge_param->blockDim_sloppy); gauge_param->blockDim_sloppy);
gauge_param->gaugeGiB += 2.0*cudaGaugeSloppy.bytes/ (1 << 30); gauge_param->gaugeGiB += 2.0*cudaGaugeSloppy.bytes/ (1 << 30);
......
...@@ -99,13 +99,13 @@ void packTest() { ...@@ -99,13 +99,13 @@ void packTest() {
stopwatchStart(); stopwatchStart();
param.gauge_order = QUDA_CPS_WILSON_GAUGE_ORDER; param.gauge_order = QUDA_CPS_WILSON_GAUGE_ORDER;
createGaugeField(&cudaGaugePrecise, cpsGauge, param.reconstruct, param.cuda_prec, param.X, 1.0, param.blockDim); createGaugeField(&cudaGaugePrecise, cpsGauge, param.reconstruct, param.t_boundary, param.cuda_prec, param.X, 1.0, param.blockDim);
double cpsGtime = stopwatchReadSeconds(); double cpsGtime = stopwatchReadSeconds();
printf("CPS Gauge send time = %e seconds\n", cpsGtime); printf("CPS Gauge send time = %e seconds\n", cpsGtime);
stopwatchStart(); stopwatchStart();
param.gauge_order = QUDA_QDP_GAUGE_ORDER; param.gauge_order = QUDA_QDP_GAUGE_ORDER;
createGaugeField(&cudaGaugePrecise, qdpGauge, param.reconstruct, param.cuda_prec, param.X, 1.0, param.blockDim); createGaugeField(&cudaGaugePrecise, qdpGauge, param.reconstruct, param.t_boundary, param.cuda_prec, param.X, 1.0, param.blockDim);
double qdpGtime = stopwatchReadSeconds(); double qdpGtime = stopwatchReadSeconds();
printf("QDP Gauge send time = %e seconds\n", qdpGtime); printf("QDP Gauge send time = %e seconds\n", qdpGtime);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment