Skip to content

[bug] torch2trt test failed on new tensorrt and cuda #69

@andrey-avdeev

Description

@andrey-avdeev
  1. Spec:
  • OS: Ubuntu 18.04

  • GPU: Nvidia 2080Ti

  • CUDA: 10.1.243

  • Docker: 19.03.02, build 6a30dfc

  • Nvidia-docker was installed too

  • Based on Dockerfile provided in this pull request Dockerfile was added #68

python -m torch2trt.test
| torchvision.models.alexnet.alexnet | float16 | [(1, 3, 224, 224)] | {'fp16_mode': True} | 6.87E-05 | 1.03e+03 | 1.56e+03 | 0.922 | 0.65 |
/usr/local/lib/python3.6/dist-packages/torchvision/models/squeezenet.py:94: UserWarning: nn.init.kaiming_uniform is now deprecated in favor of nn.init.kaiming_uniform_.
init.kaiming_uniform(m.weight.data)
/usr/local/lib/python3.6/dist-packages/torchvision/models/squeezenet.py:92: UserWarning: nn.init.normal is now deprecated in favor of nn.init.normal_.
init.normal(m.weight.data, mean=0.0, std=0.01)
| torchvision.models.squeezenet.squeezenet1_0 | float16 | [(1, 3, 224, 224)] | {'fp16_mode': True} | 1.95E-03 | 409 | 1.96e+03 | 2.73 | 0.377 |
| torchvision.models.squeezenet.squeezenet1_1 | float16 | [(1, 3, 224, 224)] | {'fp16_mode': True} | 1.95E-03 | 418 | 2.74e+03 | 2.6 | 0.339 |
| torchvision.models.resnet.resnet18 | float16 | [(1, 3, 224, 224)] | {'fp16_mode': True} | 3.91E-03 | 408 | 1.16e+03 | 2.55 | 0.761 |
| torchvision.models.resnet.resnet34 | float16 | [(1, 3, 224, 224)] | {'fp16_mode': True} | 9.38E-02 | 230 | 677 | 4.71 | 1.51 |
| torchvision.models.resnet.resnet50 | float16 | [(1, 3, 224, 224)] | {'fp16_mode': True} | 1.41E-01 | 144 | 765 | 6.57 | 1.36 |
| torchvision.models.resnet.resnet101 | float16 | [(1, 3, 224, 224)] | {'fp16_mode': True} | 0.00E+00 | 80.1 | 371 | 12.3 | 2.78 |
| torchvision.models.resnet.resnet152 | float16 | [(1, 3, 224, 224)] | {'fp16_mode': True} | 0.00E+00 | 55 | 252 | 18 | 3.97 |
/usr/local/lib/python3.6/dist-packages/torchvision/models/densenet.py:212: UserWarning: nn.init.kaiming_normal is now deprecated in favor of nn.init.kaiming_normal_.
nn.init.kaiming_normal(m.weight.data)
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.6/dist-packages/torch2trt-0.0.0-py3.6.egg/torch2trt/test.py", line 100, in
max_error, fps, fps_trt, ms, ms_trt = run(test)
File "/usr/local/lib/python3.6/dist-packages/torch2trt-0.0.0-py3.6.egg/torch2trt/test.py", line 25, in run
module_trt = torch2trt(module, inputs, **self.torch2trt_kwargs)
File "/usr/local/lib/python3.6/dist-packages/torch2trt-0.0.0-py3.6.egg/torch2trt/torch2trt.py", line 252, in torch2trt
outputs = module(*inputs)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 545, in call
result = self.forward(*input, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/torchvision/models/densenet.py", line 222, in forward
out = F.avg_pool2d(out, kernel_size=7, stride=1).view(features.size(0), -1)
File "/usr/local/lib/python3.6/dist-packages/torch2trt-0.0.0-py3.6.egg/torch2trt/torch2trt.py", line 97, in wrapper
converter(ctx)
File "/usr/local/lib/python3.6/dist-packages/torch2trt-0.0.0-py3.6.egg/torch2trt/converters/view.py", line 11, in convert_view
layer = ctx.network.add_shuffle(input._trt)
AttributeError: 'Tensor' object has no attribute '_trt'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions