pyjac.core.CUDAParams module

Module containing parameters that control CUDA code generation

param Jacob_Unroll:
 The number of reactions to attempt to place in each Jacobian reaction update subfile
type Jacob_Unroll:
 int
param Jacob_Spec_Unroll:
 The number of species to attempt to place in each Jacobian species update subfile
type Jacob_Spec_Unroll:
 int
param Rates_Unroll:
 The number of reactions to limit each reaction rate subfile to
type Rates_Unroll:
 int
param Max_Lines:
 The number of lines to attempt to limit each Jacobian reaction update subfile to
type Max_Lines:int
param Max_Spec_Lines:
 The number of lines to attempt to limit each Jacobian species update subfile to
type Max_Spec_Lines:
 int
pyjac.core.CUDAParams.get_L1_size(L1_Preferred)[source]

Returns the size (in number of doubles) of the L1 cache for sm_20

Parameters:L1_Preferred (bool) – If true, prefer a larger L1 cache over more shared memory (recommended)
pyjac.core.CUDAParams.get_shared_size(L1_Preferred)[source]

Returns the size (in number of doubles) of shared memory for sm_20

Parameters:L1_Preferred (bool) – If true, prefer a larger L1 cache over more shared memory (recommended)
pyjac.core.CUDAParams.get_register_count(num_blocks, num_threads)[source]

Returns the number of registers available per block for sm_20

Parameters:
  • num_blocks (int) – The number of blocks to target per kernel launch
  • num_threads (int) – The number of threads to target per kernel launch
pyjac.core.CUDAParams.write_launch_bounds(builddir, blocks_per_sm=8, num_threads=64, L1_PREFERRED=True, no_shared=False)[source]

Creates the launch_bounds.cuh file that may be included by CUDA solvers

Parameters:
  • builddir (str) – The directory to place the source file in
  • blocks_per_sm (int, optional) – The number of blocks to target per kernel launch
  • num_threads (int, optional) – The number of threads per block in the per kernel launch
  • L1_PREFERRED (bool, optional) – If true, prefer a larger L1 cache over more shared memory (recommended)
  • no_shared (bool, optional) – If false, turn off shared memory
Returns:

Return type:

None