I am facing some Bug of Cuda destruction:https://github.com/pytorch/pytorch/issues/40425 2
Is there anything related with “dumb in the ordering of destruction”?The
The fbcode setting is meaning what?

  
      github.com
  
  
    pytorch/pytorch/blob/master/aten/src/ATen/cudnn/Handle.cpp#L12

#include <ATen/cuda/detail/DeviceThreadHandles.h>
#include <c10/cuda/CUDAStream.h>

namespace at { namespace native {
namespace {

void createCuDNNHandle(cudnnHandle_t *handle) {
  AT_CUDNN_CHECK(cudnnCreate(handle));
}

void destroyCuDNNHandle(cudnnHandle_t handle) {
// this is because of something dumb in the ordering of
// destruction. Sometimes atexit, the cuda context (or something)
// would already be destroyed by the time this gets destroyed. It
// happens in fbcode setting. @colesbury and I decided to not destroy
// the handle as a workaround.
//   - @soumith
#ifdef NO_CUDNN_DESTROY_HANDLE
#else
    cudnnDestroy(handle);
#endif