Files
zeekay 4a8deff2a0 feat: canonical hanzo-ml @ candle 0.10.2 + CUDA-13 fast-MMQ/MMVQ kernels
Rebased candle 0.10.2 (cudarc 0.19.4, hf-hub 0.5) + uplifted hanzo-kernels
(mmvq_gguf.cu, mmq_gguf/, 46 extern launchers); hanzo-engine links green on
GB10 sm_121 / CUDA 13. Preserves Vulkan/ROCm/hanzo-ug deltas.
2026-06-02 11:34:22 +00:00

21 lines
566 B
Rust

#[cfg(feature = "mkl")]
extern crate intel_mkl_src;
#[cfg(feature = "accelerate")]
extern crate accelerate_src;
use anyhow::Result;
use hanzo_ml::{Device, Tensor};
fn main() -> Result<()> {
let a = Tensor::new(&[[0.0f32, 1.0, 2.0], [3.0, 4.0, 5.0]], &Device::Cpu)?;
let b = Tensor::new(&[[88.0f32], [99.0]], &Device::Cpu)?;
let new_a = a.slice_scatter(&b, 1, 2)?;
assert_eq!(a.to_vec2::<f32>()?, [[0.0, 1.0, 2.0], [3.0, 4.0, 5.0]]);
assert_eq!(
new_a.to_vec2::<f32>()?,
[[0.0, 1.0, 88.0], [3.0, 4.0, 99.0]]
);
Ok(())
}