24 #include <llvm/ADT/Optional.h>
114 const std::string& name,
115 std::vector<size_t>& values,
116 const std::string& dimBaseName);
122 std::vector<RangeParameter>
dims;
127 void setRange(
size_t maxDims, std::vector<size_t>& values);
138 std::vector<size_t>& values,
139 const std::string& dimensionBaseName);
185 std::vector<std::function<bool(const TuningConfiguration&)>>
validators_;
191 const FusionStrategy& fs);
193 const FusionStrategy& fs);
222 using TimePoint = std::chrono::high_resolution_clock::time_point;
223 using Duration = std::chrono::high_resolution_clock::duration;
242 ? std::unique_ptr<size_t>(
248 std::swap(tmp, *
this);
TuningParameterFixer & fixUnrollFactor(size_t val)
Duration runtime
Definition: parameters.h:259
BoolParameter matchLibraryCalls
Definition: parameters.h:182
llvm::Optional< size_t > unrollFactor
Definition: parameters.h:209
llvm::Optional< bool > usePrivateMemory
Definition: parameters.h:215
BoolParameter unrollCopyShared
Definition: parameters.h:181
TuningParameterFixer & fixMatchLibraryCalls(bool val)
std::vector< size_t > values_
Definition: parameters.h:75
TuningParameterFixer & fixUnrollCopyShared(bool val)
TuningParameterFixer & fixFixParametersBeforeScheduling(bool val)
void setRange(size_t maxDims, std::vector< size_t > &values)
Definition: parameters.h:149
Definition: parameters.h:135
TuningParameterFixer & fixUseSharedMemory(bool val)
TuningParameterFixer & fixIntraTileScheduleFusionStrategy(const FusionStrategy &fs)
Definition: mapping_options.h:120
std::string name
Definition: parameters.h:70
std::chrono::high_resolution_clock::time_point TimePoint
Definition: parameters.h:222
CudaDimParameters blockParams
Definition: parameters.h:175
size_t numberOptions() const
void applyToMappingOptions(TilingView &options) const
std::vector< ParameterView > collectParameters()
void apply(const std::function< void(ParameterView &)> &f)
TuningParameterFixer & fixGridParameters(std::vector< size_t > vals)
llvm::Optional< bool > unrollCopyShared
Definition: parameters.h:216
SchedulerOptionsParameters()
llvm::Optional< FusionStrategy > outerScheduleFusionStrategy
Definition: parameters.h:206
void selectOption(size_t idx)
Definition: parameters.h:31
void applyToMappingOptions(CudaDimView &options) const
TuningParameterFixer & fixTilingParameters(std::vector< size_t > vals)
void fromMappingOptions(const SchedulerOptionsView &options)
RangeParameter * rangePtr
Definition: parameters.h:90
std::vector< ParameterView > collectParameters()
void apply(const std::function< void(ParameterView &)> &f)
BoolParameter & operator=(const BoolParameter &)
std::unique_ptr< size_t > optionalCompilationHandle
Definition: parameters.h:261
CandidateConfiguration(const TuningConfiguration &config, Duration d=Duration::zero(), bool invalid=false)
Definition: parameters.h:227
SchedulerOptionsParameters intraTileScheduleOptions
Definition: parameters.h:172
std::vector< ParameterView > collectParameters()
void applyToParameters(const std::function< void(ParameterView &)> &f)
std::vector< std::function< bool(const TuningConfiguration &)> > validators_
Definition: parameters.h:185
BoolParameter tileImperfectlyNested
Definition: parameters.h:178
llvm::Optional< bool > matchLibraryCalls
Definition: parameters.h:217
void selectValue(bool val)
BoolParameter * boolPtr
Definition: parameters.h:91
SchedulerOptionsParameters outerScheduleOptions
Definition: parameters.h:171
TuningParameterFixer & fixUsePrivateMemory(bool val)
void fixParameters(const TuningParameterFixer &fixedParams)
void applyToMappingOptions(MappingOptions &options) const
TuningParameterFixer & fixOuterScheduleFusionStrategy(const FusionStrategy &fs)
Definition: mapping_options.h:336
CudaDimParameters gridParams
Definition: parameters.h:176
llvm::Optional< bool > tileImperfectlyNested
Definition: parameters.h:213
CandidateConfiguration & operator=(const CandidateConfiguration &candidate)
Definition: parameters.h:246
size_t numberOptions() const
size_t selected_
Definition: parameters.h:74
llvm::Optional< bool > fixParametersBeforeScheduling
Definition: parameters.h:208
void fromMappingOptions(const CudaDimView &options)
RangeParameter fusionStrategy
Definition: parameters.h:104
void applyToMappingOptions(SchedulerOptionsView &options) const
Definition: parameters.h:55
bool invalid
Definition: parameters.h:260
TilingParameters tilingParams
Definition: parameters.h:174
llvm::Optional< FusionStrategy > intraTileScheduleFusionStrategy
Definition: parameters.h:207
BoolParameter usePrivateMemory
Definition: parameters.h:180
void addValidator(std::function< bool(const TuningConfiguration &)> v)
TuningParameterFixer & fixTileImperfectlyNested(bool val)
void selectOption(size_t idx)
Definition: parameters.h:188
std::string name
Definition: parameters.h:47
void fromMappingOptions(const MappingOptions &options)
Definition: parameters.h:79
llvm::Optional< std::vector< size_t > > tilingParameters
Definition: parameters.h:210
TuningConfiguration & operator=(const TuningConfiguration &)=default
BoolParameter useSharedMemory
Definition: parameters.h:179
llvm::Optional< bool > fixedValue_
Definition: parameters.h:52
friend std::ostream & operator<<(std::ostream &os, const CandidateConfiguration &config)
Definition: parameters.h:252
friend std::ostream & operator<<(std::ostream &os, const TuningConfiguration &conf)
RangeParameter numberDims
Definition: parameters.h:121
size_t numberOptions() const
llvm::Optional< std::vector< size_t > > blockParameters
Definition: parameters.h:211
Definition: parameters.h:109
Definition: mapping_options.h:222
RangeParameter unrollFactor
Definition: parameters.h:177
bool value_
Definition: parameters.h:51
llvm::Optional< bool > useSharedMemory
Definition: parameters.h:214
void setRange(size_t minDims, size_t maxDims, const std::string &name, std::vector< size_t > &values, const std::string &dimBaseName)
Definition: parameters.h:94
void setRange(std::vector< size_t > &values, const std::string &dimensionBaseName)
llvm::Optional< size_t > fixedValue_
Definition: parameters.h:76
std::chrono::high_resolution_clock::duration Duration
Definition: parameters.h:223
TuningConfiguration configuration
Definition: parameters.h:258
CandidateConfiguration(const CandidateConfiguration &candidate)
Definition: parameters.h:236
Definition: mapping_options.h:278
void apply(const std::function< void(ParameterView &)> &f)
void overwrite(const ParameterView &)
Definition: parameters.h:125
void selectFromValue(size_t v)
void apply(const std::function< void(ParameterView &)> &f)
llvm::Optional< std::vector< size_t > > gridParameters
Definition: parameters.h:212
TuningParameterFixer & fixBlockParameters(std::vector< size_t > vals)
Definition: parameters.h:225
ParameterView(BoolParameter &)
std::vector< RangeParameter > dims
Definition: parameters.h:122
void selectOption(size_t idx)
void fromMappingOptions(const TilingView &options)
BoolParameter fixParametersBeforeScheduling
Definition: parameters.h:173
RangeParameter & operator=(const RangeParameter &)