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

Add profiling support for paged attn #585

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions mistralrs-core/src/pipeline/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ mod normal;
mod normal_loaders;
mod paths;
mod processing;
mod profile;
mod sampling;
mod speculative;
mod vision;
mod vision_loaders;

use crate::aici::toktree::TokTrie;
use crate::amoe::{
AnyMoeBaseModelMixin, AnyMoeConfig, AnyMoeExpertType, AnyMoeTrainingInputs,
Expand Down
9 changes: 9 additions & 0 deletions mistralrs-core/src/pipeline/profile.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
use crate::{PagedAttentionConfig, Pipeline};

pub fn profile(

Check failure on line 3 in mistralrs-core/src/pipeline/profile.rs

View workflow job for this annotation

GitHub Actions / Clippy

function `profile` is never used

Check warning on line 3 in mistralrs-core/src/pipeline/profile.rs

View workflow job for this annotation

GitHub Actions / Check (macOS-latest, stable)

function `profile` is never used

Check warning on line 3 in mistralrs-core/src/pipeline/profile.rs

View workflow job for this annotation

GitHub Actions / Check (ubuntu-latest, stable)

function `profile` is never used

Check warning on line 3 in mistralrs-core/src/pipeline/profile.rs

View workflow job for this annotation

GitHub Actions / Docs

function `profile` is never used

Check warning on line 3 in mistralrs-core/src/pipeline/profile.rs

View workflow job for this annotation

GitHub Actions / Test Suite (macOS-latest, stable)

function `profile` is never used

Check warning on line 3 in mistralrs-core/src/pipeline/profile.rs

View workflow job for this annotation

GitHub Actions / Check (windows-latest, stable)

function `profile` is never used

Check warning on line 3 in mistralrs-core/src/pipeline/profile.rs

View workflow job for this annotation

GitHub Actions / Test Suite (ubuntu-latest, stable)

function `profile` is never used
pipeline: &dyn Pipeline,

Check failure on line 4 in mistralrs-core/src/pipeline/profile.rs

View workflow job for this annotation

GitHub Actions / Clippy

unused variable: `pipeline`

Check warning on line 4 in mistralrs-core/src/pipeline/profile.rs

View workflow job for this annotation

GitHub Actions / Check (macOS-latest, stable)

unused variable: `pipeline`

Check warning on line 4 in mistralrs-core/src/pipeline/profile.rs

View workflow job for this annotation

GitHub Actions / Check (ubuntu-latest, stable)

unused variable: `pipeline`

Check warning on line 4 in mistralrs-core/src/pipeline/profile.rs

View workflow job for this annotation

GitHub Actions / Docs

unused variable: `pipeline`

Check warning on line 4 in mistralrs-core/src/pipeline/profile.rs

View workflow job for this annotation

GitHub Actions / Test Suite (macOS-latest, stable)

unused variable: `pipeline`

Check warning on line 4 in mistralrs-core/src/pipeline/profile.rs

View workflow job for this annotation

GitHub Actions / Check (windows-latest, stable)

unused variable: `pipeline`

Check warning on line 4 in mistralrs-core/src/pipeline/profile.rs

View workflow job for this annotation

GitHub Actions / Test Suite (ubuntu-latest, stable)

unused variable: `pipeline`
block_size: Option<usize>,

Check failure on line 5 in mistralrs-core/src/pipeline/profile.rs

View workflow job for this annotation

GitHub Actions / Clippy

unused variable: `block_size`

Check warning on line 5 in mistralrs-core/src/pipeline/profile.rs

View workflow job for this annotation

GitHub Actions / Check (macOS-latest, stable)

unused variable: `block_size`

Check warning on line 5 in mistralrs-core/src/pipeline/profile.rs

View workflow job for this annotation

GitHub Actions / Check (ubuntu-latest, stable)

unused variable: `block_size`

Check warning on line 5 in mistralrs-core/src/pipeline/profile.rs

View workflow job for this annotation

GitHub Actions / Docs

unused variable: `block_size`

Check warning on line 5 in mistralrs-core/src/pipeline/profile.rs

View workflow job for this annotation

GitHub Actions / Test Suite (macOS-latest, stable)

unused variable: `block_size`

Check warning on line 5 in mistralrs-core/src/pipeline/profile.rs

View workflow job for this annotation

GitHub Actions / Check (windows-latest, stable)

unused variable: `block_size`

Check warning on line 5 in mistralrs-core/src/pipeline/profile.rs

View workflow job for this annotation

GitHub Actions / Test Suite (ubuntu-latest, stable)

unused variable: `block_size`
max_num_batched_tokens: Option<usize>,

Check failure on line 6 in mistralrs-core/src/pipeline/profile.rs

View workflow job for this annotation

GitHub Actions / Clippy

unused variable: `max_num_batched_tokens`

Check warning on line 6 in mistralrs-core/src/pipeline/profile.rs

View workflow job for this annotation

GitHub Actions / Check (macOS-latest, stable)

unused variable: `max_num_batched_tokens`

Check warning on line 6 in mistralrs-core/src/pipeline/profile.rs

View workflow job for this annotation

GitHub Actions / Check (ubuntu-latest, stable)

unused variable: `max_num_batched_tokens`

Check warning on line 6 in mistralrs-core/src/pipeline/profile.rs

View workflow job for this annotation

GitHub Actions / Docs

unused variable: `max_num_batched_tokens`

Check warning on line 6 in mistralrs-core/src/pipeline/profile.rs

View workflow job for this annotation

GitHub Actions / Test Suite (macOS-latest, stable)

unused variable: `max_num_batched_tokens`

Check warning on line 6 in mistralrs-core/src/pipeline/profile.rs

View workflow job for this annotation

GitHub Actions / Check (windows-latest, stable)

unused variable: `max_num_batched_tokens`

Check warning on line 6 in mistralrs-core/src/pipeline/profile.rs

View workflow job for this annotation

GitHub Actions / Test Suite (ubuntu-latest, stable)

unused variable: `max_num_batched_tokens`
) -> PagedAttentionConfig {
todo!()
}
Loading