summaryrefslogtreecommitdiff
path: root/candle-core/tests/quantized_tests.rs
diff options
context:
space:
mode:
authorlaurent <laurent.mazare@gmail.com>2024-02-29 10:54:01 +0100
committerlaurent <laurent.mazare@gmail.com>2024-02-29 10:54:01 +0100
commit2c95b7394a30c11e6f3bb0c452d53e5ffef19737 (patch)
tree771b75eb970e8777f959199bac241f37efc723b7 /candle-core/tests/quantized_tests.rs
parent4fd00b890036ef67391a9cc03f896247d0a75711 (diff)
downloadcandle-2c95b7394a30c11e6f3bb0c452d53e5ffef19737.tar.gz
candle-2c95b7394a30c11e6f3bb0c452d53e5ffef19737.tar.bz2
candle-2c95b7394a30c11e6f3bb0c452d53e5ffef19737.zip
Handle Q5_0 and Q5_1 quants in cuda.
Diffstat (limited to 'candle-core/tests/quantized_tests.rs')
-rw-r--r--candle-core/tests/quantized_tests.rs8
1 files changed, 0 insertions, 8 deletions
diff --git a/candle-core/tests/quantized_tests.rs b/candle-core/tests/quantized_tests.rs
index 5f7e4825..d767531a 100644
--- a/candle-core/tests/quantized_tests.rs
+++ b/candle-core/tests/quantized_tests.rs
@@ -231,10 +231,6 @@ fn quantize_q4_1(device: &Device) -> Result<()> {
}
fn quantize_q5_0(device: &Device) -> Result<()> {
- // TODO Enable this later when we enable cuda.
- if device.is_cuda() {
- return Ok(());
- }
let src = (0..32 * 4).map(|v| v as f32).collect::<Vec<_>>();
let src = Tensor::from_slice(&src, (32 * 4,), device)?;
let quant = quantized::QTensor::quantize(&src, GgmlDType::Q5_0)?;
@@ -261,10 +257,6 @@ fn quantize_q5_0(device: &Device) -> Result<()> {
}
fn quantize_q5_1(device: &Device) -> Result<()> {
- // TODO Enable this later when we enable cuda.
- if device.is_cuda() {
- return Ok(());
- }
let src = (0..32 * 4).map(|v| v as f32).collect::<Vec<_>>();
let src = Tensor::from_slice(&src, (32 * 4,), device)?;
let quant = quantized::QTensor::quantize(&src, GgmlDType::Q5_1)?;