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][1.17.1][Regression] Access Violation in an inference session Run #19778

Closed
claeyzre opened this issue Mar 5, 2024 · 3 comments
Closed
Assignees
Labels
ep:CUDA issues related to the CUDA execution provider

Comments

@claeyzre
Copy link

claeyzre commented Mar 5, 2024

Describe the issue

I have an old ONNX model translated from tensorflow with tf2onnx a while ago.
It always used to run fine in the previous version (<1.17) but I now hit an Access Violation during the inference.

In 1.16.3 everything works fine. The package is onnxruntime-gpu.
You can find the model here

The error happens during the inference and not at the creation of the InferenceSession. While creating the inference session the models seems to be correctly put on GPU memory and the error happens when calling .Run

Also the error does not happen when I specify CPUExecutionProvider in the providers list.

To reproduce

The following code runs fine in 1.16.3 but not in 1.17.1

from onnxruntime import InferenceSession
import numpy as np
model_path = r"path_to_the_given_model.onnx"
session = InferenceSession(model_path, providers=["CUDAExecutionProvider"])
inputs = {"input_ids": np.ones((1, 200), dtype=np.int32)}
outputs = session.run(input_feed=inputs, output_names=["output_0", "output_1"])

Urgency

No response

Platform

Windows

OS Version

11

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

1.17.1

ONNX Runtime API

Python

Architecture

X64

Execution Provider

CUDA

Execution Provider Library Version

CUDA 11.8

@github-actions github-actions bot added ep:CUDA issues related to the CUDA execution provider platform:windows issues related to the Windows platform labels Mar 5, 2024
@snnn snnn self-assigned this Mar 5, 2024
@snnn
Copy link
Member

snnn commented Mar 5, 2024

Found a bug in #17200

@snnn snnn linked a pull request Mar 5, 2024 that will close this issue
@snnn snnn changed the title [CUDA][1.17.1][Windows][Regression] Access Violation in an inference session Run [CUDA][1.17.1][Regression] Access Violation in an inference session Run Mar 5, 2024
@snnn snnn removed the platform:windows issues related to the Windows platform label Mar 5, 2024
@github-actions github-actions bot added the platform:windows issues related to the Windows platform label Mar 5, 2024
@snnn snnn removed the platform:windows issues related to the Windows platform label Mar 5, 2024
@snnn
Copy link
Member

snnn commented Mar 5, 2024

I removed the "platform:windows" label since it is not Windows specific.

@snnn
Copy link
Member

snnn commented Jun 19, 2024

Fixed in #19889

@snnn snnn closed this as completed Jun 19, 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

Successfully merging a pull request may close this issue.

2 participants