diff --git a/candle-core/tests/quantized_tests.rs b/candle-core/tests/quantized_tests.rs index 8b4ddcd9..2c05abb4 100644 --- a/candle-core/tests/quantized_tests.rs +++ b/candle-core/tests/quantized_tests.rs @@ -29,5 +29,18 @@ fn quantized_matmul() -> Result<()> { [343392.0, 996704.0, 1650016.0, 2303328.0] ] ); + + let qtensor = quantized::QTensor::new(rhs_t, (64, 4)); + let op = quantized::QMatMul::new(std::sync::Arc::new(qtensor)); + let res = tensor_lhs.custom_op1(op)?; + assert_eq!( + res.to_vec2::()?, + &[ + [85120.43, 214561.61, 345454.9, 474748.1], + [213474.94, 604465.25, 1000686.4, 1388317.3], + [341875.88, 994283.0, 1655708.8, 2301518.3] + ] + ); + Ok(()) }