Tvm_runtime_pack.cc with cudnn compile failing with error in cudnn_utils.cc file

Having a problem compiling tvm_runtime_pack.cc in a C++ application. This same application compiles and works fine when I do not include cudnn (below lines are simply commented out) in the tvm_runtime_pack.cc, however when they are added I get the following error

#include "/home/mkrzus/github/incubator-tvm/src/runtime/contrib/cudnn/conv_forward.cc"
#include "/home/mkrzus/github/incubator-tvm/src/runtime/contrib/cudnn/cudnn_utils.cc"
/home/mkrzus/github/incubator-tvm/src/runtime/contrib/cudnn/cudnn_utils.cc:56:60: error: specialization of ‘static const void* tvm::contrib::CuDNNDataType::GetConst(cudnnDataType_t) [with int v = 0]’ after instantiation
 const void* CuDNNDataType::GetConst<0>(cudnnDataType_t type) {
                                                            ^
/home/mkrzus/github/incubator-tvm/src/runtime/contrib/cudnn/cudnn_utils.cc:73:60: error: specialization of ‘static const void* tvm::contrib::CuDNNDataType::GetConst(cudnnDataType_t) [with int v = 1]’ after instantiation
 const void* CuDNNDataType::GetConst<1>(cudnnDataType_t type) {

Interestingly, I have no problem compiling tvm itself with USE_CUDNN turned on and then using tvm to tune a network designated for tx2 using target='cuda -libs=cudnn,cublas' and target_host='llvm -target=aarch64-linux-gnu'. So there really shouldn’t be a problem compiling for a less simple application than tvm itself. That said, however, I’m at my wits end in trying to understand where I’m going wrong. Perhaps some kind of linking issue? Could it be a cudnn issue? It’s very strange, but some help would be greatly appreciated.

I’m using:

CUDA 10.2

CUDNN [Download cuDNN v7.6.5 (November 18th, 2019), for CUDA 10.2]

Thanks again!

Matt

Order matters. cudnn_utils has to be before conv_forward or the above error happens

this worked:

#include "/home/mkrzus/github/incubator-tvm/src/runtime/contrib/cudnn/cudnn_utils.h"
#include "/home/mkrzus/github/incubator-tvm/src/runtime/contrib/cudnn/cudnn_utils.cc"
#include "/home/mkrzus/github/incubator-tvm/src/runtime/contrib/cudnn/conv_forward.cc"