Description
❓ Question
I am trying to compile a windows dll for torch-tensorRT, however I get the following traceback:
ERROR: C:/users/48698/source/libraries/torch-tensorrt-1.0.0/core/plugins/BUILD:10:11: Compiling core/plugins/register_plugins.cpp failed: undeclared inclusion(s) in rule '//core/plugins:torch_tensorrt_plugins':
this rule is missing dependency declarations for the following files included by 'core/plugins/register_plugins.cpp':
'external/cuda/cudnn.h'
'external/cuda/cudnn_version.h'
'external/cuda/cudnn_ops_infer.h'
'external/cuda/cudnn_ops_train.h'
'external/cuda/cudnn_adv_infer.h'
'external/cuda/cudnn_adv_train.h'
'external/cuda/cudnn_cnn_infer.h'
'external/cuda/cudnn_cnn_train.h'
'external/cuda/cudnn_backend.h'
which is weird cause I do have the cudnn included, and can find the files under the C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6 path
I am new to Bazel, is there another way I could link those?
What you have already tried
Followed this guide: #856 to a t. I think I am linking cudnn in a weird way?
Environment
Build information about Torch-TensorRT can be found by turning on debug messages
- PyTorch Version (e.g., 1.0): 1.11.0
- OS (e.g., Linux): windows
- How you installed PyTorch (
conda
,pip
,libtorch
, source): libtorch - Build command you used (if compiling from source):
- Are you using local sources or building from archives: local
- Python version: 3.9
- CUDA version: 11.6
- GPU models and configuration: 3070
- Any other relevant information:
Additional context
My torch-tensorrt-1.0.0/core/plugins/BUILD is as follows:
config_setting(
name = "use_pre_cxx11_abi",
values = {
"define": "abi=pre_cxx11_abi",
}
)
cc_library(
name = "torch_tensorrt_plugins",
hdrs = [
"impl/interpolate_plugin.h",
"impl/normalize_plugin.h",
"plugins.h",
],
srcs = [
"impl/interpolate_plugin.cpp",
"impl/normalize_plugin.cpp",
"register_plugins.cpp",
],
deps = [
"@tensorrt//:nvinfer",
"@tensorrt//:nvinferplugin",
"//core/util:prelude",
] + select({
":use_pre_cxx11_abi": ["@libtorch_pre_cxx11_abi//:libtorch"],
"//conditions:default": ["@libtorch//:libtorch"],
}),
alwayslink = True,
copts = [
"-pthread"
],
linkopts = [
"-lpthread",
]
)
load("@rules_pkg//:pkg.bzl", "pkg_tar")
pkg_tar(
name = "include",
package_dir = "core/plugins/",
srcs = ["plugins.h"],
)
pkg_tar(
name = "impl_include",
package_dir = "core/plugins/impl",
srcs = ["impl/interpolate_plugin.h",
"impl/normalize_plugin.h"],
)
I could attach more build files if needed, but everything apart from the paths is the same as in the referenced issue.