Skip to content

Commit

Permalink
Fixed phi example
Browse files Browse the repository at this point in the history
  • Loading branch information
jafioti committed Jun 1, 2024
1 parent 2756c87 commit ad1a3d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/luminal_metal/src/quantized.rs
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ impl<T: MetalFloat + Default> Compiler for MetalQuantizedCompiler<T> {
} else if op_node.as_any().is::<super::matmul::Matmul<T>>() {
*op_node = Box::new(QuantizedMatmul::<T>::new(device.clone(), queue.clone()));
} else {
panic!("Quantized weight {target:?} is an input to a node that isn't a matmul or gather!");
panic!("Quantized weight {target:?} is an input to a node that isn't a matmul or gather ({op_node:?})!");
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion examples/phi/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ fn main() {
(
GenericCompiler::default(),
#[cfg(feature = "metal")]
luminal_metal::quantized::MetalQuantizedCompiler::<f32>::new(q_weights),
(
luminal_metal::MetalCompilerPreBuffer::<f32>::default(),
luminal_metal::quantized::MetalQuantizedCompiler::<f32>::new(q_weights),
luminal_metal::BufferCompilers::default(),
),
#[cfg(feature = "cuda")]
luminal_cuda::CudaQuantizedCompiler::<f32>::new(q_weights),
#[cfg(all(not(feature = "metal"), not(feature = "cuda")))]
Expand Down

0 comments on commit ad1a3d9

Please sign in to comment.