18 #include <mapping_options.pb.h>
96 using Setter = std::function<void(T)>;
130 inline size_t size()
const;
182 inline CudaDim(std::initializer_list<uint64_t> il);
183 inline CudaDim(std::vector<uint64_t> il);
189 using CudaDimView::operator=;
204 using CudaDimView::operator=;
216 using CudaDimView::operator=;
235 inline size_t size()
const;
268 inline Tiling(std::initializer_list<uint64_t> il);
269 inline Tiling(
const std::vector<uint64_t>& sizes);
282 isl_bool(isl_union_map*, isl_union_map*,
int,
int,
int,
void*)>;
368 template <
typename... Args>
416 const std::string& str);
447 namespace callbacks {
449 __isl_take isl_basic_set* lp,
452 __isl_keep isl_id_list* stmt_ids,
458 __isl_take isl_union_map* original_schedule,
459 __isl_take isl_union_map* updated_schedule,
460 int n_updated_coincident,
461 int n_original_coincident,
466 __isl_take isl_union_map* original_schedule,
467 __isl_take isl_union_map* updated_schedule,
468 int n_updated_coincident,
469 int n_original_coincident,
474 __isl_take isl_union_map* original_schedule,
475 __isl_take isl_union_map* updated_schedule,
476 int n_updated_coincident,
477 int n_original_coincident,
SchedulerOptions(const SchedulerOptionsProto &proto)
Definition: mapping_options.h:322
TilingProto & proto
Definition: mapping_options.h:256
MappingOptions & mapToThreads(std::initializer_list< uint64_t > threads)
Definition: mapping_options-inl.h:273
SchedulerOptions(const SchedulerOptionsView &view)
Definition: mapping_options.h:324
bool operator==(const CudaDimView &view) const
Compare the values with those from another view.
Definition: mapping_options-inl.h:179
isl_bool FuseAll(__isl_take isl_union_map *original_schedule, __isl_take isl_union_map *updated_schedule, int n_updated_coincident, int n_original_coincident, int is_along_edge, void *)
"Materialized" TilingView.
Definition: mapping_options.h:260
static MappingOptions makeUnmappedMappingOptions()
CudaDim(const CudaDimView &view)
Definition: mapping_options.h:180
__isl_give isl_basic_set * AddPositiveCoefficientConstraints(__isl_take isl_basic_set *lp, int n_param, int dim, __isl_keep isl_id_list *stmt_ids, int *node_n_params, int *node_n_dims, void *)
ValueAccessor< uint64_t > operator[](size_t i)
Definition: mapping_options-inl.h:46
MappingOptions & intraTileScheduleAllowSkewing(bool b)
Definition: mapping_options-inl.h:411
size_t size() const
Number of values held.
Definition: mapping_options-inl.h:42
Specializing CudaDim to differentiate between Block and Grid sizes.
Definition: mapping_options.h:208
MappingOptions & usePrivateMemory(bool b)
Definition: mapping_options-inl.h:331
static MappingOptions makeGroupConvolutionMappingOptions()
SchedulerOptionsView intraTileScheduleOptions
Definition: mapping_options.h:444
CudaDimView & operator=(const CudaDimView &view)
Assign the values from another view.
Definition: mapping_options-inl.h:174
Definition: mapping_options.h:120
friend std::ostream & operator<<(std::ostream &os, const MappingOptions &options)
Output operator.
CudaDim(const CudaDimProto &proto)
Definition: mapping_options.h:178
MappingOptions & unroll(uint64_t size)
Definition: mapping_options-inl.h:321
"Materialized" SchedulerOptionsView.
Definition: mapping_options.h:317
MappingOptions & useSharedMemory(bool b)
Definition: mapping_options-inl.h:326
CudaDim()
Definition: mapping_options.h:175
ValueAccessor(const Setter &s, const Getter &g)
Definition: mapping_options.h:99
friend std::ostream & operator<<(std::ostream &os, const CudaDimView &view)
MappingOptions & outerScheduleFusionStrategy(FusionStrategy fs)
Definition: mapping_options-inl.h:374
Tiling(const TilingView &view)
Definition: mapping_options.h:266
static MappingOptions makeNaiveMappingOptions()
std::function< T()> Getter
Definition: mapping_options.h:97
MappingOptions & matchLibraryCalls(bool b)
Definition: mapping_options-inl.h:356
CudaDimView block
Definition: mapping_options.h:440
TilingProto ownedProto_
Definition: mapping_options.h:272
Tiling(const Tiling &t)
Definition: mapping_options.h:263
std::function< isl_basic_set *(isl_basic_set *, int, int, isl_id_list *, int *, int *, void *)> ConstraintsCallback
Definition: mapping_options.h:290
bool operator==(const SchedulerOptionsView &view) const
Compare the values with those from another view.
Definition: mapping_options-inl.h:196
bool operator==(const MappingOptions &options) const
Compare with another message.
Definition: mapping_options-inl.h:235
Block(std::initializer_list< uint64_t > il)
Definition: mapping_options.h:201
TilingView(TilingProto &p)
Definition: mapping_options.h:229
CudaDimView(CudaDimProto &buf)
Definition: mapping_options.h:127
MappingOptionsProto proto
Definition: mapping_options.h:437
size_t size() const
Number of values held.
Definition: mapping_options-inl.h:105
Grid(std::vector< uint64_t > il)
Definition: mapping_options.h:214
MappingOptions & mapToBlocks(std::initializer_list< uint64_t > blocks)
Definition: mapping_options-inl.h:297
Block(const CudaDimProto &proto)
Definition: mapping_options.h:200
isl_bool FuseNone(__isl_take isl_union_map *original_schedule, __isl_take isl_union_map *updated_schedule, int n_updated_coincident, int n_original_coincident, int is_along_edge, void *)
bool operator!=(const MappingOptions &options) const
Definition: mapping_options-inl.h:239
Grid(const CudaDimProto &proto)
Definition: mapping_options.h:212
Grid(const CudaDimView &view)
Definition: mapping_options.h:211
Tiling()
Definition: mapping_options.h:262
TilingView tiling
Definition: mapping_options.h:442
SchedulerOptionsProto ownedProto_
Definition: mapping_options.h:328
static MappingOptions makeMlpMappingOptions()
MappingOptions & intraTileSchedulePositiveOrthant(bool b)
Definition: mapping_options-inl.h:416
Definition: mapping_options.h:336
MappingOptions & outerSchedulePositiveOrthant(bool b)
Definition: mapping_options-inl.h:392
MappingOptions & fixParametersBeforeScheduling(bool b)
Definition: mapping_options-inl.h:341
TilingView & operator=(const TilingView &view)
Assign the values from another view.
Definition: mapping_options-inl.h:58
std::string toProtobufSerializedString() const
Get a string with a serialized protocol buffers message.
Definition: mapping_options-inl.h:243
std::string toCommaSeparatedString() const
Conversion to string and output operators.
MappingOptions & intraTileScheduleFusionStrategy(FusionStrategy fs)
Definition: mapping_options-inl.h:397
Tiling(const TilingProto &proto)
Definition: mapping_options.h:264
bool operator!=(const TilingView &view) const
Definition: mapping_options-inl.h:67
bool operator!=(const CudaDimView &view) const
Definition: mapping_options-inl.h:183
Grid(std::initializer_list< uint64_t > il)
Definition: mapping_options.h:213
CudaDimProto & proto
Definition: mapping_options.h:157
bool operator!=(const SchedulerOptionsView &view) const
Definition: mapping_options-inl.h:200
bool operator==(const TilingView &view) const
Compare the values with those from another view.
Definition: mapping_options-inl.h:63
MappingOptions & maxSharedMemory(uint64_t size)
Definition: mapping_options-inl.h:336
MappingOptions & operator=(const MappingOptions &)=default
Assign from another message.
ValueAccessor & operator=(const T &t)
Definition: mapping_options.h:106
std::string toCommaSeparatedString() const
Conversion to string and output operators.
friend std::ostream & operator<<(std::ostream &os, const TilingView &view)
SchedulerOptions()
Definition: mapping_options.h:319
MappingOptions & tile(const std::vector< uint64_t > &sizes)
Definition: mapping_options-inl.h:251
MappingOptions & unrollCopyShared(bool b)
Definition: mapping_options-inl.h:346
isl_bool FuseAllPreserve3Coincident(__isl_take isl_union_map *original_schedule, __isl_take isl_union_map *updated_schedule, int n_updated_coincident, int n_original_coincident, int is_along_edge, void *)
Definition: mapping_options.h:173
MappingOptions & tileImperfectlyNested(bool b)
Definition: mapping_options-inl.h:351
ValueAccessor< uint64_t > operator[](size_t i)
Definition: mapping_options-inl.h:140
Block(const CudaDimView &view)
Definition: mapping_options.h:199
static MappingOptions makeConvolutionMappingOptions()
MappingOptions()
Definition: mapping_options-inl.h:207
std::function< void(T)> Setter
Definition: mapping_options.h:96
Specializing CudaDim to differentiate between Block and Grid sizes.
Definition: mapping_options.h:196
SchedulerOptions(const SchedulerOptions &options)
Definition: mapping_options.h:320
CudaDimProto ownedProto_
Definition: mapping_options.h:192
Block(std::vector< uint64_t > il)
Definition: mapping_options.h:202
SchedulerOptionsView outerScheduleOptions
Definition: mapping_options.h:443
SchedulerOptionsView()=default
CudaDimView grid
Definition: mapping_options.h:441
static MappingOptions makePointwiseMappingOptions()
Definition: mapping_options.h:222
SchedulerOptionsView(SchedulerOptionsProto &buf)
Definition: mapping_options.h:298
SchedulerOptionsProto & proto
Definition: mapping_options.h:313
SchedulerOptionsView & operator=(const SchedulerOptionsView &)
Assign the values from another view.
Definition: mapping_options-inl.h:190
std::array< uint64_t, 3 > extractDefaultedArray() const
Return a copy of values as std::array of size 3 padded with defaultDim.
Definition: mapping_options-inl.h:130
Setter setter_
Definition: mapping_options.h:112
Getter getter_
Definition: mapping_options.h:113
MappingOptions & scheduleFusionStrategy(FusionStrategy fs)
Definition: mapping_options-inl.h:361
std::vector< uint64_t > extractVector() const
Return a copy of values as std::vector.
Definition: mapping_options-inl.h:116
std::function< isl_bool(isl_union_map *, isl_union_map *, int, int, int, void *)> MergeCallback
isl scheduler callback types.
Definition: mapping_options.h:282
Definition: mapping_options.h:278
CudaDim(const CudaDim &cudaDim)
Definition: mapping_options.h:176
static MappingOptions makeSingleThreadMappingOptions()
friend std::ostream & operator<<(std::ostream &os, const SchedulerOptionsView &options)
Output operators.
static const uint64_t defaultDim
Definition: mapping_options.h:159
MappingOptions & outerScheduleAllowSkewing(bool b)
Definition: mapping_options-inl.h:387
Definition: mapping_options.h:94
std::vector< uint64_t > extractVector() const
Return a copy of values as std::vector.
Definition: mapping_options-inl.h:37