Skip to content

Commit f3b3d55

Browse files
Add midding hipStream SWIG typedef to fix ROCm memleak in Python
Summary: This fixes the memleak and the warning received after running Python tests under ROCm since no destructor was declared and objects would remain allocated. Differential Revision: D61357579
1 parent afe9c40 commit f3b3d55

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

faiss/python/swigfaiss.swig

+2
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,8 @@ void gpu_sync_all_devices()
352352
%include <faiss/gpu-rocm/GpuResources.h>
353353
%include <faiss/gpu-rocm/StandardGpuResources.h>
354354

355+
typedef ihipStream_t* hipStream_t;
356+
355357
%inline %{
356358

357359
// interop between pytorch exposed hipStream_t and faiss

0 commit comments

Comments
 (0)