Fixing issue with cuda configuration when cudnn.h located in /usr/include/cudnn.h
PiperOrigin-RevId: 156306372
This commit is contained in:
parent
16c202635e
commit
eb937e62c5
6
third_party/gpus/cuda_configure.bzl
vendored
6
third_party/gpus/cuda_configure.bzl
vendored
@ -787,7 +787,7 @@ def _symlink_genrule_for_dir(repository_ctx, src_dir, dest_dir, genrule_name,
|
|||||||
if dest_files[i] != "":
|
if dest_files[i] != "":
|
||||||
# If we have only one file to link we do not want to use the dest_dir, as
|
# If we have only one file to link we do not want to use the dest_dir, as
|
||||||
# $(@D) will include the full path to the file.
|
# $(@D) will include the full path to the file.
|
||||||
dest = ' $(@D)/' + dest_dir + dest_files[i] if len(dest_files) != 1 else ' $(@D)' + dest_files[i]
|
dest = ' $(@D)/' + dest_dir + dest_files[i] if len(dest_files) != 1 else ' $(@D)/' + dest_files[i]
|
||||||
command.append('ln -s ' + src_files[i] + dest)
|
command.append('ln -s ' + src_files[i] + dest)
|
||||||
outs.append(' "' + dest_dir + dest_files[i] + '",')
|
outs.append(' "' + dest_dir + dest_files[i] + '",')
|
||||||
genrule = _genrule(src_dir, genrule_name, " && ".join(command),
|
genrule = _genrule(src_dir, genrule_name, " && ".join(command),
|
||||||
@ -875,8 +875,8 @@ def _create_cuda_repository(repository_ctx):
|
|||||||
included_files = _read_dir(repository_ctx, cuda_include_path).replace(
|
included_files = _read_dir(repository_ctx, cuda_include_path).replace(
|
||||||
cuda_include_path, '').splitlines()
|
cuda_include_path, '').splitlines()
|
||||||
if '/cudnn.h' not in included_files:
|
if '/cudnn.h' not in included_files:
|
||||||
genrules.append(_symlink_genrule_for_dir(repository_ctx, None, "",
|
genrules.append(_symlink_genrule_for_dir(repository_ctx, None, "include/",
|
||||||
"cudnn-include", [cudnn_header_dir + "/cudnn.h"], ["include/cudnn.h"]))
|
"cudnn-include", [cudnn_header_dir + "/cudnn.h"], ["cudnn.h"]))
|
||||||
else:
|
else:
|
||||||
genrules.append(
|
genrules.append(
|
||||||
'filegroup(\n' +
|
'filegroup(\n' +
|
||||||
|
Loading…
x
Reference in New Issue
Block a user