Add note on handles/streams order

This commit is contained in:
Guillaume Lagrange 2024-09-24 15:53:47 -04:00
parent 93d137ddd9
commit 15f9d2642f
2 changed files with 2 additions and 1 deletions

View File

@ -211,7 +211,7 @@ where
core::mem::drop(server_other);
core::mem::drop(server_current);
// Expected order [qtensor, scale, <offset>]
// NOTE: the expected order is known [qtensor, scale, <offset>]
let offset = tensor.qparams.offset.map(|desc| {
FusionTensor::new(
ids.pop().unwrap(),

View File

@ -82,6 +82,7 @@ impl<R: JitRuntime, F: FloatElement, I: IntElement> ReprBackend for JitBackend<R
scheme: QuantizationScheme,
) -> burn_tensor::ops::QuantizedTensor<Self> {
match handles.len() {
// NOTE: the order of the handles is known [qtensor, scale, <offset>]
3 => {
let mut handles = handles;
let offset = handles.pop().unwrap();