Media-Smart / vedadet

A single stage object detection toolbox based on PyTorch
Apache License 2.0
498 stars 128 forks source link

Fix build issues with newer pytorch #96

Open shi-yan opened 1 year ago

shi-yan commented 1 year ago

The build issues are due to the deprecation of the THC lib,

This migration is based on the suggestions from

https://github.com/pytorch/pytorch/issues/72807#issuecomment-1039505288

The torch extension infra seems to enforce no_half_operators, this results in an issue with the atomicAdd function which does accept c10::Half

The workaround is based on this discussion

https://forums.developer.nvidia.com/t/atomicadd-not-overloaded-for-c10-half/

Tested compiling on pytorch/pytorch:1.13.1-cuda11.6-cudnn8-devel