Skip to content

Commit 58465b5

Browse files
Add midding hipStream SWIG typedef to fix ROCm memleak in Python (#3760)
Summary: Pull Request resolved: #3760 This fixes the memleak and the warning received after running Python tests under ROCm since no destructor was declared and objects would remain allocated. Reviewed By: gtwang01 Differential Revision: D61357579
1 parent afe9c40 commit 58465b5

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)