From e22d92c63c308e73f1af7cb316fba6b332ad2b9b Mon Sep 17 00:00:00 2001 From: Philippe Tillet Date: Thu, 23 Sep 2021 17:51:58 -0700 Subject: [PATCH] [RUNTIME] removed obsolete putenv call (#305) --- lib/driver/dispatch.cc | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/lib/driver/dispatch.cc b/lib/driver/dispatch.cc index 674653488..4059ac235 100755 --- a/lib/driver/dispatch.cc +++ b/lib/driver/dispatch.cc @@ -21,7 +21,6 @@ */ #include "triton/driver/dispatch.h" -#include "triton/tools/sys/getenv.hpp" namespace triton { @@ -92,17 +91,11 @@ 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); + 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."); } if(cuda_ == nullptr) return false;