[RUNTIME] removed obsolete putenv call (#305)

This commit is contained in:
Philippe Tillet
2021-09-23 17:51:58 -07:00
committed by GitHub
parent 87f8d9f163
commit e22d92c63c

View File

@@ -21,7 +21,6 @@
*/
#include "triton/driver/dispatch.h"
#include "triton/tools/sys/getenv.hpp"
namespace triton
{
@@ -92,18 +91,12 @@ void* dispatch::fname ## _;
bool dispatch::cuinit(){
if(cuda_==nullptr){
putenv((char*)"CUDA_CACHE_DISABLE=1");
std::string libcuda = tools::getenv("TRITON_LIBCUDA");
if(libcuda.empty()){
cuda_ = dlopen("libcuda.so", RTLD_LAZY);
if(!cuda_)
cuda_ = dlopen("libcuda.so.1", RTLD_LAZY);
if(!cuda_)
throw std::runtime_error("Could not find `libcuda.so`. Make sure it is in your LD_LIBRARY_PATH.");
}
else
cuda_ = dlopen(libcuda.c_str(), RTLD_LAZY);
}
if(cuda_ == nullptr)
return false;
CUresult (*fptr)(unsigned int);