Skip to content
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

cuda's FusedConv is not support Sigmod #20708

Open
marktohark opened this issue May 17, 2024 · 0 comments
Open

cuda's FusedConv is not support Sigmod #20708

marktohark opened this issue May 17, 2024 · 0 comments
Labels
ep:CUDA issues related to the CUDA execution provider

Comments

@marktohark
Copy link

marktohark commented May 17, 2024

Describe the issue

2024-05-17 09:41:31.333218349 [E:onnxruntime:, inference_session.cc:1981 operator()] Exception during initialization: /onnxruntime_src/onnxruntime/contrib_ops/cuda/fused_conv.cc:19 onnxruntime::contrib::cuda::FusedConv::FusedConv(const onnxruntime::OpKernelInfo&) [with T = float] [ONNXRuntimeError] : 2 : INVALID_ARGUMENT : unsupported conv activation mode "Sigmoid"

I use CUDA Provider to load onnx model, and show error.

python: 3.8.10
onnxruntime-gpu: 1.17.1
os: ubuntu 20.04
cuda: 11.8
cuDNN: 8.5.0

In onnxruntime/contrib_ops/cuda/fused_conv.cc

image

If I edit it to below and build wheel, will it work?
cudnnactivationmode-t struct

  Status MapMode(const std::string& activaton_mode) {
    if (activaton_mode == "Relu") {
      activation_mode_ = cudnnActivationMode_t::CUDNN_ACTIVATION_RELU;
    } else if (activaton_mode == "Sigmoid")
      activation_mode_ = cudnnActivationMode_t::CUDNN_ACTIVATION_SIGMOID;
    else {
      return ORT_MAKE_STATUS(
          StatusCategory::ONNXRUNTIME, StatusCode::INVALID_ARGUMENT,
          "unsupported conv activation mode \"", activaton_mode, "\"");
    }
    return Status::OK();
  }
  cudnnActivationMode_t activation_mode_;
  cudnnActivationDescriptor_t activation_desc_ = nullptr;
};

btw, cpu is supported.
image

To reproduce

In onnx model, use FusedConv, and activation is "Sigmod".

Urgency

No response

Platform

Linux

OS Version

Ubuntu 20.04

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

onnxruntime-gpu 1.17.1

ONNX Runtime API

Python

Architecture

X64

Execution Provider

CUDA

Execution Provider Library Version

CUDA 11.8 and cuDNN 8.5.0

@github-actions github-actions bot added the ep:CUDA issues related to the CUDA execution provider label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ep:CUDA issues related to the CUDA execution provider
Projects
None yet
Development

No branches or pull requests

1 participant