Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python numpy function --> PyTorch CUDA conversion #1

Open
ghimiredhikura opened this issue Aug 16, 2019 · 3 comments
Open

Python numpy function --> PyTorch CUDA conversion #1

ghimiredhikura opened this issue Aug 16, 2019 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@ghimiredhikura
Copy link
Owner

ghimiredhikura commented Aug 16, 2019

In this project there are mainly three stages.
1. Preprocessing
read PC data and convert to BEV image
2. CNN
pass bev image through yolov3 network
3. Postprocessing
decode yolo output, draw and display results.

The BEV conversion script is implemented using python numpy functions, to make it super real time we have to change this function into PyTorch CUDA. It will be great if anyone can do it.

Thanks.

@ghimiredhikura ghimiredhikura added the help wanted Extra attention is needed label Aug 16, 2019
@ghimiredhikura ghimiredhikura pinned this issue Aug 16, 2019
@ghimiredhikura ghimiredhikura changed the title Python numpy function --> PyTorch CUDA implementation Python numpy function --> PyTorch CUDA conversion Aug 17, 2019
@sidml
Copy link

sidml commented Sep 17, 2019

I was trying to convert it to GPU but i came across the following issue..

  1. No return_counts in torch.unique. There are some hacky ways to solve this but it degrades the performance.
    https://github.com/pytorch/pytorch/issues/12598
  2. No lexsort function in pytorch.

I though of using cupy which seems to be a one line replacement for numpy, but it didn't work..
The main issue is the cupy.unique doesn't support axis yet.. https://docs-cupy.chainer.org/en/stable/reference/generated/cupy.unique.html

@ghimiredhikura
Copy link
Owner Author

Thanks for your efforts. Yes the functions you mentioned are not implemented in pytorch cuda. I think they need to be implemented ourself.

@chrishacc
Copy link

我试图将其转换为GPU,但我遇到了以下问题..

  1. torch.unique 中没有 return_counts。有一些 hacky 方法可以解决这个问题,但它会降低性能。 https://github.com/pytorch/pytorch/issues/12598
  2. pytorch 中没有 lexsort 函数。

我虽然使用过cupy,这似乎是numpy的单行替代品,但它并没有用..主要问题是cupy.unique还不支持轴..https://docs-cupy.chainer.org/en/stable/reference/generated/cupy.unique.html

请问您现在成功将该函数改成PyTorch CUDA实现了嘛

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants