mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-05 04:17:53 +00:00
Fix build error for CUDA version < 11.4. The error was introduce by
commit 6efa9d9e10.
This commit is contained in:
parent
b62ba0b5a7
commit
0e98fb4e9b
4 changed files with 16 additions and 16 deletions
|
|
@ -156,9 +156,9 @@ inline void debug_print([[maybe_unused]] const T* arr,
|
|||
|
||||
#endif
|
||||
|
||||
QOrderedAttention::QOrderedAttention(const OpKernelInfo& info) : CudaKernel(info), AttentionBase(info), input_hidden_size_(0) {
|
||||
QOrderedAttention::QOrderedAttention(const OpKernelInfo& info) : CudaKernel(info), AttentionBase(info) {
|
||||
#if defined(CUDA_VERSION) && CUDA_VERSION >= 11040
|
||||
|
||||
input_hidden_size_ = 0;
|
||||
int cuda_runtime_version = 0;
|
||||
CUDA_CALL_THROW(cudaRuntimeGetVersion(&cuda_runtime_version));
|
||||
ORT_ENFORCE(cuda_runtime_version >= 11040, "QOrderedMatmul need cuda runtime higher than 11.4");
|
||||
|
|
@ -185,7 +185,7 @@ QOrderedAttention::QOrderedAttention(const OpKernelInfo& info) : CudaKernel(info
|
|||
|
||||
#else
|
||||
|
||||
ORT_ENFORCE(false, "Compiling with CUDA_VERSION >= 11.4 is needed!")
|
||||
ORT_ENFORCE(false, "Compiling with CUDA_VERSION >= 11.4 is needed!");
|
||||
|
||||
#endif
|
||||
}
|
||||
|
|
@ -305,7 +305,7 @@ Status QOrderedAttention::ComputeInternal(OpKernelContext* context) const {
|
|||
#else
|
||||
|
||||
ORT_UNUSED_PARAMETER(context);
|
||||
ORT_ENFORCE(false, "Compiling with CUDA_VERSION >= 11.4 is needed!")
|
||||
ORT_ENFORCE(false, "Compiling with CUDA_VERSION >= 11.4 is needed!");
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ QOrderedLongformerAttention::QOrderedLongformerAttention(const OpKernelInfo& inf
|
|||
|
||||
#else
|
||||
|
||||
ORT_ENFORCE(false, "Compiling with CUDA_VERSION >= 11.4 is needed!")
|
||||
ORT_ENFORCE(false, "Compiling with CUDA_VERSION >= 11.4 is needed!");
|
||||
|
||||
#endif
|
||||
}
|
||||
|
|
@ -267,7 +267,7 @@ QOrderedLongformerAttention::ComputeInternal(OpKernelContext* context) const {
|
|||
#else
|
||||
|
||||
ORT_UNUSED_PARAMETER(context);
|
||||
ORT_ENFORCE(false, "Compiling with CUDA_VERSION >= 11.4 is needed!")
|
||||
ORT_ENFORCE(false, "Compiling with CUDA_VERSION >= 11.4 is needed!");
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ QOrderedMatMul::QOrderedMatMul(const OpKernelInfo& info) : CudaKernel(info) {
|
|||
|
||||
#else
|
||||
|
||||
ORT_ENFORCE(false, "Compiling with CUDA_VERSION >= 11.4 is needed!")
|
||||
ORT_ENFORCE(false, "Compiling with CUDA_VERSION >= 11.4 is needed!");
|
||||
|
||||
#endif
|
||||
}
|
||||
|
|
@ -110,7 +110,7 @@ Status QOrderedMatMul::PrePack(const Tensor& tensor, int input_idx, AllocatorPtr
|
|||
ORT_UNUSED_PARAMETER(input_idx);
|
||||
ORT_UNUSED_PARAMETER(alloc);
|
||||
ORT_UNUSED_PARAMETER(is_packed);
|
||||
ORT_ENFORCE(false, "Compiling with CUDA_VERSION >= 11.4 is needed!")
|
||||
ORT_ENFORCE(false, "Compiling with CUDA_VERSION >= 11.4 is needed!");
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -191,7 +191,7 @@ Status QOrderedMatMul::ComputeInternal(OpKernelContext* context) const {
|
|||
#else
|
||||
|
||||
ORT_UNUSED_PARAMETER(context);
|
||||
ORT_ENFORCE(false, "Compiling with CUDA_VERSION >= 11.4 is needed!")
|
||||
ORT_ENFORCE(false, "Compiling with CUDA_VERSION >= 11.4 is needed!");
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -108,8 +108,8 @@ QuantizeWithOrder::QuantizeWithOrder(const OpKernelInfo& info) : CudaKernel(info
|
|||
#else
|
||||
|
||||
ORT_UNUSED_PARAMETER(info);
|
||||
ORT_ENFORCE(false, "Compiling with CUDA_VERSION >= 11.4 is needed!")
|
||||
|
||||
ORT_ENFORCE(false, "Compiling with CUDA_VERSION >= 11.4 is needed!");
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -133,7 +133,7 @@ DequantizeWithOrder::DequantizeWithOrder(const OpKernelInfo& info) : CudaKernel(
|
|||
#else
|
||||
|
||||
ORT_UNUSED_PARAMETER(info);
|
||||
ORT_ENFORCE(false, "Compiling with CUDA_VERSION >= 11.4 is needed!")
|
||||
ORT_ENFORCE(false, "Compiling with CUDA_VERSION >= 11.4 is needed!");
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -183,8 +183,8 @@ Status QuantizeWithOrder::ComputeInternal(OpKernelContext* context) const {
|
|||
|
||||
#else
|
||||
|
||||
ORT_UNUSED_PARAMETER(info);
|
||||
ORT_ENFORCE(false, "Compiling with CUDA_VERSION >= 11.4 is needed!")
|
||||
ORT_UNUSED_PARAMETER(context);
|
||||
ORT_ENFORCE(false, "Compiling with CUDA_VERSION >= 11.4 is needed!");
|
||||
|
||||
#endif
|
||||
}
|
||||
|
|
@ -228,8 +228,8 @@ Status DequantizeWithOrder::ComputeInternal(OpKernelContext* context) const {
|
|||
|
||||
#else
|
||||
|
||||
ORT_UNUSED_PARAMETER(info);
|
||||
ORT_ENFORCE(false, "Compiling with CUDA_VERSION >= 11.4 is needed!")
|
||||
ORT_UNUSED_PARAMETER(context);
|
||||
ORT_ENFORCE(false, "Compiling with CUDA_VERSION >= 11.4 is needed!");
|
||||
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue