BEVFormer icon indicating copy to clipboard operation
BEVFormer copied to clipboard

A question on forcing fp32 in the code

Open zjuliangxun opened this issue 1 year ago • 0 comments

Thanks for your outstanding work!However, when I was analyzing the code,I found some "@force_fp32" operations hard to understand. For example, in line of 92 of the file "projects/mmdet3d_plugin/bevformer/modules/encoder.py", the function "point_sampling" requires certain parameters to be float32.

# This function must use fp32!!!
    @force_fp32(apply_to=('reference_points', 'img_metas'))
    def point_sampling(self, reference_points, pc_range,  img_metas):

Would you please tell me what will happen if they are float16?

zjuliangxun avatar Mar 16 '23 02:03 zjuliangxun