[RUNTIME] Disable error on spills
This commit is contained in:
@@ -330,15 +330,13 @@ cu_module::cu_module(driver::device* device, std::string const & source) : modul
|
|||||||
dispatch::cuModuleLoadDataEx(&*cu_, ptx_.data(), 5, opt, optval);
|
dispatch::cuModuleLoadDataEx(&*cu_, ptx_.data(), 5, opt, optval);
|
||||||
std::string err(_err);
|
std::string err(_err);
|
||||||
std::string log(_log);
|
std::string log(_log);
|
||||||
|
// std::smatch match;
|
||||||
// std::cout << log << std::endl;
|
// std::regex expr ("\\b([0-9]+) bytes spill");
|
||||||
std::smatch match;
|
// spilled_ = 0;
|
||||||
std::regex expr ("\\b([0-9]+) bytes spill");
|
// while (std::regex_search(log,match,expr)){
|
||||||
spilled_ = 0;
|
// spilled_ += std::stoi(match[1]);
|
||||||
while (std::regex_search(log,match,expr)){
|
// log = match.suffix();
|
||||||
spilled_ += std::stoi(match[1]);
|
// }
|
||||||
log = match.suffix();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch(exception::cuda::invalid_ptx const &){
|
catch(exception::cuda::invalid_ptx const &){
|
||||||
//#ifdef TRITON_LOG_PTX_ERROR
|
//#ifdef TRITON_LOG_PTX_ERROR
|
||||||
|
@@ -251,8 +251,8 @@ std::unique_ptr<driver::module> function::make_bin(ir::module &module, driver::d
|
|||||||
// ir::print(module, std::cout);
|
// ir::print(module, std::cout);
|
||||||
isel.visit(module, *llvm);
|
isel.visit(module, *llvm);
|
||||||
std::unique_ptr<driver::module> res(driver::module::create(device, std::move(llvm)));
|
std::unique_ptr<driver::module> res(driver::module::create(device, std::move(llvm)));
|
||||||
if(res->spilled() > 256)
|
// if(res->spilled() > 256)
|
||||||
throw exception::out_of_registers();
|
// throw exception::out_of_registers();
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user