Skip to content

[Feature Request] Adapters DML support #23503

Open

Description

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 Dwayne Robinson (@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

ep:DMLissues related to the DirectML execution providerfeature requestrequest for unsupported feature or enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions