MLCompilerBridge
Tools for streamlining communication with ML models for compiler optimizations.
Loading...
Searching...
No Matches
Classes | Functions | Variables
compilerinterface.log_reader Namespace Reference

Classes

class  TensorSpec
 
class  TensorValue
 

Functions

TensorValue read_tensor (io.BufferedReader fs, TensorSpec ts)
 
 pretty_print_tensor_value (TensorValue tv)
 
 read_header (io.BufferedReader f)
 
 read_one_observation (Optional[str] context, str event_str, io.BufferedReader f, List[TensorSpec] tensor_specs, Optional[TensorSpec] score_spec)
 
 read_stream (str fname)
 
 read_stream2 (io.BufferedReader f)
 
 main (args)
 

Variables

dict _element_types
 

Function Documentation

◆ main()

compilerinterface.log_reader.main ( args)

Definition at line 144 of file log_reader.py.

◆ pretty_print_tensor_value()

compilerinterface.log_reader.pretty_print_tensor_value ( TensorValue tv)

Definition at line 89 of file log_reader.py.

◆ read_header()

compilerinterface.log_reader.read_header ( io.BufferedReader f)

Definition at line 93 of file log_reader.py.

◆ read_one_observation()

compilerinterface.log_reader.read_one_observation ( Optional[str] context,
str event_str,
io.BufferedReader f,
List[TensorSpec] tensor_specs,
Optional[TensorSpec] score_spec )

Definition at line 102 of file log_reader.py.

◆ read_stream()

compilerinterface.log_reader.read_stream ( str fname)

Definition at line 116 of file log_reader.py.

◆ read_stream2()

compilerinterface.log_reader.read_stream2 ( io.BufferedReader f)

Definition at line 130 of file log_reader.py.

◆ read_tensor()

TensorValue compilerinterface.log_reader.read_tensor ( io.BufferedReader fs,
TensorSpec ts )

Definition at line 82 of file log_reader.py.

Variable Documentation

◆ _element_types

dict compilerinterface.log_reader._element_types
protected
Initial value:
1= {
2 "float": ctypes.c_float,
3 "double": ctypes.c_double,
4 "int8_t": ctypes.c_int8,
5 "uint8_t": ctypes.c_uint8,
6 "int16_t": ctypes.c_int16,
7 "uint16_t": ctypes.c_uint16,
8 "int32_t": ctypes.c_int32,
9 "uint32_t": ctypes.c_uint32,
10 "int64_t": ctypes.c_int64,
11 "uint64_t": ctypes.c_uint64,
12}

Definition at line 23 of file log_reader.py.