#include <driver.h>
|
| | ~Driver () |
| |
| | Driver (const Driver &)=delete |
| |
| Driver & | operator= (const Driver &)=delete |
| |
| | Driver (Driver &&)=delete |
| |
| Driver & | operator= (Driver &&)=delete |
| |
| void | setArgs (const std::vector< Ref< Array > > &args, const std::unordered_map< std::string, Ref< Array > > &kws={}) |
| |
| void | setArgs (const std::unordered_map< std::string, Ref< Array > > &kws) |
| |
| void | run () |
| |
| void | sync () |
| |
| std::vector< Ref< Array > > | collectReturns () |
| |
| std::pair< double, double > | time (int rounds=10, int warmups=3) |
| |
| void | unload () |
| |
| const Ref< Device > & | device () const |
| |
|
| | Driver (const NativeCode &nativeCode, const Ref< Device > &device, const Ref< Device > &hostDevice, const std::vector< std::string > &cxxFlags={}, bool verbose=false) |
| |
| | Driver (const NativeCode &nativeCode, const Ref< Device > &device, const std::vector< std::string > &cxxFlags={}, bool verbose=false) |
| |
◆ Driver() [1/4]
| freetensor::Driver::Driver |
( |
const NativeCode & |
nativeCode, |
|
|
const Ref< Device > & |
device, |
|
|
const Ref< Device > & |
hostDevice, |
|
|
const std::vector< std::string > & |
cxxFlags = {}, |
|
|
bool |
verbose = false |
|
) |
| |
Compile a program using a backend compiler and load it into memory
- Parameters
-
| nativeCode | : Native code generated from codegen |
| device | : The device to run the program |
| hostDevice | : The hosting CPU device (Optional) |
| cxxFlags | : Additional C++ flags passed to the backend compiler |
◆ Driver() [2/4]
| freetensor::Driver::Driver |
( |
const NativeCode & |
nativeCode, |
|
|
const Ref< Device > & |
device, |
|
|
const std::vector< std::string > & |
cxxFlags = {}, |
|
|
bool |
verbose = false |
|
) |
| |
|
inline |
◆ ~Driver()
| freetensor::Driver::~Driver |
( |
| ) |
|
|
inline |
◆ Driver() [3/4]
| freetensor::Driver::Driver |
( |
const Driver & |
| ) |
|
|
delete |
◆ Driver() [4/4]
| freetensor::Driver::Driver |
( |
Driver && |
| ) |
|
|
delete |
◆ collectReturns()
| std::vector< Ref< Array > > freetensor::Driver::collectReturns |
( |
| ) |
|
◆ device()
| const Ref< Device > & freetensor::Driver::device |
( |
| ) |
const |
|
inline |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ run()
| void freetensor::Driver::run |
( |
| ) |
|
◆ setArgs() [1/2]
| void freetensor::Driver::setArgs |
( |
const std::unordered_map< std::string, Ref< Array > > & |
kws | ) |
|
|
inline |
◆ setArgs() [2/2]
| void freetensor::Driver::setArgs |
( |
const std::vector< Ref< Array > > & |
args, |
|
|
const std::unordered_map< std::string, Ref< Array > > & |
kws = {} |
|
) |
| |
◆ sync()
| void freetensor::Driver::sync |
( |
| ) |
|
Sync with the device
Call this if you are timing without the time function
◆ time()
| std::pair< double, double > freetensor::Driver::time |
( |
int |
rounds = 10, |
|
|
int |
warmups = 3 |
|
) |
| |
Run the program and measure its time cost
- Parameters
-
| rounds | : Run this amount of rounds, and report the average |
| warmups | : Run this amount of rounds before actual measurement |
- Returns
- : (average time, estimated standard deviation of the average time = sqrt(Var(X1 + X2 + ... + Xn))), in ms
◆ unload()
| void freetensor::Driver::unload |
( |
| ) |
|
The documentation for this class was generated from the following files: