I just faced the same issue. After checking the information, I found that it was caused by incorrect setting of CUDA architecture while compiling grid_sample_3d plugin.
Set set_target_properties(${PROJECT_NAME} PROPERTIES CUDA_ARCHITECTURES “89”) in the CMakeLists.txt of the compiled plugin to the compute power adapted to your own GPU. The compute power can be found at the URL https://developer.nvidia.com/cuda-gpus. For example, if I am using a 3090, at the corresponding compute power of 8.6, I should use set_target_properties(${PROJECT_NAME} PROPERTIES CUDA_ARCHITECTURES “86”)