Retire the Qwen AR pipeline
This commit is contained in:
1 parent
5773942c8f
commit
1de78fa3ef
22 files changed
+6429
-667
No files matched your search
@@ -14,7 +14,6 @@ use std::ops::Range;
|
||||
pub(super) struct CompilePolicy {
|
||||
explicit_off: bool,
|
||||
environment: bool,
|
||||
lane: bool,
|
||||
}
|
||||
|
||||
impl CompilePolicy {
|
||||
@@ -29,7 +28,6 @@ impl CompilePolicy {
|
||||
Self {
|
||||
explicit_off,
|
||||
environment: !explicit_off && [gdn, family].into_iter().flatten().any(truthy),
|
||||
lane: false,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +40,7 @@ impl CompilePolicy {
|
||||
}
|
||||
|
||||
fn enabled(self) -> bool {
|
||||
!self.explicit_off && (self.environment || self.lane)
|
||||
!self.explicit_off && self.environment
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,23 +303,6 @@ impl<'a> TextModel<'a> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub(super) fn set_ar_pipeline_mode(&mut self, enabled: bool) -> bool {
|
||||
let mut ready = true;
|
||||
for layer in &mut self.layers {
|
||||
let Some(ple) = &mut layer.ple else { continue };
|
||||
if enabled && ple.embedding.table.resident.is_none() {
|
||||
ready = false;
|
||||
continue;
|
||||
}
|
||||
ple.embedding.stage_disabled = enabled;
|
||||
ple.embedding.table.prefer_lazy = enabled;
|
||||
}
|
||||
if ready {
|
||||
self.policy.lane = enabled && !self.policy.explicit_off;
|
||||
}
|
||||
ready
|
||||
}
|
||||
|
||||
#[cfg_attr(not(test), expect(dead_code, reason = "Reference diagnostic API"))]
|
||||
pub(super) fn clear_verify_capture(cache: &mut [Option<Cache>]) {
|
||||
for cache in cache.iter_mut().flatten() {
|
||||
@@ -777,19 +758,16 @@ fn mtplx_model_compile_policy_and_run_boundaries() {
|
||||
assert!(CompilePolicy::from_values(Some(on), None).enabled());
|
||||
assert!(CompilePolicy::from_values(None, Some(on)).enabled());
|
||||
for off in ["0", "", "false", "off", "anything"] {
|
||||
for mut policy in [
|
||||
for policy in [
|
||||
CompilePolicy::from_values(Some(on), Some(off)),
|
||||
CompilePolicy::from_values(Some(off), Some(on)),
|
||||
] {
|
||||
policy.lane = true;
|
||||
assert!(!policy.enabled());
|
||||
}
|
||||
}
|
||||
}
|
||||
let mut automatic = CompilePolicy::from_values(None, None);
|
||||
let automatic = CompilePolicy::from_values(None, None);
|
||||
assert!(!automatic.enabled());
|
||||
automatic.lane = true;
|
||||
assert!(automatic.enabled());
|
||||
let environment = CompilePolicy::from_env();
|
||||
assert_eq!(
|
||||
environment.enabled(),
|
||||
|
||||
Reference in new issue
Block a user