25 #ifndef TVM_AUTO_SCHEDULER_MEASURE_RECORD_H_ 26 #define TVM_AUTO_SCHEDULER_MEASURE_RECORD_H_ 35 namespace auto_scheduler {
48 static constexpr
const char*
_type_key =
"auto_scheduler.RecordToFile";
93 static constexpr
const char*
_type_key =
"auto_scheduler.RecordReader";
98 std::string cur_line_;
125 const std::string log_version = AUTO_SCHEDULER_LOG_VERSION);
135 std::string* log_version);
140 #endif // TVM_AUTO_SCHEDULER_MEASURE_RECORD_H_ runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
Log reader to load step logs from a file.
Definition: measure_record.h:68
void Callback(const SearchPolicy &policy, const Array< MeasureInput > &inputs, const Array< MeasureResult > &results) final
Callback function that will be called on measurement input/result pairs after each measurement batch...
base class of all object containers.
Definition: object.h:167
#define TVM_DEFINE_MUTABLE_OBJECT_REF_METHODS(TypeName, ParentType, ObjectName)
Definition: object.h:744
Managed reference to RecordToFileNode.
Definition: measure_record.h:56
static constexpr const char * _type_key
Definition: measure_record.h:48
String filename
The name of output file.
Definition: measure_record.h:43
Array, container representing a contiguous sequence of ObjectRefs.
Definition: array.h:289
Distributed measurement infrastructure to measure the runtime costs of tensor programs. These functions are responsible for building the tvm module, uploading it to remote devices, recording the running time costs, and checking the correctness of the output.
Reference to string objects.
Definition: string.h:98
Managed reference to MeasureCallbackNode.
Definition: measure.h:230
Managed reference to SearchPolicyNode.
Definition: search_policy.h:198
Base class of all object reference.
Definition: object.h:511
Managed reference to RecordReaderNode.
Definition: measure_record.h:105
std::ifstream infile
The reading file stream.
Definition: measure_record.h:73
Store the results of a measurement.
Definition: measure.h:162
TVM_DECLARE_FINAL_OBJECT_INFO(RecordToFileNode, MeasureCallbackNode)
Callback for logging the input and results of measurements to file.
Definition: measure_record.h:40
void WriteMeasureRecords(std::ostream *os, const Array< MeasureInput > &inputs, const Array< MeasureResult > &results, const std::string log_version=AUTO_SCHEDULER_LOG_VERSION)
Append measure records to an output stream.
void ReadMeasureRecord(const std::string &str, MeasureInputNode *inp, MeasureResultNode *res, std::string *log_version)
Read one measure record from a string.
Bass class of measurement callbacks.
Definition: measure.h:211
const std::string AUTO_SCHEDULER_LOG_VERSION
Definition: measure_record.h:37
String filename
The name of input file.
Definition: measure_record.h:71