File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ tensorflow/core/platform/posix/posix_file_system.cc
88tensorflow/core/platform/posix/port.cc
99tensorflow/core/platform/posix/error.cc
1010tensorflow/core/platform/posix/env.cc
11- tensorflow/core/platform/load_library.cc
11+ tensorflow/core/platform/posix/ load_library.cc
1212tensorflow/core/platform/file_system.cc
1313tensorflow/core/platform/env.cc
1414tensorflow/core/platform/denormal.cc
Original file line number Diff line number Diff line change @@ -17,9 +17,9 @@ limitations under the License.
1717
1818#if GOOGLE_CUDA
1919
20- #include < dlfcn.h>
2120#include < string>
2221
22+ #include " tensorflow/core/platform/env.h"
2323#include " tensorflow/core/platform/stream_executor.h"
2424
2525namespace perftools {
@@ -38,9 +38,10 @@ namespace dynload {
3838 return status.ValueOrDie (); \
3939 } \
4040 static FuncPointerT DynLoad () { \
41- static void * f = dlsym (GetDsoHandle (), kName ); \
42- CHECK (f != nullptr ) << " could not find " << kName \
43- << " in libcupti DSO; dlerror: " << dlerror (); \
41+ static void * f; \
42+ TF_CHECK_OK (::tensorflow::Env::Default ()->GetSymbolFromLibrary ( \
43+ GetDsoHandle (), kName , &f)) \
44+ << " could not find " << kName << " in libcupti DSO" ; \
4445 return reinterpret_cast <FuncPointerT>(f); \
4546 } \
4647 template <typename ... Args> \
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ See the License for the specific language governing permissions and
1313limitations under the License.
1414==============================================================================*/
1515
16+ #include " tensorflow/core/platform/load_library.h"
17+
1618#include < dlfcn.h>
1719
1820#include " tensorflow/core/lib/core/errors.h"
You can’t perform that action at this time.
0 commit comments