Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fast vector operation for pillar scatter #1676

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dmund95
Copy link

@dmund95 dmund95 commented Oct 29, 2024

This PR introduces fast vector operations for pillar scatter module. The for loop in exisiting module make model forward very slow. Especially with larger batch sizes.

The code has been tested to check for equal outputs before and after the changes and included in this PR

latency experiments:

  1. forward times as a function of batch_size

image

  1. Overall training time before and after the change

Before -> Average per iteration training time ~2.9sec

image

After -> Average per iteration training time ~1.9sec

image

The training time per iteration reduces by 35% with this PR (for my set of parameters / dataset)

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