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

DML cannot use device_id = 1 , run_with_iobinding failed. #21092

Open
Jay19751103 opened this issue Jun 19, 2024 · 3 comments
Open

DML cannot use device_id = 1 , run_with_iobinding failed. #21092

Jay19751103 opened this issue Jun 19, 2024 · 3 comments
Labels
ep:DML issues related to the DirectML execution provider platform:windows issues related to the Windows platform

Comments

@Jay19751103
Copy link

Describe the issue

The system have two graphic cards (Hybrid Graphics,Tested on A+A and I+N)
Use the olive tag 6ebb02a969077d57f5bb14420d85fcff3fa537f4 to run llama_v2
Model is 7B , FP16 (size around 12G~13G)
command
python run_llama_v2_io_binding.py --prompt="Hi how are you" --max_seq_len=100 --device_id=0 => system can run
python run_llama_v2_io_binding.py --prompt="Hi how are you" --max_seq_len=100 --device_id=1 => system cannot run

image

To reproduce

Copy FP16 llama2 onnx model to olive and run following will unexpected exit.
python run_llama_v2_io_binding.py --prompt="Hi how are you" --max_seq_len=100 --device_id=1

If we change the iobinding from dml to cpu , it can run, the result is wrong.
If we make a test patch to force the device id to 1 in onnxruntime. it can pass and result is okay. (please check the attached patch file)
0002-test_dev_id1.patch

Urgency

It's Urgent. This is for multi-gpu support general case.

#13545 last comment looks similar issues

Platform

Windows

OS Version

Windows 11 Pro OS build 22631.3593

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

4573740

ONNX Runtime API

Python

Architecture

X64

Execution Provider

DirectML

Execution Provider Library Version

1.18.0

@github-actions github-actions bot added ep:DML issues related to the DirectML execution provider platform:windows issues related to the Windows platform labels Jun 19, 2024
@Jay19751103
Copy link
Author

Hello
Any body can help on this issue ?

@Jay19751103
Copy link
Author

Any one can help on this issue ?

@Jay19751103
Copy link
Author

Hi
Anyone have suggestion for the io binding issue ?
I cannot use different GPU device if the application is not bind with a specified GPU.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ep:DML issues related to the DirectML execution provider platform:windows issues related to the Windows platform
Projects
None yet
Development

No branches or pull requests

1 participant