Last active
August 22, 2016 05:08
-
-
Save kern/dcf5a7c04e5697364651 to your computer and use it in GitHub Desktop.
Patch to allow TensorFlow to run on CUDA Compute 3.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/tensorflow/core/common_runtime/gpu/gpu_device.cc b/tensorflow/core/common_runtime/gpu/gpu_device.cc | |
index 26d3464..286123f 100644 | |
--- a/tensorflow/core/common_runtime/gpu/gpu_device.cc | |
+++ b/tensorflow/core/common_runtime/gpu/gpu_device.cc | |
@@ -607,7 +607,7 @@ void BaseGPUDeviceFactory::GetValidDeviceIds(std::vector<int>* ids) { | |
} | |
// Only consider GPUs with compute capability >= 3.5 (Kepler or | |
// higher) | |
- if (major < 3 || (major == 3 && minor < 5)) { | |
+ if (major < 3 /*|| (major == 3 && minor < 5)*/) { | |
LOG(INFO) << "Ignoring gpu device " | |
<< "(" << GetShortDeviceDescription(i, desc) << ") " | |
<< "with Cuda compute capability " << major << "." << minor | |
diff --git a/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc b/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc | |
index 0f419a8..8b7ebd4 100755 | |
--- a/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc | |
+++ b/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc | |
@@ -233,6 +233,7 @@ def InvokeNvcc(argv, log=False): | |
out = ' -o ' + out_file[0] | |
nvccopts = ' '.join([ | |
+ r'-gencode=arch=compute_30,\"code=sm_30,compute_30\"', | |
r'-gencode=arch=compute_35,\"code=sm_35,compute_35\"', | |
r'-gencode=arch=compute_52,\"code=sm_52,compute_52\"',]) | |
nvccopts += ' ' + nvcc_compiler_options |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
<3