mirror of
https://github.com/huggingface/candle.git
synced 2025-06-19 03:54:56 +00:00
Implement the module trait directly for QMatMul. (#1372)
This commit is contained in:
@ -307,8 +307,8 @@ impl crate::CustomOp1 for QTensor {
|
||||
}
|
||||
}
|
||||
|
||||
impl QMatMul {
|
||||
pub fn forward(&self, xs: &Tensor) -> Result<Tensor> {
|
||||
impl crate::Module for QMatMul {
|
||||
fn forward(&self, xs: &Tensor) -> Result<Tensor> {
|
||||
match self {
|
||||
Self::QTensor(t) => xs.apply_op1_no_bwd(t.as_ref()),
|
||||
Self::Tensor(w) => {
|
||||
|
Reference in New Issue
Block a user