TensorRT icon indicating copy to clipboard operation
TensorRT copied to clipboard

🐛 [Bug] Error on build with CMAKE, win11

Open zsef123 opened this issue 3 years ago • 5 comments

Bug Description

C2487 error on Input Constructor

Error	C2487
'torch_tensorrt::Input::{ctor}': member of dll interface class may not be declared with dll interface	D:\projects\tensorrt\CMakeLists.txt
D:\projects\tensorrt\cpp\include\torch_tensorrt\torch_tensorrt.h	511	

TORCHTRT_API Input(std::vector<int64_t> shape, TensorFormat format = TensorFormat::kContiguous); like this codes

To Reproduce

Use Visual Studio 2019 with CMake, Build > Install tab

Expected behavior

Environment

Build information about Torch-TensorRT can be found by turning on debug messages

  • Torch-TensorRT Version (e.g. 1.0.0): master
  • PyTorch Version (e.g. 1.0): 1.12
  • CPU Architecture: Ryzen 2700
  • OS (e.g., Linux): Win 11
  • 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:
  • Python version: 3.8
  • CUDA version: 11.4
  • GPU models and configuration: RTX3070
  • Any other relevant information:

Additional context

zsef123 avatar Aug 09 '22 23:08 zsef123

@andi4191 Do you have access to a Windows machine to repro? I wont for a few weeks

narendasan avatar Aug 10 '22 16:08 narendasan

I need to check.

andi4191 avatar Aug 10 '22 17:08 andi4191

That error causes missing new file in CMakelists( fine in Bazel) I thinks this srcs to handle with glob

And I still got other linking errors related the Compile spec or GraphInputs

I hope I fix that and upload PR

zsef123 avatar Aug 10 '22 17:08 zsef123

The graph input fix for cmake was merged last night, so maybe try that out and see if it helps

narendasan avatar Aug 10 '22 17:08 narendasan

That error causes missing new file in CMakelists( fine in Bazel) I thinks this srcs to handle with glob

And I still got other linking errors related the Compile spec or GraphInputs

I fused problems. missing file is related with GraphInputs ( above comments)

And still got error about Input or Compilepsecs

zsef123 avatar Aug 10 '22 19:08 zsef123

I meet the same problem on windows10.i need help.

centerzong avatar Aug 19 '22 08:08 centerzong

@centerzong: Can you please try the master branch and confirm if it fixes your issue?

andi4191 avatar Sep 01 '22 16:09 andi4191

@andi4191 working fine 👍

zsef123 avatar Sep 06 '22 09:09 zsef123