3#include <unordered_map>
45template<
typename ScheduleT>
58template<
typename ScheduleT>
70template<
typename ScheduleT>
81template<
typename ScheduleT>
93template<
typename GPUType>
118template<
typename ScheduleT>
119std::vector<structured_control_flow::Map*>
193 std::unordered_map<TargetLevel, structured_control_flow::ScheduleType>& output
202 std::unordered_map<TargetLevel, structured_control_flow::StructuredLoop*>& output
243extern template std::vector<structured_control_flow::Map*>
get_gpu_maps<
245extern template std::vector<structured_control_flow::Map*>
get_gpu_maps<
CUDA schedule type inheriting shared GPU functionality Provides CUDA-specific value() and default blo...
Definition cuda.h:43
CUDA schedule type inheriting shared GPU functionality Provides CUDA-specific value() and default blo...
Definition cuda.h:56
ROCM schedule type inheriting shared GPU functionality Provides ROCM-specific value() and default blo...
Definition rocm.h:43
ROCM schedule type inheriting shared GPU functionality Provides ROCM-specific value() and default blo...
Definition rocm.h:56
Base class for all structured control flow nodes in a StructuredSDFG.
Definition control_flow_node.h:44
Represents a parallel map loop with configurable scheduling.
Definition map.h:47
Represents a schedule type for Map nodes.
Definition structured_loop.h:31
A sequential container of control flow nodes.
Definition sequence.h:52
Base class for structured loop constructs.
Definition structured_loop.h:244
SymEngine::RCP< const SymEngine::Basic > Expression
Reference-counted pointer to a symbolic expression (SymEngine Basic).
Definition symbolic.h:83
std::set< Symbol, SymEngine::RCPBasicKeyLess > SymbolSet
Ordered set of symbols.
Definition symbolic.h:95
Definition cuda_library_node_rewriter_pass.h:11
Definition cuda_arch.h:11
TargetLevel
Definition gpu_offload_schedule_type.h:13
structured_control_flow::StructuredLoop * find_x_block_owning_warp_level(structured_control_flow::StructuredLoop &node, analysis::AnalysisManager &analysis_manager)
bool nested_parallelization_is_unsafe(structured_control_flow::StructuredLoop &loop, analysis::AnalysisManager &analysis_manager)
Whether parallelizing loop to a new GPU grid dimension would race on a shared container.
void get_nested_schedule_types(structured_control_flow::StructuredLoop &node, analysis::AnalysisManager &analysis_manager, std::unordered_map< TargetLevel, structured_control_flow::ScheduleType > &output)
symbolic::Expression find_nested_gpu_iterations(structured_control_flow::Map &node, analysis::AnalysisManager &analysis_manager, GPUDimension dimension)
Find the number of iterations for nested GPU maps in a given dimension.
bool is_grid_level(TargetLevel target_level)
symbolic::SymbolSet get_gpu_indvars(structured_control_flow::Map &node, analysis::AnalysisManager &analysis_manager, GPUDimension dimension)
Get all induction variables for GPU maps in a given dimension.
void validate_wave_maps(structured_control_flow::StructuredLoop &node, analysis::AnalysisManager &analysis_manager, int64_t warp_size)
symbolic::Expression find_nested_gpu_blocksize(structured_control_flow::Map &node, analysis::AnalysisManager &analysis_manager, GPUDimension dimension)
GPU map utility functions shared between CUDA and ROCm.
bool is_warp_level(TargetLevel target_level)
int64_t gpu_warp_size< sdfg::cuda::ScheduleType_CUDA_Offload >()
bool is_outermost_gpu_map(structured_control_flow::Map &node, analysis::AnalysisManager &analysis_manager)
Check if a map is the outermost GPU map in the loop tree.
bool is_block_level(TargetLevel target_level)
NestedFoldPlan analyze_nested_fold(structured_control_flow::StructuredLoop &loop, TargetLevel target_level, analysis::AnalysisManager &analysis_manager)
size_t perfectly_nested_depth(structured_control_flow::StructuredLoop *loop)
symbolic::Expression get_target_level_idx(TargetLevel target_level)
GPUDimension
Shared GPU dimension enum for CUDA/ROCm targets Represents the X, Y, Z dimensions used for GPU kernel...
Definition gpu_types.h:10
symbolic::SymbolSet target_level_indvars(structured_control_flow::StructuredLoop &node, analysis::AnalysisManager &analysis_manager, TargetLevel target_level)
symbolic::Expression get_target_level_dim(TargetLevel target_level, int warp_size)
bool is_gpu_schedule(const structured_control_flow::ScheduleType &schedule)
Check if a schedule type is a GPU schedule (CUDA or ROCM).
bool nested_warp_dim(structured_control_flow::StructuredLoop &loop, analysis::AnalysisManager &analysis_manager)
std::vector< structured_control_flow::Map * > get_gpu_maps(structured_control_flow::Map &node, analysis::AnalysisManager &analysis_manager, GPUDimension dimension)
Get all GPU Map nodes in a given dimension (in tree traversal order).
void get_nested_level_maps(structured_control_flow::StructuredLoop &node, analysis::AnalysisManager &analysis_manager, std::unordered_map< TargetLevel, structured_control_flow::StructuredLoop * > &output)
int64_t gpu_warp_size< sdfg::rocm::ScheduleType_ROCM_Offload >()
Definition rocm_library_node_rewriter_pass.h:9
Definition gpu_map_utils.h:158
structured_control_flow::Sequence * sequence
Definition gpu_map_utils.h:159
structured_control_flow::ControlFlowNode * before
Definition gpu_map_utils.h:160
Definition gpu_map_utils.h:163
bool unsafe
Definition gpu_map_utils.h:164
std::vector< FoldBarrier > barriers
Definition gpu_map_utils.h:165
Symbolic system for integer-based symbol analysis.