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

about compute_location and locations #201

Open
adverbial03 opened this issue Apr 10, 2023 · 1 comment
Open

about compute_location and locations #201

adverbial03 opened this issue Apr 10, 2023 · 1 comment

Comments

@adverbial03
Copy link

Thanks for your excellent work of tutel.
I would like to know the function's function(at fast_dispatch.py

def compute_sorted_location(x, importance_scores):
    sorted_x = x[importance_scores.argsort(dim=0)]
    sorted_cumsum = fast_cumsum_sub_one(sorted_x) * sorted_x
    return sorted_cumsum[importance_scores.argsort(dim=0).argsort(dim=0)]

and the meaning of the parameters locations_s which is return value of the function extract_critical(at fast_dispatch.py too)

@ghostplant
Copy link
Contributor

ghostplant commented May 11, 2023

It stores a list of unique index destinations that input tokens are to be written on for the following dispatching.

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

No branches or pull requests

2 participants