update chiSquare test functions to check the created kernel before execution
This commit is contained in:
@ -392,7 +392,10 @@ int main(int argc, char *argv[]) {
|
||||
dksbase.setAPI(api_name);
|
||||
dksbase.setDevice(device_name);
|
||||
|
||||
std::cout << "Init device" << std::endl;
|
||||
dksbase.initDevice();
|
||||
|
||||
std::cout << "Init chi square" << std::endl;
|
||||
dksbase.initChiSquare(Ndata, np, nf, nm);
|
||||
|
||||
dksbase.writeParams(p, np);
|
||||
@ -401,20 +404,24 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
dksbase.callSetConsts(N0, TAU, BKG);
|
||||
|
||||
std::cout << "Compile program" << std::endl;
|
||||
dksbase.callCompileProgram(sfunc);
|
||||
|
||||
dksbase.checkMuSRKernels(1);
|
||||
|
||||
if (autotune)
|
||||
dksbase.setAutoTuningOn();
|
||||
|
||||
int oper = 0;
|
||||
dksbase.getOperations(oper);
|
||||
//std::cout << "Get operations" << std::endl;
|
||||
//int oper = 0;
|
||||
//dksbase.getOperations(oper);
|
||||
|
||||
cout << "=========================BEGIN TEST=========================" << endl;
|
||||
cout << "Use api: " << api_name << "\t" << device_name << endl;
|
||||
cout << "Number of params: " << np << endl;
|
||||
cout << "Number of maps: " << nm << endl;
|
||||
cout << "Number of predefined functions: " << nfunc << endl;
|
||||
cout << "Number of ptx instructions: " << oper << endl;
|
||||
//cout << "Number of ptx instructions: " << oper << endl;
|
||||
cout << "------------------------------------------------------------" << endl;
|
||||
cout << sfunc << endl;
|
||||
cout << "------------------------------------------------------------" << endl;
|
||||
|
Reference in New Issue
Block a user