Fix some BUILD files
This commit is contained in:
parent
149fc8dbd6
commit
37bcd5af97
@ -9,7 +9,6 @@ licenses(["notice"]) # Apache 2.0
|
||||
|
||||
exports_files(["LICENSE"])
|
||||
|
||||
load("@local_config_cuda//cuda:build_defs.bzl", "if_cuda")
|
||||
load(
|
||||
"//tensorflow:tensorflow.bzl",
|
||||
"tf_custom_op_library",
|
||||
|
14
third_party/gpus/cuda_configure.bzl
vendored
14
third_party/gpus/cuda_configure.bzl
vendored
@ -367,19 +367,19 @@ def find_cuda_define(repository_ctx, header_dir, header_file, define):
|
||||
if result.stdout.find(define) == -1:
|
||||
auto_configure_fail("Cannot find line containing '%s' in %s" %
|
||||
(define, h_path))
|
||||
#split results to lines
|
||||
# Split results to lines
|
||||
lines = result.stdout.split('\n')
|
||||
lenLines = len(lines)
|
||||
for l in range(lenLines):
|
||||
num_lines = len(lines)
|
||||
for l in range(num_lines):
|
||||
line = lines[l]
|
||||
if define in line: # find the line with define
|
||||
if define in line: # Find the line with define
|
||||
version = line
|
||||
if l != lenLines-1 and line[-1] == '\\': # add next line, if multiline
|
||||
if l != num_lines-1 and line[-1] == '\\': # Add next line, if multiline
|
||||
version = version[:-1] + lines[l+1]
|
||||
break
|
||||
#remove any comments
|
||||
# Remove any comments
|
||||
version = version.split("//")[0]
|
||||
# remove define name
|
||||
# Remove define name
|
||||
version = version.replace(define, "").strip()
|
||||
# Remove the code after the version number.
|
||||
version_end = version.find(" ")
|
||||
|
3
third_party/tensorrt/BUILD.tpl
vendored
3
third_party/tensorrt/BUILD.tpl
vendored
@ -1,11 +1,12 @@
|
||||
# NVIDIA TensorRT
|
||||
# A high-performance deep learning inference optimizer and runtime.
|
||||
|
||||
load("@local_config_cuda//cuda:build_defs.bzl", "cuda_default_copts")
|
||||
licenses(["notice"])
|
||||
|
||||
exports_files(["LICENSE"])
|
||||
|
||||
load("@local_config_cuda//cuda:build_defs.bzl", "cuda_default_copts")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
cc_library(
|
||||
|
5
third_party/tensorrt/tensorrt_configure.bzl
vendored
5
third_party/tensorrt/tensorrt_configure.bzl
vendored
@ -20,10 +20,7 @@ _TENSORRT_INSTALL_PATH = "TENSORRT_INSTALL_PATH"
|
||||
_TF_TENSORRT_VERSION = "TF_TENSORRT_VERSION"
|
||||
|
||||
_TF_TENSORRT_LIBS = ["nvinfer"]
|
||||
_TF_TENSORRT_HEADERS = [
|
||||
"NvInfer.h",
|
||||
"NvUtils.h"
|
||||
]
|
||||
_TF_TENSORRT_HEADERS = ["NvInfer.h", "NvUtils.h"]
|
||||
|
||||
_DEFINE_TENSORRT_SONAME_MAJOR = "#define NV_TENSORRT_SONAME_MAJOR"
|
||||
_DEFINE_TENSORRT_SONAME_MINOR = "#define NV_TENSORRT_SONAME_MINOR"
|
||||
|
Loading…
Reference in New Issue
Block a user