-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: [GoSDK] fp32 <-> fp16/bf16 vector conversion #37978
feat: [GoSDK] fp32 <-> fp16/bf16 vector conversion #37978
Conversation
285580e
to
63e028c
Compare
@jiangyinzuo go-sdk check failed, comment |
@jiangyinzuo E2e jenkins job failed, comment |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #37978 +/- ##
===========================================
+ Coverage 68.87% 81.06% +12.19%
===========================================
Files 289 1360 +1071
Lines 25484 190879 +165395
===========================================
+ Hits 17551 154734 +137183
- Misses 7933 30648 +22715
- Partials 0 5497 +5497
|
63e028c
to
2d1f984
Compare
@jiangyinzuo go-sdk check failed, comment |
@jiangyinzuo E2e jenkins job failed, comment |
2d1f984
to
2d280cf
Compare
@jiangyinzuo go-sdk check failed, comment |
2d280cf
to
f213224
Compare
@jiangyinzuo go-sdk check failed, comment |
f213224
to
14fb31b
Compare
@jiangyinzuo go-sdk check failed, comment |
14fb31b
to
703423a
Compare
@jiangyinzuo go-sdk check failed, comment |
703423a
to
9a3e2f5
Compare
@jiangyinzuo go-sdk check failed, comment |
9a3e2f5
to
13d883c
Compare
@jiangyinzuo go-sdk check failed, comment |
6fcba1a
to
bfe98b9
Compare
bf67626
to
4ac02d0
Compare
@jiangyinzuo E2e jenkins job failed, comment |
/run-cpu-e2e |
4ac02d0
to
1ddb04d
Compare
@jiangyinzuo go-sdk check failed, comment |
rerun go-sdk |
@jiangyinzuo E2e jenkins job failed, comment |
/run-cpu-e2e |
@jiangyinzuo E2e jenkins job failed, comment |
1ddb04d
to
e90721b
Compare
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: milvus-io#37448 Signed-off-by: Yinzuo Jiang <[email protected]> Signed-off-by: Yinzuo Jiang <[email protected]>
@jiangyinzuo E2e jenkins job failed, comment |
/run-cpu-e2e |
@jiangyinzuo E2e jenkins job failed, comment |
/run-cpu-e2e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: congqixia, jiangyinzuo The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Previous PR: milvus-io#37978 This unit test is unable due to dim is a random number. When dim is large enough precision loss will be greater than 0.04 Signed-off-by: Congqi Xia <[email protected]>
) Previous PR: #37978 This unit test is unable due to dim is a random number. When dim is large enough precision loss will be greater than 0.04 Signed-off-by: Congqi Xia <[email protected]>
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
entity.FloatVector
infunc (c *ColumnFloat16Vector) AppendValue(i interface{}) error
func (c *ColumnFloat16Vector) AppendValue(i interface{}) error
issue: #37448