mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-20 19:12:24 +00:00
Fix ORT_RETURN condition mistake (#16520)
In #16339, the `ORT_ENFORCE(cuda_device_arch_ >= 530` (throw) it changed to `ORT_RETURN_IF` (Status) but the condition is negated. This fixes the problem.
This commit is contained in:
parent
fed08e070a
commit
b84c63db2a
4 changed files with 20 additions and 20 deletions
|
|
@ -55,11 +55,11 @@ class BeamSearchGpt : public BeamSearchBase<T> {
|
|||
cuda_device_prop_ = cuda_device_prop;
|
||||
cuda_device_arch_ = cuda_device_arch;
|
||||
if (gpt_subgraph_.has_decoder_masked_attention_) {
|
||||
ORT_RETURN_IF(cuda_device_arch_ >= 530,
|
||||
"Decoder masked self attention can only be used on "
|
||||
"GPU cards of compute capability 5.3 or higher. "
|
||||
"This card has compute capability ",
|
||||
cuda_device_arch_);
|
||||
ORT_RETURN_IF_NOT(cuda_device_arch_ >= 530,
|
||||
"Decoder masked self attention can only be used on "
|
||||
"GPU cards of compute capability 5.3 or higher. "
|
||||
"This card has compute capability ",
|
||||
cuda_device_arch_);
|
||||
}
|
||||
return Status::OK();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,11 +64,11 @@ class BeamSearchT5 : public BeamSearchBase<T> {
|
|||
cuda_device_prop_ = cuda_device_prop;
|
||||
cuda_device_arch_ = cuda_device_arch;
|
||||
if (decoder_subgraph_.has_decoder_masked_attention_) {
|
||||
ORT_RETURN_IF(cuda_device_arch_ >= 530,
|
||||
"Decoder masked multihead attention can only be used on "
|
||||
"GPU cards of compute capability 5.3 or higher. "
|
||||
"This card has compute capability ",
|
||||
cuda_device_arch_);
|
||||
ORT_RETURN_IF_NOT(cuda_device_arch_ >= 530,
|
||||
"Decoder masked multihead attention can only be used on "
|
||||
"GPU cards of compute capability 5.3 or higher. "
|
||||
"This card has compute capability ",
|
||||
cuda_device_arch_);
|
||||
}
|
||||
return Status::OK();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,11 +62,11 @@ class BeamSearchWhisper : public BeamSearchBase<T> {
|
|||
cuda_device_prop_ = cuda_device_prop;
|
||||
cuda_device_arch_ = cuda_device_arch;
|
||||
if (decoder_subgraph_.has_decoder_masked_attention_) {
|
||||
ORT_RETURN_IF(cuda_device_arch_ >= 530,
|
||||
"Decoder masked multihead attention can only be used on "
|
||||
"GPU cards of compute capability 5.3 or higher. "
|
||||
"This card has compute capability ",
|
||||
cuda_device_arch_);
|
||||
ORT_RETURN_IF_NOT(cuda_device_arch_ >= 530,
|
||||
"Decoder masked multihead attention can only be used on "
|
||||
"GPU cards of compute capability 5.3 or higher. "
|
||||
"This card has compute capability ",
|
||||
cuda_device_arch_);
|
||||
}
|
||||
return Status::OK();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,11 +69,11 @@ class GreedySearchGpt : public GreedySearchBase<T, ParametersT> {
|
|||
cuda_device_prop_ = cuda_device_prop;
|
||||
cuda_device_arch_ = cuda_device_arch;
|
||||
if (gpt_subgraph_.has_decoder_masked_attention_) {
|
||||
ORT_RETURN_IF(cuda_device_arch_ >= 530,
|
||||
"Decoder masked self attention can only be used on "
|
||||
"GPU cards of compute capability 5.3 or higher. "
|
||||
"This card has compute capability ",
|
||||
cuda_device_arch_);
|
||||
ORT_RETURN_IF_NOT(cuda_device_arch_ >= 530,
|
||||
"Decoder masked self attention can only be used on "
|
||||
"GPU cards of compute capability 5.3 or higher. "
|
||||
"This card has compute capability ",
|
||||
cuda_device_arch_);
|
||||
}
|
||||
return Status::OK();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue