Skip to content

[Torch] Lora kernels compilation#4100

Draft
daniil-lyakhov wants to merge 2 commits into
openvinotoolkit:developfrom
daniil-lyakhov:dl/lora_compile
Draft

[Torch] Lora kernels compilation#4100
daniil-lyakhov wants to merge 2 commits into
openvinotoolkit:developfrom
daniil-lyakhov:dl/lora_compile

Conversation

@daniil-lyakhov

@daniil-lyakhov daniil-lyakhov commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Changes

  • asymmetric_quantize_lora and symmetric_quantize_lora are wrapped by the CompilationWrapper
  • ReferenceQuantize is updated to be torch.compile friendly: previous code was making graph brakes in the compiled graph
  • CompilationWrapper is updated to skip compilation for nested compiled functions as it is not supported by the PyTorch

Reason for changes

Before:
image
After:
image

Aprox ~25% speed up
With unlimited cache
(torch._dynamo.config.cache_size_limit = 100
torch._dynamo.config.accumulated_cache_size_limit = 100):
image

HW:
Intel(R) Core(TM) i9-10980XE CPU @ 3.00GHz
3x RTX 3090

Related tickets

Tests

Weight compression - success

Test examples - success

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant