Implement the module trait directly for QMatMul. (#1372)

This commit is contained in:
Laurent Mazare
2023-11-25 10:09:45 +00:00
committed by GitHub
parent 762e996ce6
commit bfa7c8fc01
7 changed files with 11 additions and 18 deletions

View File

@ -123,12 +123,6 @@ pub trait Module {
fn forward(&self, xs: &Tensor) -> Result<Tensor>;
}
impl Module for quantized::QMatMul {
fn forward(&self, xs: &Tensor) -> Result<Tensor> {
self.forward(xs)
}
}
impl<T: Fn(&Tensor) -> Result<Tensor>> Module for T {
fn forward(&self, xs: &Tensor) -> Result<Tensor> {
self(xs)