Driver: now using proper compute capability option in nvrtc ; added missing file.
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
|
||||
#include "sha1.hpp"
|
||||
|
||||
#include "to_string.hpp"
|
||||
namespace isaac
|
||||
{
|
||||
|
||||
@@ -42,7 +43,10 @@ Program::Program(Context const & context, std::string const & source) : backend_
|
||||
|
||||
nvrtc::check(dispatch::nvrtcCreateProgram(&prog, source.c_str(), NULL, 1, src, includes));
|
||||
try{
|
||||
const char * options[] = {"--gpu-architecture=compute_52", "--restrict"};
|
||||
std::pair<unsigned int, unsigned int> capability = context_.device().nv_compute_capability();
|
||||
std::string capability_opt = "--compute_";
|
||||
capability_opt += tools::to_string(capability.first) + tools::to_string(capability.second);
|
||||
const char * options[] = {capability_opt.c_str(), "--restrict"};
|
||||
nvrtc::check(dispatch::nvrtcCompileProgram(prog, 2, options));
|
||||
}catch(nvrtc::exception::compilation const &)
|
||||
{
|
||||
|
Reference in New Issue
Block a user