From ef106515c536e73eb674eadd31a247ae388bf9fc Mon Sep 17 00:00:00 2001
From: YueShell <1028190073@qq.com>
Date: Fri, 22 Jul 2022 12:43:56 +0800
Subject: [PATCH 1/2] Update custom_ops.py
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
修复编译找不到非共享库的调用问题
---
dnnlib/tflib/custom_ops.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dnnlib/tflib/custom_ops.py b/dnnlib/tflib/custom_ops.py
index 9046787..792421e 100644
--- a/dnnlib/tflib/custom_ops.py
+++ b/dnnlib/tflib/custom_ops.py
@@ -64,6 +64,8 @@ def _prepare_nvcc_cli(opts):
cmd = 'nvcc ' + opts.strip()
cmd += ' --disable-warnings'
cmd += ' --include-path "%s"' % tf.sysconfig.get_include()
+ cmd += ' --library-path /usr/local/cuda/lib64'
+ cmd += ' --include-path "%s"' % "/usr/local/cuda/include"
cmd += ' --include-path "%s"' % os.path.join(tf.sysconfig.get_include(), 'external', 'protobuf_archive', 'src')
cmd += ' --include-path "%s"' % os.path.join(tf.sysconfig.get_include(), 'external', 'com_google_absl')
cmd += ' --include-path "%s"' % os.path.join(tf.sysconfig.get_include(), 'external', 'eigen_archive')
From c0148cd61ea542ed9c28c3321522a9d975064435 Mon Sep 17 00:00:00 2001
From: YueShell <1028190073@qq.com>
Date: Fri, 22 Jul 2022 12:47:39 +0800
Subject: [PATCH 2/2] Update README.md
---
README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/README.md b/README.md
index 8966477..61ac6c2 100644
--- a/README.md
+++ b/README.md
@@ -67,6 +67,8 @@
· Docker users: use the provided Dockerfile to build an image with the required library dependencies.
- On Windows, the compilation requires Microsoft Visual Studio to be in PATH. We recommend installing Visual Studio Community Edition and adding into PATH using "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat".
我的测试环境配置为:Win10,1050Ti,CUDA 10.0,CuDNN 7.6.5,tensorflow-gpu 1.14.0,VS2017可完美运行。
+ 我的Linux测试环境配置为:Ubuntu20.04,2080Ti,gcc7,g++-7,CUDA 10.0,CuDNN 7.6.5,tensorflow-gpu 1.14.0,可完美运行。
+
## Windows下常见问题 :Could not find MSVC/GCC/CLANG installation on this computer如何解决?
在安装VS2017/VS2019时一定要将‘使用C++的桌面开发’选上(如下图所示)