milvus/tests/go_client/testcases
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
..
helper feat: [GoSDK] fp32 <-> fp16/bf16 vector conversion (#37978) 2024-11-29 08:00:37 +08:00
client_test.go enhance: [GoSDK] move client pkg go files to sub one (#37492) 2024-11-08 07:32:26 +08:00
collection_test.go fix: some error in restful (#37487) 2024-11-13 17:12:39 +08:00
database_test.go enhance: [GoSDK] move client pkg go files to sub one (#37492) 2024-11-08 07:32:26 +08:00
delete_test.go enhance: [GoSDK] move client pkg go files to sub one (#37492) 2024-11-08 07:32:26 +08:00
index_test.go enhance: [GoSDK] move client pkg go files to sub one (#37492) 2024-11-08 07:32:26 +08:00
insert_test.go feat: [GoSDK] fp32 <-> fp16/bf16 vector conversion (#37978) 2024-11-29 08:00:37 +08:00
load_release_test.go test: add cases for gosdk v2 partial load (#37924) 2024-11-26 15:08:34 +08:00
main_test.go enhance: [GoSDK] move client pkg go files to sub one (#37492) 2024-11-08 07:32:26 +08:00
partition_test.go enhance: [GoSDK] move client pkg go files to sub one (#37492) 2024-11-08 07:32:26 +08:00
query_test.go enhance: [GoSDK] move client pkg go files to sub one (#37492) 2024-11-08 07:32:26 +08:00
search_test.go feat: [GoSDK] fp32 <-> fp16/bf16 vector conversion (#37978) 2024-11-29 08:00:37 +08:00
upsert_test.go feat: [GoSDK] fp32 <-> fp16/bf16 vector conversion (#37978) 2024-11-29 08:00:37 +08:00