Fix some BUILD files

This commit is contained in:
gracehoney 2018-02-06 09:26:20 -08:00
parent 149fc8dbd6
commit 37bcd5af97
4 changed files with 10 additions and 13 deletions

View File

@ -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",

View File

@ -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(" ")

View File

@ -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(

View File

@ -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"