Astaroth  3.1
Scalable Multi-GPU Stencil Computations
Loading...
Searching...
No Matches
acc_runtime.h File Reference
#include <stdbool.h>
#include <stdio.h>
#include "ac_mpi.h"
#include "astaroth_device_headers.h"
#include "builtin_enums.h"
#include "datatypes.h"
#include "errchk.h"
#include "func_define.h"
#include "profiles_info.h"
#include "scalar_reduce_buffer_defs.h"
#include "user_built-in_constants.h"
#include "user_defines.h"
#include "user_input_typedefs.h"
#include <string.h>
#include "output_decl.h"
#include "comp_loaded_decl.h"
#include "comp_decl.h"
#include "info_loaded_decl.h"
#include "device_mesh_info_decl.h"
#include "array_decl.h"
#include "input_decl.h"
#include "scalar_reduce_buffers_in_vba.h"
#include "load_and_store_uniform_header.h"
Include dependency graph for acc_runtime.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  AcAutotuneMeasurement
struct  AcBuffer
struct  AcCompInfo
struct  AcCompInfoConfig
struct  AcCompInfoHasDefaultValue
struct  AcCompInfoLoaded
struct  AcDeviceKernelOutput
struct  AcGridInfo
struct  AcInputs
struct  AcMeshInfo
struct  AcMeshInfoLoadedInfo
struct  AcMeshInfoScalars
struct  AcReduceBuffer
struct  AcReduction
struct  AcScratchpadStates
struct  DeviceVertexBufferArray
struct  KernelReduceOutput
struct  ProfileBufferArray
struct  VertexBufferArray

Macros

#define AC_INDEX_ORDER(i, j, k, x, y, z)
#define AC_SIZE(arr)
#define CONSTEXPR
#define DEVICE_INLINE   __device__ __forceinline__
#define MAYBE_UNUSED
#define NUM_REDUCE_SCRATCHPADS   (2)

Typedefs

typedef AcAutotuneMeasurement(* AcMeasurementGatherFunc) (const AcAutotuneMeasurement)

Functions

AcResult acAllocateArrays (const AcMeshInfo config)
AcResult acBenchmarkKernel (AcKernel kernel, const int3 start, const int3 end, VertexBufferArray vba)
AcResult acFreeArrays (const AcMeshInfo config)
int acGetKernelReduceScratchPadMinSize ()
int acGetKernelReduceScratchPadSize (const AcKernel kernel)
const AcKernel * acGetKernels ()
AcKernel acGetOptimizedKernel (const AcKernel, const acKernelInputParams vba)
int3 acGetOptimTPB (const AcKernel, const Volume start, const Volume end)
size3_t acGetProfileReduceScratchPadDims (const int profile, const AcMeshDims dims)
size_t acGetRealScratchpadSize (const size_t i)
AcResult acInitializeRuntimeMPI (const int grid_pid, const int nprocs, AcMeasurementGatherFunc)
AcResult acKernelFlush (const cudaStream_t stream, AcReal *arr, const size_t n, const AcReal value)
AcResult acKernelFlushComplex (const cudaStream_t stream, AcComplex *arr, const size_t n, const AcComplex value)
AcResult acKernelFlushFloat (const cudaStream_t stream, float *arr, const size_t n, const float value)
AcResult acKernelFlushInt (const cudaStream_t stream, int *arr, const size_t n, const int value)
AcResult acKernelFlushReal (const cudaStream_t stream, AcReal *arr, const size_t n, const AcReal value)
Volume acKernelLaunchGetLastTPB (void)
AcResult acLaunchKernel (AcKernel func, const cudaStream_t stream, const Volume start, const Volume end, VertexBufferArray)
AcResult acLaunchKernelBase (const AcKernel kernel, const int3 start, const int3 end, VertexBufferArray vba, const dim3 bpg, const dim3 tpb, const size_t smem, const cudaStream_t stream, bool perform_error_check)
AcResult acLaunchKernelWithTPB (AcKernel kernel, const cudaStream_t stream, const Volume start_volume, const Volume end_volume, VertexBufferArray vba, const dim3 tpb)
AcResult acLoadStencil (const Stencil stencil, const cudaStream_t stream, const AcReal data[STENCIL_DEPTH][STENCIL_HEIGHT][STENCIL_WIDTH])
AcResult acPreprocessScratchPad (VertexBufferArray, const int variable, const AcType type, const AcReduceOp op)
AcResult acRandInitAlt (const uint64_t seed, const size_t count, const size_t rank)
void acRandQuit (void)
AcResult acRuntimeInit (const AcMeshInfo config)
bool acRuntimeIsInitialized ()
AcResult acRuntimeQuit ()
AcResult acSetReduceOffset (AcKernel func, const Volume start, const Volume end, VertexBufferArray)
AcResult acStoreStencil (const Stencil stencil, const cudaStream_t stream, AcReal data[STENCIL_DEPTH][STENCIL_HEIGHT][STENCIL_WIDTH])
AcResult acUpdateArrays (const AcMeshInfo config)
VertexBufferArray acVBACreate (const AcMeshInfo config)
void acVBADestroy (VertexBufferArray *vba, const AcMeshInfo config)
AcResult acVBAReset (const cudaStream_t stream, VertexBufferArray *vba)

Macro Definition Documentation

◆ AC_INDEX_ORDER

#define AC_INDEX_ORDER ( i,
j,
k,
x,
y,
z )
Value:
i + x*j + x*y*k

◆ AC_SIZE

#define AC_SIZE ( arr)
Value:
sizeof(arr)/sizeof(arr[0])

◆ CONSTEXPR

#define CONSTEXPR

◆ DEVICE_INLINE

#define DEVICE_INLINE   __device__ __forceinline__

◆ MAYBE_UNUSED

#define MAYBE_UNUSED

◆ NUM_REDUCE_SCRATCHPADS

#define NUM_REDUCE_SCRATCHPADS   (2)

Typedef Documentation

◆ AcMeasurementGatherFunc

typedef AcAutotuneMeasurement(* AcMeasurementGatherFunc) (const AcAutotuneMeasurement)

Function Documentation

◆ acAllocateArrays()

AcResult acAllocateArrays ( const AcMeshInfo config)

◆ acBenchmarkKernel()

AcResult acBenchmarkKernel ( AcKernel kernel,
const int3 start,
const int3 end,
VertexBufferArray vba )

◆ acFreeArrays()

AcResult acFreeArrays ( const AcMeshInfo config)

◆ acGetKernelReduceScratchPadMinSize()

int acGetKernelReduceScratchPadMinSize ( )

◆ acGetKernelReduceScratchPadSize()

int acGetKernelReduceScratchPadSize ( const AcKernel kernel)

◆ acGetKernels()

const AcKernel * acGetKernels ( )

◆ acGetOptimizedKernel()

AcKernel acGetOptimizedKernel ( const AcKernel ,
const acKernelInputParams vba )

◆ acGetOptimTPB()

int3 acGetOptimTPB ( const AcKernel ,
const Volume start,
const Volume end )

◆ acGetProfileReduceScratchPadDims()

size3_t acGetProfileReduceScratchPadDims ( const int profile,
const AcMeshDims dims )

◆ acGetRealScratchpadSize()

size_t acGetRealScratchpadSize ( const size_t i)

◆ acInitializeRuntimeMPI()

AcResult acInitializeRuntimeMPI ( const int grid_pid,
const int nprocs,
AcMeasurementGatherFunc  )

◆ acKernelFlush()

AcResult acKernelFlush ( const cudaStream_t stream,
AcReal * arr,
const size_t n,
const AcReal value )

◆ acKernelFlushComplex()

AcResult acKernelFlushComplex ( const cudaStream_t stream,
AcComplex * arr,
const size_t n,
const AcComplex value )

◆ acKernelFlushFloat()

AcResult acKernelFlushFloat ( const cudaStream_t stream,
float * arr,
const size_t n,
const float value )

◆ acKernelFlushInt()

AcResult acKernelFlushInt ( const cudaStream_t stream,
int * arr,
const size_t n,
const int value )

◆ acKernelFlushReal()

AcResult acKernelFlushReal ( const cudaStream_t stream,
AcReal * arr,
const size_t n,
const AcReal value )

◆ acKernelLaunchGetLastTPB()

Volume acKernelLaunchGetLastTPB ( void )

NOTE: stream unused. acUniform functions are completely synchronous.

◆ acLaunchKernel()

AcResult acLaunchKernel ( AcKernel func,
const cudaStream_t stream,
const Volume start,
const Volume end,
VertexBufferArray  )

◆ acLaunchKernelBase()

AcResult acLaunchKernelBase ( const AcKernel kernel,
const int3 start,
const int3 end,
VertexBufferArray vba,
const dim3 bpg,
const dim3 tpb,
const size_t smem,
const cudaStream_t stream,
bool perform_error_check )

◆ acLaunchKernelWithTPB()

AcResult acLaunchKernelWithTPB ( AcKernel kernel,
const cudaStream_t stream,
const Volume start_volume,
const Volume end_volume,
VertexBufferArray vba,
const dim3 tpb )

◆ acLoadStencil()

AcResult acLoadStencil ( const Stencil stencil,
const cudaStream_t stream,
const AcReal data[STENCIL_DEPTH][STENCIL_HEIGHT][STENCIL_WIDTH] )

NOTE: stream unused. acUniform functions are completely synchronous.

◆ acPreprocessScratchPad()

AcResult acPreprocessScratchPad ( VertexBufferArray ,
const int variable,
const AcType type,
const AcReduceOp op )

◆ acRandInitAlt()

AcResult acRandInitAlt ( const uint64_t seed,
const size_t count,
const size_t rank )

◆ acRandQuit()

void acRandQuit ( void )

◆ acRuntimeInit()

AcResult acRuntimeInit ( const AcMeshInfo config)

◆ acRuntimeIsInitialized()

bool acRuntimeIsInitialized ( )

◆ acRuntimeQuit()

AcResult acRuntimeQuit ( )

◆ acSetReduceOffset()

AcResult acSetReduceOffset ( AcKernel func,
const Volume start,
const Volume end,
VertexBufferArray  )

◆ acStoreStencil()

AcResult acStoreStencil ( const Stencil stencil,
const cudaStream_t stream,
AcReal data[STENCIL_DEPTH][STENCIL_HEIGHT][STENCIL_WIDTH] )

NOTE: stream unused. acUniform functions are completely synchronous.

◆ acUpdateArrays()

AcResult acUpdateArrays ( const AcMeshInfo config)

◆ acVBACreate()

VertexBufferArray acVBACreate ( const AcMeshInfo config)

◆ acVBADestroy()

void acVBADestroy ( VertexBufferArray * vba,
const AcMeshInfo config )

◆ acVBAReset()

AcResult acVBAReset ( const cudaStream_t stream,
VertexBufferArray * vba )