milvus/tests/go_client
Yinzuo Jiang 1ce609834a
feat: [GoSDK] fp32 <-> fp16/bf16 vector conversion (#37978)
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 <yinzuo.jiang@zilliz.com>
Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
2024-11-29 08:00:37 +08:00
..
base test: add cases for gosdk v2 load release (#37831) 2024-11-22 10:54:32 +08:00
common enhance: [GoSDK] move client pkg go files to sub one (#37492) 2024-11-08 07:32:26 +08:00
ruleguard enhance: Add rules and fix for go_client e2e code style (#34033) 2024-06-21 10:32:02 +08:00
testcases feat: [GoSDK] fp32 <-> fp16/bf16 vector conversion (#37978) 2024-11-29 08:00:37 +08:00
.golangci.yml enhance: [GoSDK] Sync latest milvus proto and mockery (#35511) 2024-08-19 16:22:55 +08:00
Dockerfile enhance: [skip e2e]dockerfile for milvus-sdk-go test (#35426) 2024-08-20 09:48:55 +08:00
README.md Replace sdk source and merge tests and tests20 (#7182) 2021-08-20 11:00:56 +08:00
go.mod feat: [GoSDK] fp32 <-> fp16/bf16 vector conversion (#37978) 2024-11-29 08:00:37 +08:00
go.sum feat: [GoSDK] fp32 <-> fp16/bf16 vector conversion (#37978) 2024-11-29 08:00:37 +08:00

README.md

go_client