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

[Feature Request] Adapters DML support #23503

Open
ambroser53 opened this issue Jan 27, 2025 · 0 comments
Open

[Feature Request] Adapters DML support #23503

ambroser53 opened this issue Jan 27, 2025 · 0 comments
Labels
ep:DML issues related to the DirectML execution provider feature request request for unsupported feature or enhancement

Comments

@ambroser53
Copy link

Describe the feature request

I've made issues on olive and genai but having looked into it more deeply I think this issue belongs here. There seems to have been this PR attempt to give adapter support to DML which was then reverted in this PR. I have tried this solution (built from source) but I get the following error when calling LoadAdapter with a valid .onnx_adapter path (generated with olive):
System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'
This has been replaced with the following (confusing) error message instead which is what you get when using more recent builds:
Data transfer is not available for the specified device allocator, it also must not be a CPU allocator
Is this to do with DataTransfer being broken in DML? Because this branch worked on fixes for that that were never incorporated, or did they never work to begin with?

I can see that this issue regarding 0 dim tensors being unsupported by DML, this has been fixed in CUDA with this PR but no fix was given to DML. I mention because the 0 dim system is how adapters are currently implemented and:

Yeah, that's illegal from the DirectML API validator point of view, multiplying nothing times nothing and expecting something 😉.
Originally posted by @fdwr in #21483

If this is the source of the issue, is it not possible to have an alternative where the specific dim is defined (i.e. a set LoRA rank) which all adapters use? This gives means you can't use LoRA adapters of different sizes with one model but honestly that's not really much of an issue in comparison to just not being able to use the Adapters API with DML at all.

Is there any update on whether Adapters support in DML is a priority or when we might see it? I think it's misleading that ORT has these post about multilora support, DML for edge deployment and olive DML support but don't have it specified anywhere that LoRA with DML doesn't work at all.

Describe scenario use case

Multi-LoRA serving on edge hardware with DirectML Execution Provider.

@ambroser53 ambroser53 added the feature request request for unsupported feature or enhancement label Jan 27, 2025
@github-actions github-actions bot added the ep:DML issues related to the DirectML execution provider label Jan 27, 2025
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 feature request request for unsupported feature or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant