Increase reserved memory fraction for indexes

This commit is contained in:
ixaxaar 2017-12-01 23:49:12 +05:30
parent 85c61682c8
commit 3ec9216f8d

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
from faiss import faiss
@ -19,7 +19,7 @@ class Index(object):
self.K = K
self.gpu_id = gpu_id
self.res = res if res else faiss.StandardGpuResources()
self.res.setTempMemoryFraction(0.001)
self.res.setTempMemoryFraction(0.01)
if self.gpu_id != -1:
self.res.initializeForDevice(self.gpu_id)