-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
INVALID_ARGUMENT : unsupported conv activation mode "LeakyRelu" #22947
Comments
Seems like a bug in the Conv fusion optimizer. If the CUDA EP doesn't support LeakyRelu the optimizer shouldn't fuse the Conv and LeakyRelu if they're assigned to the CUDA EP. |
"Thank you for your reply. How can I avoid this bug, or should I wait for a fix?" |
It's actually setup to ignore the nodes and not fuse if it's assigned to CUDA (technically it could fuse with Relu but right now it's ignoring all activations). onnxruntime/onnxruntime/core/optimizer/conv_activation_fusion.cc Lines 118 to 119 in a24723d
How was the model created? Wondering if it was saved with CPU EP optimizations applied, and now when it's loaded with CUDA enabled it's invalid. i.e. the optimizer ran previously when the Conv + Activation were assigned to the CPU EP so they were fused. |
Sorry, this is someone else's model that I downloaded from Hugging Face, so I'm not sure how the model was created. |
Describe the issue
hello, I encountered an error while using onnxruntime-gpu to start the model service through CUDA:
onnxruntime.capi.onnxruntime_pybind11_state.RuntimeException: [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Exception during initialization: D:\a\_work\1\s\onnxruntime\contrib_ops\cuda\fused_conv.cc:19 onnxruntime::contrib::cuda::FusedConv<float>::FusedConv [ONNXRuntimeError] : 2 : INVALID_ARGUMENT : unsupported conv activation mode "LeakyRelu".
The model runs normally when switched to the CPU with other parameters unchanged. How can I resolve this issue?To reproduce
none
Urgency
general
Platform
Windows
OS Version
win 11
ONNX Runtime Installation
Built from Source
ONNX Runtime Version or Commit ID
onnxruntime-gpu 1.19.2
ONNX Runtime API
Python
Architecture
X64
Execution Provider
CUDA
Execution Provider Library Version
CUDA12.2
The text was updated successfully, but these errors were encountered: