Package Details: python-pytorch-tensorrt 1.4.0-1

Git Clone URL: https://aur.archlinux.org/python-pytorch-tensorrt.git (read-only, click to copy)
Package Base: python-pytorch-tensorrt
Description: PyTorch/TorchScript/FX compiler for NVIDIA GPUs using TensorRT
Upstream URL: https://github.com/pytorch/TensorRT
Licenses: BSD
Submitter: sl1pkn07
Maintainer: None
Last Packager: sl1pkn07
Votes: 1
Popularity: 0.000228
First Submitted: 2023-01-06 00:49 (UTC)
Last Updated: 2024-01-25 19:54 (UTC)

Latest Comments

1 2 Next › Last »

ioctl commented on 2024-02-12 09:38 (UTC) (edited on 2024-02-12 09:40 (UTC) by ioctl)

Get an error caused by just import command:

from torch_tensorrt.fx import LowerSetting

Has python-tensorrt version 9.3.0.

Here is output:

  File "/tmp/1.py", line 1, in <module>     from torch_tensorrt.fx import LowerSetting   File "/usr/lib/python3.11/site-packages/torch_tensorrt/__init__.py", line 99, in <module>     from torch_tensorrt import dynamo   File "/usr/lib/python3.11/site-packages/torch_tensorrt/dynamo/__init__.py", line 2, in <module>     from .backend import compile   File "/usr/lib/python3.11/site-packages/torch_tensorrt/dynamo/backend/__init__.py", line 13, in <module>     from torch_tensorrt.dynamo.backend.backends import torch_tensorrt_backend   File "/usr/lib/python3.11/site-packages/torch_tensorrt/dynamo/backend/backends.py", line 8, in <module>     from torch_tensorrt.dynamo.backend.lowering._decompositions import (   File "/usr/lib/python3.11/site-packages/torch_tensorrt/dynamo/backend/lowering/__init__.py", line 1, in <module>     from torch_tensorrt.dynamo.backend.lowering._decompositions import (   File "/usr/lib/python3.11/site-packages/torch_tensorrt/dynamo/backend/lowering/_decompositions.py", line 30, in <module>     replace_inplace_op(aten.fill_, aten.fill)   File "/usr/lib/python3.11/site-packages/torch_tensorrt/dynamo/backend/lowering/_decompositions.py", line 16, in replace_inplace_op     @register_decomposition(aten_op, registry=DECOMPOSITIONS)      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/lib/python3.11/site-packages/torch/_decomp/__init__.py", line 185, in decomposition_decorator     pytree.tree_map_(register, aten_op)   File "/usr/lib/python3.11/site-packages/torch/utils/_pytree.py", line 607, in tree_map_     deque(map(func, flat_args), maxlen=0)  # consume and exhaust the iterable     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/lib/python3.11/site-packages/torch/_decomp/__init__.py", line 182, in register     _add_op_to_registry(registry, op, fn)   File "/usr/lib/python3.11/site-packages/torch/_decomp/__init__.py", line 55, in _add_op_to_registry     raise RuntimeError(f"duplicate registrations for {op_overload}") RuntimeError: duplicate registrations for aten.fill_.Scalar 

damian101 commented on 2024-01-26 12:40 (UTC)

fixed now, thanks a lot

damian101 commented on 2024-01-25 17:40 (UTC)

I get an error that I am unable to resolve:

In file included from /usr/include/c10/util/string_view.h:4,                  from /usr/include/c10/util/StringUtil.h:6,                  from /usr/include/c10/util/Exception.h:5,                  from /usr/include/c10/core/Device.h:5,                  from /usr/include/ATen/core/TensorBody.h:11,                  from /usr/include/ATen/core/Tensor.h:3,                  from /usr/include/ATen/Tensor.h:3,                  from /home/damian101/.cache/yay/python-pytorch-tensorrt/src/TensorRT/core/util/trt_util.h:3,                  from /home/damian101/.cache/yay/python-pytorch-tensorrt/src/TensorRT/core/util/trt_util.cpp:1: /usr/include/c10/util/C++17.h:27:2: error: #error You need C++17 to compile PyTorch    27 | #error You need C++17 to compile PyTorch       |  ^~~~~ In file included from /usr/include/ATen/core/ivalue.h:1499,                  from /usr/include/ATen/core/List_inl.h:4,                  from /usr/include/ATen/core/List.h:490,                  from /home/damian101/.cache/yay/python-pytorch-tensorrt/src/TensorRT/core/util/trt_util.h:4: /usr/include/ATen/core/ivalue_inl.h: In lambda function: /usr/include/ATen/core/ivalue_inl.h:1061:30: error: ‘is_convertible_v’ is not a member of ‘std’; did you mean ‘is_convertible’?  1061 |         if constexpr (::std::is_convertible_v<typename c10::invoke_result_t<T &&, Future&>, IValueWithStorages>) {       |                              ^~~~~~~~~~~~~~~~       |                              is_convertible /usr/include/ATen/core/ivalue_inl.h:1061:91: error: expected ‘(’ before ‘,’ token  1061 |         if constexpr (::std::is_convertible_v<typename c10::invoke_result_t<T &&, Future&>, IValueWithStorages>) {       |                                                                                           ^ /usr/include/ATen/core/ivalue_inl.h:1061:111: error: expected primary-expression before ‘>’ token  1061 |         if constexpr (::std::is_convertible_v<typename c10::invoke_result_t<T &&, Future&>, IValueWithStorages>) {       |                                                                                                               ^ /usr/include/ATen/core/ivalue_inl.h:1061:112: error: expected primary-expression before ‘)’ token  1061 |         if constexpr (::std::is_convertible_v<typename c10::invoke_result_t<T &&, Future&>, IValueWithStorages>) {       |                                                                                                                ^ In file included from /usr/include/ATen/core/boxing/KernelFunction_impl.h:1,                  from /usr/include/ATen/core/boxing/KernelFunction.h:251,                  from /usr/include/ATen/core/dispatch/Dispatcher.h:4,                  from /usr/include/torch/csrc/jit/runtime/operator.h:6,                  from /usr/include/torch/csrc/jit/ir/ir.h:7,                  from /usr/include/torch/csrc/jit/api/function_impl.h:4,                  from /usr/include/torch/csrc/jit/api/method.h:7,                  from /usr/include/torch/csrc/jit/api/object.h:6,                  from /usr/include/torch/csrc/jit/api/module.h:4,                  from /home/damian101/.cache/yay/python-pytorch-tensorrt/src/TensorRT/core/util/trt_util.h:6: /usr/include/ATen/core/boxing/impl/boxing.h: In static member function ‘static Result c10::impl::BoxedKernelWrapper<Result(Args ...), typename std::enable_if<((c10::guts::conjunction<c10::guts::disjunction<std::is_constructible<c10::IValue, typename std::decay<Ts>::type>, std::is_same<c10::TensorOptions, typename std::decay<Ts>::type> >...>::value && c10::guts::conjunction<c10::guts::disjunction<c10::impl::has_ivalue_to<T, void>, std::is_same<void, T> >, c10::guts::negation<std::is_lvalue_reference<_Tp> > >::value) && (! c10::impl::is_tuple_of_mutable_tensor_refs<Result>::value)), void>::type>::call(const c10::BoxedKernel&, const c10::OperatorHandle&, c10::DispatchKeySet, Args ...)’: /usr/include/ATen/core/boxing/impl/boxing.h:229:25: error: ‘is_same_v’ is not a member of ‘std’; did you mean ‘is_same’?   229 |     if constexpr (!std::is_same_v<void, Result>) {       |                         ^~~~~~~~~       |                         is_same /usr/include/ATen/core/boxing/impl/boxing.h:229:35: error: expected primary-expression before ‘void’   229 |     if constexpr (!std::is_same_v<void, Result>) {       |                                   ^~~~ /usr/include/ATen/core/boxing/impl/boxing.h:229:35: error: expected ‘)’ before ‘void’ /usr/include/ATen/core/boxing/impl/boxing.h:229:18: note: to match this ‘(’   229 |     if constexpr (!std::is_same_v<void, Result>) {       |                  ^ make[2]: *** [core/util/CMakeFiles/core_util.dir/build.make:90: core/util/CMakeFiles/core_util.dir/trt_util.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:487: core/util/CMakeFiles/core_util.dir/all] Error 2 make: *** [Makefile:136: all] Error 2 ==> ERROR: A failure occurred in build(). 

Moebius14 commented on 2023-11-24 16:10 (UTC)

build fails during linking due various "undefined reference" errors to openmp despite having -lgomp in my linker flags.

sl1pkn07 commented on 2023-06-01 15:08 (UTC)

try again

superyu1337 commented on 2023-06-01 12:45 (UTC) (edited on 2023-06-01 13:09 (UTC) by superyu1337)

Nope, same errors.

Edit: Cleared paru cache. Got further, now failing the build with this:

lto1: fatal error: bytecode stream in file ‘/home/janek/.cache/paru/clone/python-pytorch-tensorrt/src/TensorRT/py/build/temp.linux-x86_64-cpython-311/torch_tensorrt/csrc/register_tensorrt_classes.o’ generated with LTO version 13.0 instead of the expected 12.0 compilation terminated. lto-wrapper: fatal error: /opt/cuda/bin/g++ returned 1 exit status compilation terminated. /usr/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status error: command '/opt/cuda/bin/g++' failed with exit code 1 ==> ERROR: A failure occurred in build().     Aborting... error: failed to build 'python-pytorch-tensorrt-1.3.0-1':  error: packages failed to build: python-pytorch-tensorrt-1.3.0-1 

Specifically this:

generated with LTO version 13.0 instead of the expected 12.0 

leads me to belive that im more up to date than what tensorrt needs.

Edit 2: Googled it. g++ version mismatches. Im trying to make it use g++-12 now.

Edit 3: Got it running using this on line 36 and 37 in PKGBUILD

export CC=g++-12 export CXX=g++-12 

sl1pkn07 commented on 2023-06-01 01:37 (UTC)

try now

superyu1337 commented on 2023-06-01 01:16 (UTC) (edited on 2023-06-01 01:17 (UTC) by superyu1337)

Can't get this to install. cuda 12.1.1-3 python-pytorch-opt-cuda 2.0.1-2 python-tensorrt 8.6.0.12-1 tensorrt 8.6.0.12-1

-- Build files have been written to: /home/janek/.cache/paru/clone/python-pytorch-tensorrt/src/build [  1%] Building CXX object core/util/logging/CMakeFiles/core_util_logging.dir/TorchTRTLogger.cpp.o [  1%] Built target core_util_logging [  2%] Building CXX object core/util/CMakeFiles/core_util.dir/Exception.cpp.o [  3%] Building CXX object core/util/CMakeFiles/core_util.dir/trt_util.cpp.o In file included from /home/janek/.cache/paru/clone/python-pytorch-tensorrt/src/TensorRT/core/util/Exception.cpp:1: /home/janek/.cache/paru/clone/python-pytorch-tensorrt/src/TensorRT/core/util/Exception.h:23:33: error: ‘uint32_t’ does not name a type    23 |   Error(const char* file, const uint32_t line, const std::string& msg, const void* caller = nullptr);       |                                 ^~~~~~~~ /home/janek/.cache/paru/clone/python-pytorch-tensorrt/src/TensorRT/core/util/Exception.h:7:1: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?     6 | #include <vector>   +++ |+#include <cstdint>     7 |  /home/janek/.cache/paru/clone/python-pytorch-tensorrt/src/TensorRT/core/util/Exception.cpp:13:38: error: ‘uint32_t’ does not name a type    13 | Error::Error(const char* file, const uint32_t line, const std::string& msg, const void* caller)       |                                      ^~~~~~~~ /home/janek/.cache/paru/clone/python-pytorch-tensorrt/src/TensorRT/core/util/Exception.cpp:5:1: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?     4 | #include <numeric>   +++ |+#include <cstdint>     5 | #include <string> make[2]: *** [core/util/CMakeFiles/core_util.dir/build.make:76: core/util/CMakeFiles/core_util.dir/Exception.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [CMakeFiles/Makefile2:487: core/util/CMakeFiles/core_util.dir/all] Error 2 make: *** [Makefile:136: all] Error 2 ==> ERROR: A failure occurred in build().     Aborting... error: failed to build 'python-pytorch-tensorrt-1.3.0-1':  error: packages failed to build: python-pytorch-tensorrt-1.3.0-1 

sl1pkn07 commented on 2023-05-04 08:36 (UTC)

that is because is builded with gcc 13 (testing). you need downgrade to gcc 12. or wait to fix this https://bugs.archlinux.org/task/78362 (i have the same problem like you xd)

greetings

DavTheRaveUK commented on 2023-05-04 07:19 (UTC)

Hello sl1pkn07, I tried building this package but have hit upon errors. The errors are more than 1000+ lines. So I have sent the file to my mega.nz account and below is a link to that file:

https://mega.nz/file/wP5ylYZB#bxY46VYYtjTwmqH31rwlUvn1lDWuApjifq14A5Exfvg

Hope you can help. David.