Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
faiss
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
faiss
Commits
11143583
Commit
11143583
authored
Mar 03, 2017
by
matthijs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make GPU headers C++03 compatible
parent
db1ca184
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
12 deletions
+14
-12
INSTALL
INSTALL
+9
-8
Doxyfile
docs/Doxyfile
+2
-1
IndexProxy.h
gpu/IndexProxy.h
+1
-1
StandardGpuResources.h
gpu/StandardGpuResources.h
+2
-2
No files found.
INSTALL
View file @
11143583
...
@@ -177,7 +177,9 @@ requires:
...
@@ -177,7 +177,9 @@ requires:
See the example makefile on how to set the flags.
See the example makefile on how to set the flags.
The nvcc-specific flags to pass to the compiler:
The nvcc-specific flags to pass to the compiler, based on your desired
compute capability. Only compute capability 3.5+ is supported. For
example:
-gencode arch=compute_35,code="compute_35"
-gencode arch=compute_35,code="compute_35"
-gencode arch=compute_52,code="compute_52"
-gencode arch=compute_52,code="compute_52"
...
@@ -237,7 +239,7 @@ to enable and run it.
...
@@ -237,7 +239,7 @@ to enable and run it.
Hot to use Faiss in your own projects
Hot to use Faiss in your own projects
=====================================
=====================================
C++
C++
---
---
The makefile generates a static and a dynamic library
The makefile generates a static and a dynamic library
...
@@ -245,20 +247,19 @@ The makefile generates a static and a dynamic library
...
@@ -245,20 +247,19 @@ The makefile generates a static and a dynamic library
libfaiss.a
libfaiss.a
libfaiss.so (or libfaiss.dylib)
libfaiss.so (or libfaiss.dylib)
the executable should be linked to one of these. If you use
the executable should be linked to one of these. If you use
the static version (.a), add the LDFLAGS found in the Makefile.
the static version (.a), add the LDFLAGS found in the Makefile.
Python
Python
------
------
To import Faiss in your own Python project, you need the files
To import Faiss in your own Python project, you need the files
faiss.py
faiss.py
swigfaiss.py / swigfaiss_gpu.py
swigfaiss.py / swigfaiss_gpu.py
_swigfaiss.so / _swigfaiss_gpu.so
_swigfaiss.so / _swigfaiss_gpu.so
to be visible in the PYTHONPATH or in the current directory.
to be visible in the PYTHONPATH or in the current directory.
Then Faiss can be used in python with
Then Faiss can be used in python with
import faiss
import faiss
docs/Doxyfile
View file @
11143583
# Doxyfile 1.8.5
# Doxyfile 1.8.5
# This file describes the settings to be used by the documentation system
# This file describes the settings to be used by the documentation system
...
@@ -131,7 +132,7 @@ INLINE_INHERITED_MEMB = NO
...
@@ -131,7 +132,7 @@ INLINE_INHERITED_MEMB = NO
# shortest path that makes the file name unique will be used
# shortest path that makes the file name unique will be used
# The default value is: YES.
# The default value is: YES.
FULL_PATH_NAMES =
NO
FULL_PATH_NAMES =
YES
# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
# Stripping is only done if one of the specified strings matches the left-hand
# Stripping is only done if one of the specified strings matches the left-hand
...
...
gpu/IndexProxy.h
View file @
11143583
...
@@ -80,7 +80,7 @@ class IndexProxy : public faiss::Index {
...
@@ -80,7 +80,7 @@ class IndexProxy : public faiss::Index {
private
:
private
:
/// Collection of Index instances, with their managing worker thread
/// Collection of Index instances, with their managing worker thread
mutable
std
::
vector
<
std
::
pair
<
faiss
::
Index
*
,
mutable
std
::
vector
<
std
::
pair
<
faiss
::
Index
*
,
std
::
unique_ptr
<
WorkerThread
>
>
>
indices_
;
std
::
unique_ptr
<
WorkerThread
>
>
>
indices_
;
};
};
...
...
gpu/StandardGpuResources.h
View file @
11143583
...
@@ -64,7 +64,7 @@ class StandardGpuResources : public GpuResources {
...
@@ -64,7 +64,7 @@ class StandardGpuResources : public GpuResources {
std
::
unordered_map
<
int
,
cudaStream_t
>
defaultStreams_
;
std
::
unordered_map
<
int
,
cudaStream_t
>
defaultStreams_
;
/// Other streams we can use, per each device
/// Other streams we can use, per each device
std
::
unordered_map
<
int
,
std
::
vector
<
cudaStream_t
>>
alternateStreams_
;
std
::
unordered_map
<
int
,
std
::
vector
<
cudaStream_t
>
>
alternateStreams_
;
/// Async copy stream to use for GPU <-> CPU pinned memory copies
/// Async copy stream to use for GPU <-> CPU pinned memory copies
std
::
unordered_map
<
int
,
cudaStream_t
>
asyncCopyStreams_
;
std
::
unordered_map
<
int
,
cudaStream_t
>
asyncCopyStreams_
;
...
@@ -73,7 +73,7 @@ class StandardGpuResources : public GpuResources {
...
@@ -73,7 +73,7 @@ class StandardGpuResources : public GpuResources {
std
::
unordered_map
<
int
,
cublasHandle_t
>
blasHandles_
;
std
::
unordered_map
<
int
,
cublasHandle_t
>
blasHandles_
;
/// Temporary memory provider, per each device
/// Temporary memory provider, per each device
std
::
unordered_map
<
int
,
std
::
unique_ptr
<
StackDeviceMemory
>>
memory_
;
std
::
unordered_map
<
int
,
std
::
unique_ptr
<
StackDeviceMemory
>
>
memory_
;
/// Pinned memory allocation for use with this GPU
/// Pinned memory allocation for use with this GPU
void
*
pinnedMemAlloc_
;
void
*
pinnedMemAlloc_
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment