Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick python3 and libcuda.so fixes from master into r0.7 branch #1184

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions tensorflow/examples/tutorials/mnist/input_data.py
Expand Up @@ -50,7 +50,7 @@ def _read32(bytestream):
def extract_images(filename):
"""Extract the images into a 4D uint8 numpy array [index, y, x, depth]."""
print('Extracting', filename)
with gzip.open(filename) as bytestream:
with tf.gfile.Open(filename, 'rb') as f, gzip.GzipFile(fileobj=f) as bytestream:
magic = _read32(bytestream)
if magic != 2051:
raise ValueError(
Expand All @@ -77,7 +77,7 @@ def dense_to_one_hot(labels_dense, num_classes=10):
def extract_labels(filename, one_hot=False):
"""Extract the labels into a 1D uint8 numpy array [index]."""
print('Extracting', filename)
with gzip.open(filename) as bytestream:
with tf.gfile.Open(filename, 'rb') as f, gzip.GzipFile(fileobj=f) as bytestream:
magic = _read32(bytestream)
if magic != 2049:
raise ValueError(
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/stream_executor/cuda/cuda_diagnostics.cc
Expand Up @@ -165,7 +165,7 @@ port::StatusOr<DriverVersion> Diagnostician::FindDsoVersion() {
// DSO and yields its version number into the callback data, when found.
auto iterate_phdr =
[](struct dl_phdr_info *info, size_t size, void *data) -> int {
if (strstr(info->dlpi_name, "libcuda.so")) {
if (strstr(info->dlpi_name, "libcuda.so.1")) {
VLOG(1) << "found DLL info with name: " << info->dlpi_name;
char resolved_path[PATH_MAX] = {0};
if (realpath(info->dlpi_name, resolved_path) == nullptr) {
Expand Down
6 changes: 3 additions & 3 deletions tensorflow/stream_executor/dso_loader.cc
Expand Up @@ -69,9 +69,9 @@ string GetCudnnVersion() { return ""; }
}

/* static */ port::Status DsoLoader::GetLibcudaDsoHandle(void** dso_handle) {
return GetDsoHandle(FindDsoPath("libcuda.so",
"third_party/gpus/cuda/driver/lib64"),
dso_handle);
return GetDsoHandle(
FindDsoPath("libcuda.so.1", "third_party/gpus/cuda/driver/lib64"),
dso_handle);
}

/* static */ port::Status DsoLoader::GetLibcuptiDsoHandle(void** dso_handle) {
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/tools/pip_package/build_pip_package.sh
Expand Up @@ -33,7 +33,7 @@ function main() {
exit 1
fi
cp -R \
bazel-bin/tensorflow/tools/pip_package/build_pip_package.runfiles/{tensorflow,external,google} \
bazel-bin/tensorflow/tools/pip_package/build_pip_package.runfiles/{tensorflow,external} \
${TMPDIR}
# TODO: We should have cleaner solution for this after 0.7 release
rm -rf ${TMPDIR}/external/eigen_archive
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/tools/pip_package/setup.py
Expand Up @@ -31,7 +31,7 @@
REQUIRED_PACKAGES = [
'numpy >= 1.8.2',
'six >= 1.10.0',
'protobuf == 3.0.0a3',
'protobuf == 3.0.0b2',
]

# python3 requires wheel 0.26
Expand Down