Skip to content
Merged
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
10 changes: 7 additions & 3 deletions mistralrs-core/src/paged_attention/cache_engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ use std::{
sync::{Arc, Mutex, MutexGuard},
};

use candle_core::{
from_storage_no_op, DType, Device, MetalStorage, Result, Shape, Storage, Tensor,
};
use candle_core::{DType, Device, Result, Tensor};
use mistralrs_paged_attn::{copy_blocks, swap_blocks};
use serde::{Deserialize, Serialize};

Expand Down Expand Up @@ -106,9 +104,12 @@ impl CacheEngine {
.take(model_config.num_layers())
.map(|x| x.as_ref().unwrap_or(device))
{
#[allow(unused)]
let key_blocks = if let Device::Metal(dev) = &device {
#[cfg(feature = "metal")]
{
use candle_core::{from_storage_no_op, MetalStorage, Shape, Storage};

let elem_count = cache_config.num_gpu_blocks
* key_block_shape.0
* key_block_shape.1
Expand Down Expand Up @@ -149,9 +150,12 @@ impl CacheEngine {
)?
}
};
#[allow(unused)]
let value_blocks = if let Device::Metal(dev) = &device {
#[cfg(feature = "metal")]
{
use candle_core::{from_storage_no_op, MetalStorage, Shape, Storage};

let elem_count = cache_config.num_gpu_blocks
* value_block_shape.0
* value_block_shape.1
Expand Down
3 changes: 1 addition & 2 deletions mistralrs-quant/src/gptq/gptq_cuda.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::{
cell::RefCell,
collections::HashMap,
sync::{atomic::AtomicUsize, Arc, Mutex},
sync::{atomic::AtomicUsize, Arc},
};

use candle_core::{
Expand All @@ -15,7 +15,6 @@ use candle_core::{
from_storage_no_op, Context, CudaStorage, DType, Device, Result, Shape, Storage, Tensor, D,
};
use half::f16;
use lazy_static::lazy_static;

use crate::{
gptq::marlin_backend::{marlin_matmul, marlin_weight_repack},
Expand Down
Loading