You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: get tensors by const ref to not rely on deleted move constructor for TensorView (flashinfer-ai#2602)
<!-- .github/pull_request_template.md -->
## 📌 Description
Getting a `Tensor` our of an `Array` as a `TensorView` attempts to call
the deleted move-constructor `TensorView(Tensor&&)`. We can instead get
a const ref to the tensors out of the array.
Error messages before these changes:
```
/workspace/flashinfer/csrc/fused_moe/cutlass_backend/flashinfer_cutlass_fused_moe_binding.cu(980): error: function "tvm::ffi::TensorView::TensorView(tvm::ffi::Tensor &&)" (declared at line 717 of /workspace/venv/lib/python3.12/site-packages/tvm_ffi/include/tvm/ffi/container/tensor.h) cannot be referenced -- it is a deleted function
TensorView fc1_global = quant_scales.value()[1];
^
```
No errors after the fix.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Refactor**
* Internal optimization to quantization handling in the fused mixture of
experts module for improved code efficiency.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
0 commit comments