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

GridSample part of contrib for CUDA but core for DML #19626

Closed
carsonswope opened this issue Feb 23, 2024 · 2 comments
Closed

GridSample part of contrib for CUDA but core for DML #19626

carsonswope opened this issue Feb 23, 2024 · 2 comments
Labels
ep:CUDA issues related to the CUDA execution provider ep:DML issues related to the DirectML execution provider

Comments

@carsonswope
Copy link
Contributor

Describe the issue

Hi,

I'm attempting to run a model on both CUDA and DML EPs. My model contains several GridSample nodes, from opset 16.

If I run on DML, everything is assigned to the correct EP and inference is fast. However, if I run on CUDA, the GridSample nodes are assigned to the CPU EP, and inference is slow. If I modify the GridSample nodes in my ONNX graph to domain=com.microsoft, then when I run on the CUDA EP everything runs on the GPU, but for DML it now falls back to the CPU implementation.

Tt seems like the DML implementation of GridSample is part of onnxruntime core, but the CUDA implementation is part of contrib. Is this expected? Should I just plan to modify my model in-memory depending on the EP, so that the correct implementation is found for whatever EP I'm running on?

Thanks,

Carson

To reproduce

N/A. Happy to provide a simple test model if requested

Urgency

No response

Platform

Windows

OS Version

10

ONNX Runtime Installation

Built from Source

ONNX Runtime Version or Commit ID

1.16.3

ONNX Runtime API

C++

Architecture

X64

Execution Provider

CUDA

Execution Provider Library Version

No response

@tianleiwu
Copy link
Contributor

tianleiwu commented Feb 23, 2024

The GridSample (onnx domain opset version 16) for CUDA EP was added in a recent commit:
5e432a3
You can try build the main branch from source to test it.

@carsonswope
Copy link
Contributor Author

Oh cool, thanks! Just from a day ago :)

@sophies927 sophies927 added ep:CUDA issues related to the CUDA execution provider ep:DML issues related to the DirectML execution provider labels Feb 29, 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 ep:DML issues related to the DirectML execution provider
Projects
None yet
Development

No branches or pull requests

3 participants