Skip to content

Conversation

@FanhaiLu1
Copy link
Collaborator

@FanhaiLu1 FanhaiLu1 commented Sep 19, 2024

Current Jax implementation is slow. The operation array is tiny, leverage NP compute in CPU can boost the performance.

The performance improved >30x. Below are two benchmark comparison before vs after this PR:

Before
Total: 16 ms, fill_new_page: 3ms, get_page_token_indices: 13ms

After
Total: 0.5 ms, to_nparray: 0.1 ms, fill_new_page: 0.01ms, get_page_token_indices: 0.05 ms to_jax_array:0.3 ms

@FanhaiLu1
Copy link
Collaborator Author

@qihqi @wang2yn84 Please take a look and review this PR.

@FanhaiLu1 FanhaiLu1 merged commit f1fa78c into AI-Hypercomputer:main Sep 24, 2024
5 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