Skip to content

Crash while forwarding model in test_frcnn_tracing from vision/test/tracing/frcnn #3359

@natangold85

Description

@natangold85

Hi,
I have some problem forwarding the fasterrcnn_resnet50_fpn.pt in test_frcnn_tracing.
I had some problem loading the model, i solved it by adding those lines:

#include <torchvision/empty_tensor_op.h>

static auto registry =
        torch::RegisterOperators().op("torchvision::roi_align(Tensor input, Tensor rois, float spatial_scale, int "
                                      "pooled_height, int pooled_width, int sampling_ratio, bool aligned) -> Tensor",
                                      &roi_align)
                                      .op("torchvision::nms", &nms)
                                      .op("torchvision::_new_empty_tensor_op", &new_empty_tensor);

after solving this problem i'm encountering a segmentation fault in the forward function.
its looking like the segmentation fault is coming from torchvision/nms.h in this call:

return op.call(dets, scores, iou_threshold);

my torchvision is compiled from source in branch v0.8.2
my libtorch is also compiled from source in branch v1.7.1

To compile the frcnn model i'm using python 3.6.8
with pytorch 1.7.1 and torchvision 0.8.2

Can you please help me understand what is the problem here?
Thanks.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions