|
Astaroth
3.1
Scalable Multi-GPU Stencil Computations
|
#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"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) |
| #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) |
| typedef AcAutotuneMeasurement(* AcMeasurementGatherFunc) (const AcAutotuneMeasurement) |
| 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 | ) |
NOTE: stream unused. acUniform functions are completely synchronous.
| 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] ) |
NOTE: stream unused. acUniform functions are completely synchronous.
| 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] ) |
NOTE: stream unused. acUniform functions are completely synchronous.
| 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 ) |