1 #ifndef DEFAULT_COST_MODEL_H
2 #define DEFAULT_COST_MODEL_H
15 int cursor, num_stages, num_cores;
17 const std::string weights_in_path, weights_out_path;
18 const bool randomize_weights;
21 head1_filter_update, head1_bias_update,
22 head2_filter_update, head2_bias_update,
23 conv1_filter_update, conv1_bias_update;
28 const std::string &weights_out_path,
29 bool randomize_weights)
30 : weights_in_path(weights_in_path),
31 weights_out_path(weights_out_path),
32 randomize_weights(randomize_weights) {
47 double *cost_ptr)
override;
65 const std::string &weights_out_dir =
"",
66 bool randomize_weights =
false);
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 set_pipeline_features(const Runtime::Buffer< float > &, int n)
void enqueue(const Internal::Autoscheduler::FunctionDAG &dag, const Halide::Internal::Autoscheduler::StageMapOfScheduleFeatures &schedule_feats, double *cost_ptr) override
~DefaultCostModel() override=default
void enqueue(int ns, Runtime::Buffer< float > *schedule_feats, double *cost_ptr)
void evaluate_costs() override
void set_pipeline_features(const Internal::Autoscheduler::FunctionDAG &dag, const MachineParams ¶ms) override
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
std::unique_ptr< DefaultCostModel > make_default_cost_model(const std::string &weights_in_dir="", const std::string &weights_out_dir="", bool randomize_weights=false)
A struct representing the machine parameters to generate the auto-scheduled code for.