Added a function acAutoOptimize to the interface and removed rk3_step_async in kernels.cuh (moved into rkStep)
This commit is contained in:
@@ -109,10 +109,10 @@ printDeviceInfo(const Device device)
|
||||
printf(" Local L1 cache supported: %d\n", props.localL1CacheSupported);
|
||||
printf(" Global L1 cache supported: %d\n", props.globalL1CacheSupported);
|
||||
printf(" L2 size: %d KiB\n", props.l2CacheSize / (1024));
|
||||
//MV: props.totalConstMem and props.sharedMemPerBlock cause assembler error
|
||||
//MV: while compiling in TIARA gp cluster. Therefore commeted out.
|
||||
//!! printf(" Total const mem: %ld KiB\n", props.totalConstMem / (1024));
|
||||
//!! printf(" Shared mem per block: %ld KiB\n", props.sharedMemPerBlock / (1024));
|
||||
// MV: props.totalConstMem and props.sharedMemPerBlock cause assembler error
|
||||
// MV: while compiling in TIARA gp cluster. Therefore commeted out.
|
||||
//!! printf(" Total const mem: %ld KiB\n", props.totalConstMem / (1024));
|
||||
//!! printf(" Shared mem per block: %ld KiB\n", props.sharedMemPerBlock / (1024));
|
||||
printf(" Other\n");
|
||||
printf(" Warp size: %d\n", props.warpSize);
|
||||
// printf(" Single to double perf. ratio: %dx\n",
|
||||
@@ -270,7 +270,23 @@ rkStep(const Device device, const StreamType stream_type, const int step_number,
|
||||
const int3& end, const AcReal dt)
|
||||
{
|
||||
cudaSetDevice(device->id);
|
||||
rk3_step_async(device->streams[stream_type], step_number, start, end, dt, &device->vba);
|
||||
|
||||
const dim3 tpb(32, 1, 4);
|
||||
|
||||
const int3 n = end - start;
|
||||
const dim3 bpg((unsigned int)ceil(n.x / AcReal(tpb.x)), //
|
||||
(unsigned int)ceil(n.y / AcReal(tpb.y)), //
|
||||
(unsigned int)ceil(n.z / AcReal(tpb.z)));
|
||||
|
||||
if (step_number == 0)
|
||||
solve<0><<<bpg, tpb, 0, device->streams[stream_type]>>>(start, end, device->vba, dt);
|
||||
else if (step_number == 1)
|
||||
solve<1><<<bpg, tpb, 0, device->streams[stream_type]>>>(start, end, device->vba, dt);
|
||||
else
|
||||
solve<2><<<bpg, tpb, 0, device->streams[stream_type]>>>(start, end, device->vba, dt);
|
||||
|
||||
ERRCHK_CUDA_KERNEL();
|
||||
|
||||
return AC_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -395,6 +411,14 @@ loadGlobalGrid(const Device device, const Grid grid)
|
||||
return AC_SUCCESS;
|
||||
}
|
||||
|
||||
AcResult
|
||||
autoOptimize(const Device device)
|
||||
{
|
||||
cudaSetDevice(device->id);
|
||||
|
||||
return AC_SUCCESS;
|
||||
}
|
||||
|
||||
#if PACKED_DATA_TRANSFERS
|
||||
// Functions for calling packed data transfers
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user