Unverified Commit d24ce6ed authored by David Clark's avatar David Clark Committed by GitHub
Browse files

Minor CUDA Changes (#2947)



* Changes name of NVRTC program

* Adds launch bounds for findInteractingBlocks

* Replaces launch bound parameter with named constant
Co-authored-by: default avatarDavid Clark <daclark@nvidia.com>
parent fd66bc70
...@@ -176,7 +176,7 @@ __device__ int saveSinglePairs(int x, int* atoms, int* flags, int length, unsign ...@@ -176,7 +176,7 @@ __device__ int saveSinglePairs(int x, int* atoms, int* flags, int length, unsign
* [in] rebuildNeighbourList - whether or not to execute this kernel * [in] rebuildNeighbourList - whether or not to execute this kernel
* *
*/ */
extern "C" __global__ void findBlocksWithInteractions(real4 periodicBoxSize, real4 invPeriodicBoxSize, real4 periodicBoxVecX, real4 periodicBoxVecY, real4 periodicBoxVecZ, extern "C" __global__ __launch_bounds__(GROUP_SIZE,1) void findBlocksWithInteractions(real4 periodicBoxSize, real4 invPeriodicBoxSize, real4 periodicBoxVecX, real4 periodicBoxVecY, real4 periodicBoxVecZ,
unsigned int* __restrict__ interactionCount, int* __restrict__ interactingTiles, unsigned int* __restrict__ interactingAtoms, unsigned int* __restrict__ interactionCount, int* __restrict__ interactingTiles, unsigned int* __restrict__ interactingAtoms,
int2* __restrict__ singlePairs, const real4* __restrict__ posq, unsigned int maxTiles, unsigned int maxSinglePairs, int2* __restrict__ singlePairs, const real4* __restrict__ posq, unsigned int maxTiles, unsigned int maxSinglePairs,
unsigned int startBlockIndex, unsigned int numBlocks, real2* __restrict__ sortedBlocks, const real4* __restrict__ sortedBlockCenter, unsigned int startBlockIndex, unsigned int numBlocks, real2* __restrict__ sortedBlocks, const real4* __restrict__ sortedBlockCenter,
......
...@@ -64,7 +64,7 @@ string CudaRuntimeCompilerKernel::createModule(const string& source, const strin ...@@ -64,7 +64,7 @@ string CudaRuntimeCompilerKernel::createModule(const string& source, const strin
// Compile the program to PTX. // Compile the program to PTX.
nvrtcProgram program; nvrtcProgram program;
CHECK_RESULT(nvrtcCreateProgram(&program, source.c_str(), "", 0, NULL, NULL), "Error creating program"); CHECK_RESULT(nvrtcCreateProgram(&program, source.c_str(), NULL, 0, NULL, NULL), "Error creating program");
try { try {
nvrtcResult result = nvrtcCompileProgram(program, options.size(), &options[0]); nvrtcResult result = nvrtcCompileProgram(program, options.size(), &options[0]);
if (result != NVRTC_SUCCESS) { if (result != NVRTC_SUCCESS) {
......
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