* Add cubecl quantization kernels and QTensorOps for burn-jit
* Fix typo
* Fix output vec factor
* Fix output dtype size_of
* Remove unused code in dequantize test
* Fix dequantize vectorization
* Handle tensors when number of elems is not a multiple of 4
* Support quantize for tensors with less than 4 elems (no vectorization)
* Fix equal 0 test
* Add quantize/dequantize tests
* Add q_to_device
* Refactor kernels for latest cubecl
* intermediate i32 cast
* Fix size_of output type
* Use strict=false to ignore floating point precision issues with qparams equality
* Only check that lhs & rhs strategies match (but not strict on qparams values)
* Use assert_approx_eq on dequant values
* Reduce precision for flaky test
* Remove todo comment
* Add comment for cast to unsigned
* More comment
---------
Co-authored-by: louisfd <louisfd94@gmail.com>
* working version
* cleanup
* wip
* working version of gather
* testsetsetser
* Revert "testsetsetser"
This reverts commit f37b329697.
* Reapply "testsetsetser"
This reverts commit f8ada0044e.
* Revert "testsetsetser"
This reverts commit f37b329697.
* Revert "working version of gather"
This reverts commit f5047c27c8.
* Revert "wip"
This reverts commit abaaa2dd55.
* Revert "Merge branch 'main' into index-cpa-to-cubecl"
This reverts commit 05bed8ea74, reversing
changes made to 94954fc32c.
* Revert "cleanup"
This reverts commit 94954fc32c.
* Revert "working version"
This reverts commit a06933f029.
* gather test
* fix
* fix clippy
* cleanup
* renaming repeat to repeat_dim
* implementing repeat function
* renaming repeat files to repeat_dim
* renaming part 2
* renaming part 3
* renaming part 4
* renaming part 5
* adding test file
* adding unit test
* adding rust book documentation
* adding function args doc
* fixing tests
* changing repeat api to match pytorch equivalent
* fixing clippy error
* Move QuantizationScheme to burn-tensor
* Refactor QuantizedTensorPrimitive to include the quantization strategy
* Fix QFloat tensor data display
* Refactor quantization methods to use scheme and qparams (on backend device)
* Fix clippy
* Fix fmt
* Add qtensor primitive tests
* Add QuantizationBackend, QTensorOps and QTensor
* Refactor QTensorOps as part of Backend trait
* Add tensor dequantize, QFloat dtype and default affine/symmetric quant
* Add ndarray default quantization implementation
* Fix clippy
* Add rayon parallel iter
* Add quantization operations to book
* Add q_shape and q_device ops to avoid converting the tensor just to get attributes
* Implement autodiff grad ops
* Mark autodiff todo for QAT
* Remove note
* Add q_inner and q_from_inner
* Implement 3D and transposed 3D convolutions.
* Merge changes from onnx-ir #1921 pr
---------
Co-authored-by: Dilshod Tadjibaev <939125+antimora@users.noreply.github.com>
* Move distribution to module
* Add new TensorData with serialization support
* Implement display and from for TensorData
* Add missing Cargo.lock
* Add missing bytemuck feature
* Add zeros, ones, full and random TensorData methods
* Refactor Data -> TensorData usage
* Fix tests
Since TensorData is not generic over the element type anymore no type inference can be done by the compiler. We must explicitly cast the expected results to the expected backend type.
* Remove commented line
* Fix import
* Add record-backward-compat
* Remove dim const generic from TensorData
* Support NestedValue de/serialization with TensorData
* Fix burn-jit tests
* Remove eprinln
* Refactor onnx import to use TensorData
* Fix tch from_data
* Fix nested value serialization for u8
* Fix missing import
* Fix reduce min onnx test
* Fix deprecated attribute
* Remove shape getter
* Remove strict assert in tests
* Add tensor data as_bytes
* Add tensor check for rank mismatch
* Fix typo (dimensions plural)
* Fix error message
* Update book examples with from_data and fix Display impl for TensorData
* Add deprecation note
* Element already implements One
* Add element module
* Add our own traits for Zero, One and ToPrimitive to support bool Element
* Fix typo
* Add basic tests for ToPrimitive with expected values
* The most important change of all
* Remove One + Zero identities
* Move zero/one outside mapv + refactor ToPrimitive -> ToElement trait
* Add num-traits to NOTICES.md