mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-23 19:32:23 +00:00
fixed "unreachable code" warnings on Windows (#1755)
When NUPHAR_USE_MKL or NUPHAR_USE_AVX2 is not defined, we got "unreachable code" warnings on Windows, which were truned into errors and broke the build.
This commit is contained in:
parent
7c5b3a5ecc
commit
eddb9d78f9
2 changed files with 12 additions and 12 deletions
|
|
@ -89,9 +89,6 @@ IMatMul16ExternMKL(const tvm::Tensor& B,
|
|||
std::string func_str;
|
||||
#ifdef NUPHAR_USE_MKL
|
||||
func_str = "tvm.contrib.onnxruntime.imatmul16.extern.mkl";
|
||||
#else
|
||||
ORT_NOT_IMPLEMENTED("Not implemented. Please set NUPHAR_USE_MKL!");
|
||||
#endif
|
||||
|
||||
// TODO: instead of calling Promote, we may consider to expose
|
||||
// tvm::Tensor and tvm::Expr version of op from topi
|
||||
|
|
@ -109,6 +106,9 @@ IMatMul16ExternMKL(const tvm::Tensor& B,
|
|||
embed_dim});
|
||||
},
|
||||
name, "", {})[0];
|
||||
#else
|
||||
ORT_NOT_IMPLEMENTED("Not implemented. Please set NUPHAR_USE_MKL!");
|
||||
#endif
|
||||
}
|
||||
|
||||
tvm::Tensor
|
||||
|
|
@ -123,9 +123,6 @@ IMatMul16ExternAVX2(const tvm::Tensor& B,
|
|||
std::string func_str;
|
||||
#ifdef NUPHAR_USE_AVX2
|
||||
func_str = "tvm.contrib.onnxruntime.imatmul16.extern.avx2";
|
||||
#else
|
||||
ORT_NOT_IMPLEMENTED("Not implemented. Please set NUPHAR_USE_AVX2!");
|
||||
#endif
|
||||
|
||||
// TODO: instead of calling Promote, we may consider to expose
|
||||
// tvm::Tensor and tvm::Expr version of op from topi
|
||||
|
|
@ -143,6 +140,9 @@ IMatMul16ExternAVX2(const tvm::Tensor& B,
|
|||
embed_dim});
|
||||
},
|
||||
name, "", {})[0];
|
||||
#else
|
||||
ORT_NOT_IMPLEMENTED("Not implemented. Please set NUPHAR_USE_AVX2!");
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace nuphar
|
||||
|
|
|
|||
|
|
@ -87,9 +87,6 @@ IMatMulExternMKL(const tvm::Tensor& B,
|
|||
std::string func_str;
|
||||
#ifdef NUPHAR_USE_MKL
|
||||
func_str = "tvm.contrib.onnxruntime.imatmul.extern.mkl";
|
||||
#else
|
||||
ORT_NOT_IMPLEMENTED("Not implemented. Please set NUPHAR_USE_MKL!");
|
||||
#endif
|
||||
|
||||
return topi::detail::make_extern(
|
||||
{output_shape}, {tvm::Int(32)},
|
||||
|
|
@ -105,6 +102,9 @@ IMatMulExternMKL(const tvm::Tensor& B,
|
|||
embed_dim});
|
||||
},
|
||||
name, "", {})[0];
|
||||
#else
|
||||
ORT_NOT_IMPLEMENTED("Not implemented. Please set NUPHAR_USE_MKL!");
|
||||
#endif
|
||||
}
|
||||
|
||||
tvm::Tensor
|
||||
|
|
@ -119,9 +119,6 @@ IMatMulExternAVX2(const tvm::Tensor& B,
|
|||
std::string func_str;
|
||||
#ifdef NUPHAR_USE_AVX2
|
||||
func_str = "tvm.contrib.onnxruntime.imatmul.extern.avx2";
|
||||
#else
|
||||
ORT_NOT_IMPLEMENTED("Not implemented. Please set NUPHAR_USE_AVX2!");
|
||||
#endif
|
||||
|
||||
return topi::detail::make_extern(
|
||||
{output_shape}, {tvm::Int(32)},
|
||||
|
|
@ -137,6 +134,9 @@ IMatMulExternAVX2(const tvm::Tensor& B,
|
|||
embed_dim});
|
||||
},
|
||||
name, "", {})[0];
|
||||
#else
|
||||
ORT_NOT_IMPLEMENTED("Not implemented. Please set NUPHAR_USE_AVX2!");
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace nuphar
|
||||
|
|
|
|||
Loading…
Reference in a new issue