Skip to content

fix(module): keep inputs on their device in a passthrough module without parameters - #43

Merged
lukaszstolarczuk merged 1 commit into
intel:mainfrom
lslusarczyk:fix/passthrough-keeps-input-device
Oct 28, 2026
Merged

lukaszstolarczuk merged 1 commit into
intel:mainfrom
lslusarczyk:fix/passthrough-keeps-input-device

Conversation

@lslusarczyk

Copy link
Copy Markdown
Contributor

A passthrough module without parameters now leaves its inputs on their device.

A module without parameters had CPU as its device.
When such a module failed to tune, its passthrough moved every input to CPU.
The next module then got a CPU tensor while its weights were on XPU.

This broke deeper cuts, for example after nn.Flatten in ConvNeXt.

@lslusarczyk
lslusarczyk force-pushed the fix/passthrough-keeps-input-device branch from f97f9e2 to dd0ec15 Compare October 28, 2026 09:10
…out parameters

A module without parameters had CPU as its device.
When such a module failed to tune, its passthrough moved every input to CPU.
The next module then got a CPU tensor, for example after `nn.Flatten` in ConvNeXt.
A passthrough module without parameters now leaves its inputs where they are.
When a device is set, tensor inputs are moved with Locator.find_leaves.

Signed-off-by: Łukasz Ślusarczyk <lukasz.slusarczyk@intel.com>
@lslusarczyk
lslusarczyk marked this pull request as ready for review October 28, 2026 14:42
@lslusarczyk
lslusarczyk force-pushed the fix/passthrough-keeps-input-device branch from dd0ec15 to 06b0891 Compare October 28, 2026 14:42
@lslusarczyk
lslusarczyk requested a review from a team as a code owner October 28, 2026 14:42
@lukaszstolarczuk
lukaszstolarczuk enabled auto-merge (squash) October 28, 2026 15:32
@lukaszstolarczuk
lukaszstolarczuk merged commit 5b4c169 into intel:main Oct 28, 2026
8 of 9 checks passed
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.

2 participants