1 #ifndef DEFAULT_COST_MODEL_H 2 #define DEFAULT_COST_MODEL_H 11 namespace Autoscheduler {
12 struct Adams2019Params;
21 int cursor, num_stages, num_cores;
23 const std::string weights_in_path, weights_out_path;
24 const bool randomize_weights;
27 head1_filter_update, head1_bias_update,
28 head2_filter_update, head2_bias_update,
29 conv1_filter_update, conv1_bias_update;
34 const std::string &weights_out_path,
35 bool randomize_weights)
36 : weights_in_path(weights_in_path),
37 weights_out_path(weights_out_path),
38 randomize_weights(randomize_weights) {
53 double *cost_ptr)
override;
60 void reset()
override;
71 const std::string &weights_out_dir =
"",
72 bool randomize_weights =
false);
75 #endif // DEFAULT_COST_MODEL_H
std::unique_ptr< DefaultCostModel > make_default_cost_model(const std::string &weights_in_dir="", const std::string &weights_out_dir="", bool randomize_weights=false)
~DefaultCostModel() override=default
This file defines the class FunctionDAG, which is our representation of a Halide pipeline, and contains methods to using Halide's bounds tools to query properties of it.
void enqueue(const Internal::Autoscheduler::FunctionDAG &dag, const Halide::Internal::Autoscheduler::StageMapOfScheduleFeatures &schedule_feats, double *cost_ptr) override
Not visible externally, similar to 'static' linkage in C.
void set_pipeline_features(const Internal::Autoscheduler::FunctionDAG &dag, const Internal::Autoscheduler::Adams2019Params ¶ms) override
DefaultCostModel(const std::string &weights_in_path, const std::string &weights_out_path, bool randomize_weights)
float backprop(const Runtime::Buffer< const float > &true_runtimes, float learning_rate)
void evaluate_costs() override