25template<
typename Derived>
60 return Derived::default_block_size_x();
69 std::string expr_str = schedule.
properties().at(
"block_size");
80 std::string val = schedule.
properties().at(
"nested_sync");
95 auto schedule_type = structured_control_flow::
117 schedule.
set_property(
"dimension", std::to_string(dimension));
134 if (schedule.
value() ==
"ROCM") {
146 std::string expr_str = schedule.
properties().at(
"block_size");
Definition exceptions.h:8
Base class for GPU schedule types (CUDA/ROCm) using CRTP pattern.
Definition gpu_schedule_type.h:26
static void nested_sync(structured_control_flow::ScheduleType &schedule, const bool nested_sync)
Set nested synchronization flag.
Definition gpu_schedule_type.h:87
static structured_control_flow::ScheduleType create()
Create a new GPU schedule type.
Definition gpu_schedule_type.h:94
static GPUDimension dimension(const structured_control_flow::ScheduleType &schedule)
Get the GPU dimension from a schedule.
Definition gpu_schedule_type.h:38
static void block_size(structured_control_flow::ScheduleType &schedule, const symbolic::Expression block_size)
Set the block size for a schedule.
Definition gpu_schedule_type.h:45
static void dimension(structured_control_flow::ScheduleType &schedule, const GPUDimension &dimension)
Set the GPU dimension for a schedule.
Definition gpu_schedule_type.h:31
static bool nested_sync(const structured_control_flow::ScheduleType &schedule)
Check if nested synchronization is enabled.
Definition gpu_schedule_type.h:76
static symbolic::Integer block_size(const structured_control_flow::ScheduleType &schedule)
Get the block size from a schedule Returns default values if not explicitly set:
Definition gpu_schedule_type.h:57
Definition json_serializer.h:22
Represents a schedule type for Map nodes.
Definition structured_loop.h:31
const std::unordered_map< std::string, std::string > & properties() const
Get all schedule properties.
Definition structured_loop.h:53
void set_property(const std::string &key, const std::string &value)
Set a schedule property.
Definition structured_loop.h:70
const std::string & value() const
Get the schedule type identifier.
Definition structured_loop.h:45
Integer integer(int64_t value)
Creates an integer constant.
SymEngine::RCP< const SymEngine::Basic > Expression
Reference-counted pointer to a symbolic expression (SymEngine Basic).
Definition symbolic.h:83
SymEngine::RCP< const SymEngine::Integer > Integer
Reference-counted pointer to a SymEngine Integer constant.
Definition symbolic.h:77
Definition cuda_arch.h:11
symbolic::Integer gpu_block_size(const structured_control_flow::ScheduleType &schedule)
Get the block size from any GPU schedule type Returns default values if not explicitly set:
Definition gpu_schedule_type.h:129
GPUDimension
Shared GPU dimension enum for CUDA/ROCm targets Represents the X, Y, Z dimensions used for GPU kernel...
Definition gpu_types.h:10
@ Z
Definition gpu_types.h:10
@ Y
Definition gpu_types.h:10
@ X
Definition gpu_types.h:10
GPUDimension gpu_dimension(const structured_control_flow::ScheduleType &schedule)
Get the GPU dimension from any GPU schedule type.
Definition gpu_schedule_type.h:107
Definition cutout_serializer.h:13
@ Offloader
Definition structured_loop.h:22