Git Product home page Git Product logo

Comments (6)

linchunmian avatar linchunmian commented on May 26, 2024

Screenshot from 2021-08-12 17-03-17

from rotated_iou.

lilanxiao avatar lilanxiao commented on May 26, 2024

hi, my code doesn't support Pytorch 1.2, because some C++ APIs of Pytorch have been changed somewhere between 1.4 and 1.5 if I remember it correctly. The CUDA 10.0 is probably OK, because I only use very basic CUDA features.

I think it's possible to make it work with Pytorch 1.2. At least two places should be modified:

  1. all tensor.data_ptr<T>() should be replaced with tensor.data<T>().
  2. all TORCH_CHECK macro in utils.h should be replaced with AT_CHECK.

Other modifications can be done by trial and error.

from rotated_iou.

linchunmian avatar linchunmian commented on May 26, 2024

hi, my code doesn't support Pytorch 1.2, because some C++ APIs of Pytorch have been changed somewhere between 1.4 and 1.5 if I remember it correctly. The CUDA 10.0 is probably OK, because I only use very basic CUDA features.

I think it's possible to make it work with Pytorch 1.2. At least two places should be modified:

  1. all tensor.data_ptr<T>() should be replaced with tensor.data<T>().
  2. all TORCH_CHECK macro in utils.h should be replaced with AT_CHECK.

Other modifications can be done by trial and error.

Many thanks.

  1. CUDA10 encountered error information like: 'CUDA kernel failed, invalid device function';

1628854153(1)

2. Sorry, how to understand the two modifications you mentioned? What does the 'tensor.data_ptr()' and 'TORCH_CHECK' mean?

Any helps would be appreciated sincerely!

from rotated_iou.

lilanxiao avatar lilanxiao commented on May 26, 2024

hi, I mean you should modify the C++ source code.
First, change line 23-24 of cuda_op/sort_vert.cpp from

sort_vertices_wrapper(b, n, m, vertices.data_ptr<float>(), mask.data_ptr<bool>(),
                         num_valid.data_ptr<int>(), idx.data_ptr<int>());

to

sort_vertices_wrapper(b, n, m, vertices.data<float>(), mask.data<bool>(),
                         num_valid.data<int>(), idx.data<int>());

Since tensor.data_ptr<T> is a new API and not supported in old Pytorch versions.

Second, cuda_op/utils.h uses the macro TORCH_CHECK, which is probably not supported in old Pytorch versions. You should replace all TORCH_CHECK in the file to AT_CHECK.

I don't have CUDA-toolkit 10.0 on my machine so I cannot test these changes. I'm not sure if they would work. If you meet further issues, I recommend you to focus on the C++ APIs of Pytorch. Other parts should be OK.

from rotated_iou.

linchunmian avatar linchunmian commented on May 26, 2024

Many thanks! It is successful to compile on the PyTorch1.2 and CuDA10.0 by converting 'tensor.data_ptr<>' and 'TORCH_CHECK' that you mentioned, and another data type in 'box_intersection_2d.py' and 'min_enclosing_box.py'.

Thanks again for your help.

from rotated_iou.

linchunmian avatar linchunmian commented on May 26, 2024

By the way, if I want to use it for KITTI loss calculation, how should I do?

from rotated_iou.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.