Halide 22.0.0 Halide compiler and libraries

Public Member Functions | List of all members
Halide::DefaultCostModel Class Reference

`#include <DefaultCostModel.h>`

Inheritance diagram for Halide::DefaultCostModel:

## Public Member Functions
| DefaultCostModel (const std::string &weights_in_path, const std::string &weights_out_path, bool randomize_weights)
| ~DefaultCostModel () override=default
void | set_pipeline_features (const Internal::Autoscheduler::FunctionDAG &dag, const Internal::Autoscheduler::Adams2019Params &params) override
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
void | enqueue (int ns, Runtime::Buffer< float > *schedule_feats, double *cost_ptr)
void | evaluate_costs () override
void | reset () override
float | backprop (const Runtime::Buffer< const float > &true_runtimes, float learning_rate)
void | save_weights ()
void | load_weights ()
| DefaultCostModel (const std::string &weights_in_path, const std::string &weights_out_path, bool randomize_weights, Internal::Autoscheduler::Statistics &stats)
void | set_pipeline_features (const Internal::Autoscheduler::FunctionDAG &dag, const Internal::Autoscheduler::Anderson2021Params &params) override
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, std::vector< double > *cost_per_stage_ptr) override
void | enqueue (int ns, Runtime::Buffer< float > *schedule_feats, double *cost_ptr, std::vector< double > *cost_per_stage_ptr)
void | evaluate_costs () override
void | reset () override
float | backprop (const Runtime::Buffer< const float > &true_runtimes, float learning_rate)
void | save_weights ()
void | load_weights ()
Public Member Functions inherited from Halide::CostModel
virtual | ~CostModel ()=default
virtual void | set_pipeline_features (const Internal::Autoscheduler::FunctionDAG &dag, const Internal::Autoscheduler::Adams2019Params &params)=0
virtual void | enqueue (const Internal::Autoscheduler::FunctionDAG &dag, const Halide::Internal::Autoscheduler::StageMapOfScheduleFeatures &schedule_feats, double *cost_ptr)=0
virtual void | evaluate_costs ()=0
virtual void | reset ()=0
virtual | ~CostModel ()=default
virtual void | set_pipeline_features (const Internal::Autoscheduler::FunctionDAG &dag, const Internal::Autoscheduler::Anderson2021Params &params)=0
virtual void | enqueue (const Internal::Autoscheduler::FunctionDAG &dag, const Halide::Internal::Autoscheduler::StageMapOfScheduleFeatures &schedule_feats, double *cost_ptr, std::vector< double > *cost_per_stage_ptr)=0
virtual void | evaluate_costs ()=0
virtual void | reset ()=0

## Detailed Description

Definition at line 16 of file DefaultCostModel.h.

## Constructor & Destructor Documentation

## ◆ DefaultCostModel() [1/2]

Halide::DefaultCostModel::DefaultCostModel | ( | const std::string & | weights_in_path,
|  | const std::string & | weights_out_path,
|  | bool | randomize_weights
| ) |  |
| inline

Definition at line 33 of file DefaultCostModel.h.

References load_weights().

## ◆ ~DefaultCostModel()

Halide::DefaultCostModel::~DefaultCostModel | ( |  | ) |
| override default

## ◆ DefaultCostModel() [2/2]

Halide::DefaultCostModel::DefaultCostModel | ( | const std::string & | weights_in_path,
|  | const std::string & | weights_out_path,
|  | bool | randomize_weights,
|  | Internal::Autoscheduler::Statistics & | stats
| ) |  |
| inline

Definition at line 32 of file DefaultCostModel.h.

References load_weights().

## Member Function Documentation

## ◆ set_pipeline_features() [1/4]

void Halide::DefaultCostModel::set_pipeline_features | ( | const Internal::Autoscheduler::FunctionDAG & | dag,
|  | const Internal::Autoscheduler::Adams2019Params & | params
| ) |  |
| override virtual

Implements Halide::CostModel.

## ◆ set_pipeline_features() [2/4]

void Halide::DefaultCostModel::set_pipeline_features | ( | const Runtime::Buffer< float > & | ,
|  | int | n
| ) |  |

## ◆ enqueue() [1/4]

void Halide::DefaultCostModel::enqueue | ( | const Internal::Autoscheduler::FunctionDAG & | dag,
|  | const Halide::Internal::Autoscheduler::StageMapOfScheduleFeatures & | schedule_feats,
|  | double * | cost_ptr
| ) |  |
| override virtual

Implements Halide::CostModel.

## ◆ enqueue() [2/4]

void Halide::DefaultCostModel::enqueue | ( | int | ns,
|  | Runtime::Buffer< float > * | schedule_feats,
|  | double * | cost_ptr
| ) |  |

## ◆ evaluate_costs() [1/2]

void Halide::DefaultCostModel::evaluate_costs | ( |  | ) |
| override virtual

Implements Halide::CostModel.

## ◆ reset() [1/2]

void Halide::DefaultCostModel::reset | ( |  | ) |
| override virtual

Implements Halide::CostModel.

## ◆ backprop() [1/2]

float Halide::DefaultCostModel::backprop | ( | const Runtime::Buffer< const float > & | true_runtimes,
|  | float | learning_rate
| ) |  |

## ◆ save_weights() [1/2]

void Halide::DefaultCostModel::save_weights | ( |  | ) |

## ◆ load_weights() [1/2]

void Halide::DefaultCostModel::load_weights | ( |  | ) |

Referenced by DefaultCostModel().

## ◆ set_pipeline_features() [3/4]

void Halide::DefaultCostModel::set_pipeline_features | ( | const Internal::Autoscheduler::FunctionDAG & | dag,
|  | const Internal::Autoscheduler::Anderson2021Params & | params
| ) |  |
| override virtual

Implements Halide::CostModel.

## ◆ set_pipeline_features() [4/4]

void Halide::DefaultCostModel::set_pipeline_features | ( | const Runtime::Buffer< float > & | ,
|  | int | n
| ) |  |

## ◆ enqueue() [3/4]

void Halide::DefaultCostModel::enqueue | ( | const Internal::Autoscheduler::FunctionDAG & | dag,
|  | const Halide::Internal::Autoscheduler::StageMapOfScheduleFeatures & | schedule_feats,
|  | double * | cost_ptr,
|  | std::vector< double > * | cost_per_stage_ptr
| ) |  |
| override virtual

Implements Halide::CostModel.

## ◆ enqueue() [4/4]

void Halide::DefaultCostModel::enqueue | ( | int | ns,
|  | Runtime::Buffer< float > * | schedule_feats,
|  | double * | cost_ptr,
|  | std::vector< double > * | cost_per_stage_ptr
| ) |  |

## ◆ evaluate_costs() [2/2]

void Halide::DefaultCostModel::evaluate_costs | ( |  | ) |
| override virtual

Implements Halide::CostModel.

## ◆ reset() [2/2]

void Halide::DefaultCostModel::reset | ( |  | ) |
| override virtual

Implements Halide::CostModel.

## ◆ backprop() [2/2]

float Halide::DefaultCostModel::backprop | ( | const Runtime::Buffer< const float > & | true_runtimes,
|  | float | learning_rate
| ) |  |

## ◆ save_weights() [2/2]

void Halide::DefaultCostModel::save_weights | ( |  | ) |

## ◆ load_weights() [2/2]

void Halide::DefaultCostModel::load_weights | ( |  | ) |

The documentation for this class was generated from the following files:

- src/autoschedulers/adams2019/DefaultCostModel.h
- src/autoschedulers/anderson2021/DefaultCostModel.h