Repository navigation
fix(module): keep inputs on their device in a passthrough module without parameters - #43
Merged
lukaszstolarczuk merged 1 commit intoOct 28, 2026
Conversation
lslusarczyk
force-pushed
the
fix/passthrough-keeps-input-device
branch
from
October 28, 2026 09:10
f97f9e2 to
dd0ec15
Compare
…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
marked this pull request as ready for review
October 28, 2026 14:42
lslusarczyk
force-pushed
the
fix/passthrough-keeps-input-device
branch
from
October 28, 2026 14:42
dd0ec15 to
06b0891
Compare
lukaszstolarczuk
approved these changes
Oct 28, 2026
lukaszstolarczuk
enabled auto-merge (squash)
October 28, 2026 15:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.Flattenin ConvNeXt.