fix for LIBNVVM_HOME error
This commit is contained in:
@@ -159,6 +159,7 @@ static std::string generatePTX(
|
|||||||
|
|
||||||
/* Create the compiliation unit. */
|
/* Create the compiliation unit. */
|
||||||
NVVMProg prog;
|
NVVMProg prog;
|
||||||
|
std::vector<const char*> options;
|
||||||
|
|
||||||
/* Add libdevice. */
|
/* Add libdevice. */
|
||||||
try
|
try
|
||||||
@@ -169,10 +170,16 @@ static std::string generatePTX(
|
|||||||
for (const auto &f : nvvmFiles)
|
for (const auto &f : nvvmFiles)
|
||||||
addFileToProgram(f, prog);
|
addFileToProgram(f, prog);
|
||||||
|
|
||||||
std::vector<const char*> options;
|
|
||||||
for (const auto &o : nvvmOptions)
|
for (const auto &o : nvvmOptions)
|
||||||
options.push_back(o.c_str());
|
options.push_back(o.c_str());
|
||||||
|
}
|
||||||
|
catch (const std::exception &ex)
|
||||||
|
{
|
||||||
|
throw Exception(ex.what());
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
if (nvvmVerifyProgram(prog.get(), options.size(), &options[0]) != NVVM_SUCCESS)
|
if (nvvmVerifyProgram(prog.get(), options.size(), &options[0]) != NVVM_SUCCESS)
|
||||||
throw Exception("Failed to verify the compilation unit.");
|
throw Exception("Failed to verify the compilation unit.");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user