-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: [GoSDK] fp32 <-> fp16/bf16 vector conversion
Add the following methods for convenient fp32 vector <-> fp16/bf16 vector conversion fp32 <-> fp16/bf16 vector conversion: - `func (fv FloatVector) ToFloat16Vector() Float16Vector` - `func (fv FloatVector) ToBFloat16Vector() BFloat16Vector` - `func (fv Float16Vector) ToFloat32Vector() FloatVector` - `func (fv BFloat16Vector) ToFloat32Vector() FloatVector` `columnBasedDataOption`: - `func (opt *columnBasedDataOption) WithFloat16VectorColumn(colName string, dim int, data [][]float32) *columnBasedDataOption` - `func (opt *columnBasedDataOption) WithBFloat16VectorColumn(colName string, dim int, data [][]float32) *columnBasedDataOption` `ColumnFloat16Vector`/`ColumnBFloat16Vector`: - `func NewColumnFloat16VectorFromFp32Vector(fieldName string, dim int, data [][]float32) *ColumnFloat16Vector` - `func NewColumnBFloat16VectorFromFp32Vector(fieldName string, dim int, data [][]float32) *ColumnBFloat16Vector` - support []float32 or `entity.FloatVector` in - `func (c *ColumnFloat16Vector) AppendValue(i interface{}) error` - `func (c *ColumnFloat16Vector) AppendValue(i interface{}) error` issue: #37448 Signed-off-by: Yinzuo Jiang <[email protected]> Signed-off-by: Yinzuo Jiang <[email protected]>
- Loading branch information
1 parent
864ed1a
commit 4ac02d0
Showing
17 changed files
with
406 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.