aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/util
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-04-02 20:50:39 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-04-02 20:53:09 -0700
commit38e0139329482d8e44629dea2e87853808eacd0d (patch)
treeffe852a504bee857821eac9f05f5ca8f939929f2 /tensorflow/contrib/util
parentfa2e70d7fae8466c4006bd29334a3cc440ee6d3a (diff)
Windows: Enable tensorflow/contrib in Bazel build (Second try)
This reverts commit 4e108ef30d7cd7ae5e1c550ec5ae27e79b8c6e39. PiperOrigin-RevId: 191391075
Diffstat (limited to 'tensorflow/contrib/util')
-rw-r--r--tensorflow/contrib/util/loader.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tensorflow/contrib/util/loader.py b/tensorflow/contrib/util/loader.py
index f4283cd9ed..dca01d26f4 100644
--- a/tensorflow/contrib/util/loader.py
+++ b/tensorflow/contrib/util/loader.py
@@ -42,9 +42,10 @@ def load_op_library(path):
plugin.
"""
if os.name == 'nt':
- # To avoid makeing every user_ops aware of windows, re-write
- # the file extension from .so to .dll.
- path = re.sub(r'\.so$', '.dll', path)
+ # To avoid making every user_ops aware of windows, re-write
+ # the file extension from .so to .dll if .so file doesn't exist.
+ if not os.path.exists(path):
+ path = re.sub(r'\.so$', '.dll', path)
# Currently we have only some user_ops as dlls on windows - don't try
# to load them if the dll is not found.