Skip to content

Commit

Permalink
Add DeviceMapper
Browse files Browse the repository at this point in the history
  • Loading branch information
cdoko authored Dec 31, 2024
1 parent e0719f9 commit cffeaaa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mistralrs-core/src/pipeline/amoe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ use tracing::{info, warn};

use crate::{
amoe::{AnyMoeConfig, AnyMoeTrainingInputRow, AnyMoeTrainingInputs, AnyMoeTrainingResult},
device_map::DeviceMapper,
get_mut_arcmutex,
prefix_cacher_v2::PrefixCacheManagerV2,
sampler::Sampler,
Expand Down Expand Up @@ -244,6 +245,9 @@ impl MetadataMixin for AnyMoePipeline {
fn tokenizer(&self) -> Option<Arc<tokenizers::Tokenizer>> {
get_mut_arcmutex!(self.target).tokenizer()
}
fn device_mapper(&self) -> Option<&dyn DeviceMapper> {

Check failure on line 248 in mistralrs-core/src/pipeline/amoe.rs

View workflow job for this annotation

GitHub Actions / Check (macOS-latest, stable)

method `device_mapper` is not a member of trait `MetadataMixin`

Check failure on line 248 in mistralrs-core/src/pipeline/amoe.rs

View workflow job for this annotation

GitHub Actions / Check (ubuntu-latest, stable)

method `device_mapper` is not a member of trait `MetadataMixin`

Check failure on line 248 in mistralrs-core/src/pipeline/amoe.rs

View workflow job for this annotation

GitHub Actions / Clippy

method `device_mapper` is not a member of trait `MetadataMixin`

Check failure on line 248 in mistralrs-core/src/pipeline/amoe.rs

View workflow job for this annotation

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

method `device_mapper` is not a member of trait `MetadataMixin`

Check failure on line 248 in mistralrs-core/src/pipeline/amoe.rs

View workflow job for this annotation

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

method `device_mapper` is not a member of trait `MetadataMixin`

Check failure on line 248 in mistralrs-core/src/pipeline/amoe.rs

View workflow job for this annotation

GitHub Actions / Docs

method `device_mapper` is not a member of trait `MetadataMixin`
None
}
}

#[async_trait::async_trait]
Expand Down Expand Up @@ -469,6 +473,7 @@ impl AnyMoePipelineMixin for AnyMoePipeline {
input_processor_cfg.clone(),
None, // TODO: get block tables/handle it for PagedAttention
None, // TODO: prompt chunking doesn't work.
None,
)
.nth(0)
.unwrap();
Expand Down

0 comments on commit cffeaaa

Please sign in to comment.