Skip to content

Commit 654777a

Browse files
ramilbakhshyievketor
authored andcommitted
Add midding hipStream SWIG typedef to fix ROCm memleak in Python (facebookresearch#3760)
Summary: Pull Request resolved: facebookresearch#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 fbshipit-source-id: cf73bbd7a7002565a4224c1f0af0aa6ea5edebdb
1 parent b16fe67 commit 654777a

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)