Skip to content

Commit

Permalink
Fix compilation when opencl feature is being used.
Browse files Browse the repository at this point in the history
  • Loading branch information
Noeda committed Mar 21, 2023
1 parent d85ed7f commit 5e24172
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tensor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2019,7 +2019,7 @@ impl Tensor {
if data.is_null() {
panic!("to_cpu_inplace: Failed to allocate tensor");
}
TENSORS_BYTES_ALLOCATED.fetch_add(layout.size(), std::sync::atomic::Ordering::Relaxed);
TENSORS_BYTES_ALLOCATED.fetch_add(self.layout.size(), std::sync::atomic::Ordering::Relaxed);
let ev = od.as_mut().unwrap().data_u16_from_gpu(data as *mut u16)?;
self.data = data as *mut u16 as *mut u8;
self.waiting_for_data = Some(ev);
Expand Down

0 comments on commit 5e24172

Please sign in to comment.