Skip to content

Make respiration differentiable/vectorized#74

Merged
SCiarella merged 5 commits intomainfrom
respiration
Feb 16, 2026
Merged

Make respiration differentiable/vectorized#74
SCiarella merged 5 commits intomainfrom
respiration

Conversation

@SCiarella
Copy link
Collaborator

Closes #43

@SCiarella SCiarella marked this pull request as ready for review January 15, 2026 13:26
@SarahAlidoost
Copy link
Collaborator

@SCiarella Let's wait for #75, @fnattino is implementing nice changes there. Then we can integrate those into this and next modules.

@SCiarella
Copy link
Collaborator Author

Let's also wait for #86 before integrating this

WSO = kk["WSO"]
# [!] DVS needs to be broadcasted explicetly because it is used
# in torch.where and the kiosk does not format it correctly
DVS = _broadcast_to(kk["DVS"], p.shape, self.dtype, self.device)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fnattino to avoid problems with the torch.where statement on L150, I need to explicitly broadcast this kiosk parameter here.

Do you think that is there a better way? maybe making the kiosk with templates like in #75?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. This is related to #22, accepting external dependencies through kiosk variable. Right now EngineTestHelper uses VariableKioskTestHelper from utils. For now, this solution is okay and we will fix this in another PR.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SCiarella @fnattino I added #22 as a task to the board, that one of us can work on it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, I think there is no way around here - we had to do the same in the partitioning module, where the same DVS variable has to be explicitely broadcasted to the parameters' shape.

@SCiarella
Copy link
Collaborator Author

@SarahAlidoost This PR is now ready for review.

Copy link
Collaborator

@SarahAlidoost SarahAlidoost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SCiarella Thanks, looks good 👍 , just a few comments/suggestions.

SCiarella and others added 2 commits February 16, 2026 15:23
Co-authored-by: SarahAlidoost <55081872+SarahAlidoost@users.noreply.github.com>
@SCiarella SCiarella merged commit c5318f7 into main Feb 16, 2026
10 checks passed
@SCiarella SCiarella deleted the respiration branch February 16, 2026 15:05
@sonarqubecloud
Copy link

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.

[Task]: Make Maintenance respiration differentiable and efficient

3 participants