From e3378dec252d62265e328d36debb8a97d4a56bfd Mon Sep 17 00:00:00 2001 From: Gautham Krithiwas Date: Mon, 13 Apr 2026 19:50:30 +0530 Subject: [PATCH 1/2] MB-71383: Define logging functions for GPU --- vector.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/vector.go b/vector.go index 7a873e7..b21cacd 100644 --- a/vector.go +++ b/vector.go @@ -95,3 +95,15 @@ const TrainingKey = "_training" const TrainedIndexCallback = "_trained_index_callback" type TrainedIndexCallbackFn func(string) (interface{}, error) + +// GPU vector search error callbacks + +// Called when an index move from CPU to GPU fails +const GPUToCPUCloneErrorKey = "_gpu_to_cpu_clone_error_key" + +type GPUToCPUCloneErrorCallback func(err error) + +// Called when a generic error occurs on the GPU +const GPUErrorKey = "_gpu_error_key" + +type GPUErrorCallback func(err error) From b05ed209441ff059af0313f7713449b10aee4e1d Mon Sep 17 00:00:00 2001 From: Gautham Krithiwas Date: Tue, 14 Apr 2026 11:12:56 +0530 Subject: [PATCH 2/2] fix naming --- vector.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vector.go b/vector.go index b21cacd..282413b 100644 --- a/vector.go +++ b/vector.go @@ -98,12 +98,12 @@ type TrainedIndexCallbackFn func(string) (interface{}, error) // GPU vector search error callbacks -// Called when an index move from CPU to GPU fails -const GPUToCPUCloneErrorKey = "_gpu_to_cpu_clone_error_key" +// Called when an index move from CPU to CPU fails +const CPUToGPUCloneErrorKey = "_cpu_to_gpu_clone_error" -type GPUToCPUCloneErrorCallback func(err error) +type CPUToGPUCloneErrorCallback func(err error) // Called when a generic error occurs on the GPU -const GPUErrorKey = "_gpu_error_key" +const GPUErrorKey = "_gpu_error" type GPUErrorCallback func(err error)