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

fp16 support #33

Open
turboxin opened this issue Aug 26, 2019 · 0 comments
Open

fp16 support #33

turboxin opened this issue Aug 26, 2019 · 0 comments

Comments

@turboxin
Copy link

hi @longcw, thanks a lot for your excellent work, it really helped!

I am now trying to use crop_and _resize on image_feature_maps with dtype of torch.float16 to speed up training and inference, however it seems that your repo doesn't support fp16 yet throwing following error:

RuntimeError: image.type().scalarType() == torch::ScalarType::Float ASSERT FAILED at roi_aligfloat Tensor (crop_and_resize_gpu_forward at roi_align/src/crop_and_resize_gpu.cpp:27)
frame #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_t/miniconda3/lib/python3.6/site-packages/torch/lib/libc10.so)
frame #1: torch::crop_and_resize_gpu_forward(at::Tensor, at::Tensor, at::Tensor, float, int, site-packages/roi_align-0.0.1-py3.6-linux-x86_64.egg/roi_align/crop_and_resize_gpu.cpython-36
frame #2: + 0x157c7 (0x7fc110c767c7 in /usr/local/miniconda3/lib/python3.6gpu.cpython-36m-x86_64-linux-gnu.so)
frame #3: + 0x1598e (0x7fc110c7698e in /usr/local/miniconda3/lib/python3.6gpu.cpython-36m-x86_64-linux-gnu.so)
frame #4: + 0x125f5 (0x7fc110c735f5 in /usr/local/miniconda3/lib/python3.6gpu.cpython-36m-x86_64-linux-gnu.so)

Could you please tell me how can I modify the code to support fp 16? Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant