Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
861d194
For #669. Adding install target to gpu Makefile
cjnolet Jan 8, 2019
60d654f
Starting integration of raft
cjnolet Jun 3, 2022
d474bf3
Adding proper inherited member definitions
cjnolet Jun 3, 2022
8baee52
Updating raft ivf flat
cjnolet Jun 3, 2022
2eb94f1
adding raftIVFFlat implementation
cjnolet Jun 14, 2022
f7d4185
Isolating quantizer training
cjnolet Jun 14, 2022
26491cb
iAdding todos where we need to plug in raft functionality
cjnolet Jun 14, 2022
b4d08c4
Invocatino of index building has been compiled successfully. Still ne…
cjnolet Jun 17, 2022
bf876f9
Adding call to search.
cjnolet Jun 17, 2022
9b1fc84
Adding stubs for remaining calls that need to be made from RAFT side in
cjnolet Jul 1, 2022
884bfa5
iUpdating function calls for copyFrom to include populating the quant…
cjnolet Jul 1, 2022
0958d2e
Implement some helpers
achirkin Jul 4, 2022
b7144a9
Make it compile
achirkin Jul 5, 2022
38733bb
Make the tests to not crash... sometimes
achirkin Jul 6, 2022
881fbc3
Merge pull request #1 from achirkin/raft_ivf_flat
cjnolet Jul 28, 2022
173c459
Updates
cjnolet Aug 2, 2022
8b7afe0
Merge branch 'raft_ivf_flat' of github.com:cjnolet/faiss into raft_iv…
cjnolet Aug 2, 2022
548e0f0
More updates
cjnolet Aug 2, 2022
baa34d7
One test running so far.
cjnolet Aug 3, 2022
edc5991
Setting add_data_on_build = false;
cjnolet Aug 3, 2022
10f89b4
Copying centroids directly and adding some prints for the test outputs
cjnolet Aug 8, 2022
7c69020
reconstructions seems to be reasonable
cjnolet Aug 8, 2022
8be7746
iUpdates to tests to compare against brute force as ground truth
cjnolet Aug 9, 2022
933582a
Starting to look at resulting runtimes in raft ivf flat tests
cjnolet Aug 24, 2022
d2a6541
Adding timing info to raft test
cjnolet Aug 24, 2022
986407a
Updating for rapids-cmake updates and RAFT updates
cjnolet Aug 25, 2022
ae4ed98
Adding RaftIndexIVFPQ
cjnolet Oct 10, 2022
d8894b8
Merge branch 'main' into raft_integration
cjnolet Oct 10, 2022
410b2c6
Updates
cjnolet Oct 10, 2022
d7ca6b4
Adding FAISS_ENABLE_RAFT option to INSTALL.md
cjnolet Oct 10, 2022
9875dad
Making build.sh work for quick building of proposal
cjnolet Oct 10, 2022
60388dc
Merge branch 'main' into raft_integration
cjnolet Oct 11, 2022
c09d09b
Merging upstream
cjnolet Oct 11, 2022
0081ed9
Integrating more deeply with `use_raft` option in the index config that
cjnolet Oct 19, 2022
a7e0cdd
IVF Flat
cjnolet Oct 19, 2022
fbf7e34
More updates
cjnolet Oct 19, 2022
a9b6963
Getting things building again. Adding raft handle to gpu resources.
cjnolet Oct 20, 2022
b640ba8
Getting FAISS building again w/ RaftIVFFlat
cjnolet Oct 26, 2022
af6d1e9
Adding the append vectors to raft index IVF flat.
cjnolet Oct 26, 2022
545b3d2
Add ing flatindex for the fused l2 knn
cjnolet Oct 27, 2022
2ac5a5b
Validating dispatch of flatindex
cjnolet Oct 28, 2022
68944a5
1. Verified FlatIndex tests are passing (and using RAFT for k<=64 L2 …
cjnolet Nov 15, 2022
3a37031
Calling train() on copyFrom() with reconstructed vectors and filling in
cjnolet Nov 15, 2022
3f51425
IVFFlat gtests run through to completion without crash. Distances look
cjnolet Nov 15, 2022
db1801e
Some of the IVFFlat tests are passing.
cjnolet Nov 15, 2022
f0bbd41
CLeaning up the diff a bit
cjnolet Nov 16, 2022
f7da008
Removing the RaftIndex* files.
cjnolet Nov 16, 2022
5ab762b
Using current raft 22.12
cjnolet Nov 17, 2022
3684cd3
Checking in a little cleanup
cjnolet Nov 30, 2022
35a46b2
Disabling raft from pulling in nn dependencies (e.g. faiss)
cjnolet Jan 9, 2023
eb9f6e9
Merge branch 'main' into raft_integration
cjnolet Jan 9, 2023
e7bf2e5
Updating raft for 23.02. Still working on failing tests.
cjnolet Jan 11, 2023
a8e2ad0
Isolating differences in results- it looks like it's related to the s…
cjnolet Jan 12, 2023
f19fd00
Add and query results appear to match well. LargeBatch tests are fail…
cjnolet Jan 19, 2023
3ff97ab
Merge branch 'main' into raft_integration
cjnolet Jan 20, 2023
1d2baed
Merge branch 'main' into raft_integration
cjnolet Jan 24, 2023
6269ed1
Using facebook for licenses in cmake files
cjnolet Jan 24, 2023
b13593a
Adding small note to build.sh that the file is temporary.
cjnolet Jan 24, 2023
81fbe64
Merge branch 'main' into raft_integration
cjnolet Jan 27, 2023
333761c
Merge branch 'main' into raft_integration
cjnolet Jan 31, 2023
bc8885d
Fixing style
cjnolet Jan 31, 2023
093579b
Merge branch 'master' into raft_integration
cjnolet Jan 31, 2023
10f8080
Merge branch 'raft_integration' of github.com:cjnolet/faiss into raft…
cjnolet Jan 31, 2023
19f38d4
Second pass of fixing formatting
cjnolet Jan 31, 2023
17df798
Third pass at fixing format style
cjnolet Jan 31, 2023
2993441
Adding nvidia license for traceability
cjnolet Jan 31, 2023
5e7eb6d
Updates
cjnolet Feb 6, 2023
d1b0036
Merge remote-tracking branch 'faiss/main' into raft_integration
cjnolet Feb 6, 2023
ddc75ac
Merging
cjnolet Feb 7, 2023
4ada77c
Merge branch 'main' into raft_integration
cjnolet Feb 7, 2023
ccc3bad
Merge branch 'main' into raft_integration
cjnolet Feb 13, 2023
37ec2fa
Fix PR problems (#2839)
May 4, 2023
c07208e
Merge remote-tracking branch 'faiss/main' into raft_integration
cjnolet May 4, 2023
d3a98cc
Fixing cmakelists
cjnolet May 4, 2023
d91de3c
Merge remote-tracking branch 'alexanderguzhva/export-D45054275' into …
cjnolet May 4, 2023
0af95a4
Updates
cjnolet May 4, 2023
36bed23
Merge branch 'main' into raft_integration
cjnolet Jun 5, 2023
fc7f1f8
Merge branch 'main' of https://github.com/facebookresearch/faiss into…
tarang-jain Jun 27, 2023
8769115
Merge branch 'main' into raft_integration
cjnolet Jun 28, 2023
576f58f
Fixing merge
cjnolet Jun 28, 2023
eef2b28
Merge branch 'raft_integration' of https://github.com/cjnolet/faiss i…
tarang-jain Jun 28, 2023
092721f
Removing indexflat tests from changeset
cjnolet Jun 28, 2023
1c621ad
First version of copyFrom and copyTo
tarang-jain Jul 7, 2023
62b568b
Merge branch 'main' of https://github.com/facebookresearch/faiss into…
tarang-jain Jul 7, 2023
808f1d1
Merge branch 'raft_integration' of https://github.com/cjnolet/faiss i…
tarang-jain Jul 7, 2023
b8d616d
Update copyFrom and copyTo
tarang-jain Jul 25, 2023
cf87175
Merge branch 'main' of https://github.com/facebookresearch/faiss into…
tarang-jain Jul 25, 2023
444c58d
Passing tests
tarang-jain Jul 31, 2023
2887af8
Merge branch 'main' of https://github.com/facebookresearch/faiss into…
tarang-jain Jul 31, 2023
f148f09
Passing copyTo
tarang-jain Aug 4, 2023
284937b
Merge branch 'main' of https://github.com/facebookresearch/faiss into…
tarang-jain Aug 4, 2023
5756508
All tests passing
tarang-jain Aug 8, 2023
c5edbf7
Merge branch 'main' of https://github.com/facebookresearch/faiss into…
tarang-jain Aug 8, 2023
82e9791
cleanup
tarang-jain Aug 8, 2023
8486b9b
cleanup
tarang-jain Aug 9, 2023
38215bc
cleanup
tarang-jain Aug 9, 2023
ac67897
cleanup
tarang-jain Aug 9, 2023
94817aa
cleanup
tarang-jain Aug 9, 2023
91b1e32
cleanup
tarang-jain Aug 9, 2023
613ca7a
cleanup
tarang-jain Aug 9, 2023
c43c83f
Separate out nan filtering
tarang-jain Aug 9, 2023
7eb5209
Add USE_NVIDIA_RAFT
tarang-jain Aug 9, 2023
db1774b
Update test
tarang-jain Aug 14, 2023
8cf7e05
update quantizer
tarang-jain Aug 16, 2023
ad9a596
Merge branch 'main' of https://github.com/facebookresearch/faiss into…
tarang-jain Aug 16, 2023
a17b1f3
All except LongIVFList passing
tarang-jain Aug 21, 2023
d90d923
Merge branch 'main' of https://github.com/facebookresearch/faiss into…
tarang-jain Aug 21, 2023
3c33ebb
Formatting
tarang-jain Aug 21, 2023
971a6b2
Format
tarang-jain Aug 21, 2023
5c0592e
remove debug statements
tarang-jain Aug 21, 2023
7618b44
LargeBatch test added and now passing
tarang-jain Aug 23, 2023
bd5a217
final update to gtests
tarang-jain Aug 23, 2023
2022a14
Pull latest
tarang-jain Sep 6, 2023
d0f8385
Merge branch 'main' into raft_integration
tarang-jain Sep 6, 2023
e441ce5
IndicesOptions assertion
tarang-jain Sep 6, 2023
895d1fe
Merge branch 'main' of https://github.com/facebookresearch/faiss into…
tarang-jain Sep 6, 2023
c9f7288
Merge branch 'raft_integration' of https://github.com/cjnolet/faiss i…
tarang-jain Sep 6, 2023
a0457bd
checks passing
tarang-jain Sep 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/bin/bash

# NOTE: This file is temporary for the proof-of-concept branch and will be removed before this PR is merged

BUILD_TYPE=Release
BUILD_DIR=build/

RAFT_REPO_REL=""
EXTRA_CMAKE_ARGS=""
set -e

if [[ ${RAFT_REPO_REL} != "" ]]; then
RAFT_REPO_PATH="`readlink -f \"${RAFT_REPO_REL}\"`"
EXTRA_CMAKE_ARGS="${EXTRA_CMAKE_ARGS} -DCPM_raft_SOURCE=${RAFT_REPO_PATH}"
fi

if [ "$1" == "clean" ]; then
rm -rf build
rm -rf .cache
exit 0
fi

if [ "$1" == "test" ]; then
make -C build -j test
exit 0
fi

if [ "$1" == "test-raft" ]; then
./build/faiss/gpu/test/TestRaftIndexIVFFlat
exit 0
fi

mkdir -p $BUILD_DIR
cd $BUILD_DIR

cmake \
-DFAISS_ENABLE_GPU=ON \
-DFAISS_ENABLE_RAFT=ON \
-DFAISS_ENABLE_PYTHON=OFF \
-DBUILD_TESTING=ON \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DFAISS_OPT_LEVEL=avx2 \
-DRAFT_NVTX=OFF \
-DCMAKE_CUDA_ARCHITECTURES="NATIVE" \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_CUDA_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
${EXTRA_CMAKE_ARGS} \
../


# make -C build -j12 faiss
cmake --build . -j12
# make -C build -j12 swigfaiss
# (cd build/faiss/python && python setup.py install)

2 changes: 1 addition & 1 deletion cmake/thirdparty/fetch_rapids.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# or implied. See the License for the specific language governing permissions and limitations under
# the License.
# =============================================================================
set(RAPIDS_VERSION "23.06")
set(RAPIDS_VERSION "23.08")

if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/FAISS_RAPIDS.cmake)
file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-${RAPIDS_VERSION}/RAPIDS.cmake
Expand Down
4 changes: 3 additions & 1 deletion faiss/gpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,11 @@ generate_ivf_interleaved_code()

if(FAISS_ENABLE_RAFT)
list(APPEND FAISS_GPU_HEADERS
impl/RaftIVFFlat.cuh
impl/RaftFlatIndex.cuh)
list(APPEND FAISS_GPU_SRC
impl/RaftFlatIndex.cu)
impl/RaftFlatIndex.cu
impl/RaftIVFFlat.cu)

target_compile_definitions(faiss PUBLIC USE_NVIDIA_RAFT=1)
target_compile_definitions(faiss_avx2 PUBLIC USE_NVIDIA_RAFT=1)
Expand Down
49 changes: 43 additions & 6 deletions faiss/gpu/GpuIndexIVF.cu
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
#include <faiss/gpu/impl/IVFBase.cuh>
#include <faiss/gpu/utils/CopyUtils.cuh>

#if defined USE_NVIDIA_RAFT
#include <raft/core/handle.hpp>
#include <raft/neighbors/ivf_flat.cuh>
#endif

namespace faiss {
namespace gpu {

Expand Down Expand Up @@ -444,14 +449,46 @@ void GpuIndexIVF::trainQuantizer_(idx_t n, const float* x) {
printf("Training IVF quantizer on %ld vectors in %dD\n", n, d);
}

// leverage the CPU-side k-means code, which works for the GPU
// flat index as well
quantizer->reset();
Clustering clus(this->d, nlist, this->cp);
clus.verbose = verbose;
clus.train(n, x, *quantizer);
quantizer->is_trained = true;

#if defined USE_NVIDIA_RAFT

if (config_.use_raft) {
const raft::device_resources& raft_handle =
resources_->getRaftHandleCurrentDevice();

raft::neighbors::ivf_flat::index_params raft_idx_params;
raft_idx_params.n_lists = nlist;
raft_idx_params.metric = metric_type == faiss::METRIC_L2
? raft::distance::DistanceType::L2Expanded
: raft::distance::DistanceType::InnerProduct;
raft_idx_params.add_data_on_build = false;
raft_idx_params.kmeans_trainset_fraction = 1.0;
raft_idx_params.kmeans_n_iters = cp.niter;
raft_idx_params.adaptive_centers = !cp.frozen_centroids;

auto raft_index = raft::neighbors::ivf_flat::build(
raft_handle, raft_idx_params, x, n, (idx_t)d);

raft_handle.sync_stream();

quantizer->train(nlist, raft_index.centers().data_handle());
quantizer->add(nlist, raft_index.centers().data_handle());
} else
#else
if (config_.use_raft) {
FAISS_THROW_MSG(
"RAFT has not been compiled into the current version so it cannot be used.");
} else
#endif
{
// leverage the CPU-side k-means code, which works for the GPU
// flat index as well
Clustering clus(this->d, nlist, this->cp);
clus.verbose = verbose;
clus.train(n, x, *quantizer);
}
quantizer->is_trained = true;
FAISS_ASSERT(quantizer->ntotal == nlist);
}

Expand Down
13 changes: 7 additions & 6 deletions faiss/gpu/GpuIndexIVF.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,23 +73,24 @@ class GpuIndexIVF : public GpuIndex, public IndexIVFInterface {
virtual void updateQuantizer() = 0;

/// Returns the number of inverted lists we're managing
idx_t getNumLists() const;
virtual idx_t getNumLists() const;

/// Returns the number of vectors present in a particular inverted list
idx_t getListLength(idx_t listId) const;
virtual idx_t getListLength(idx_t listId) const;

/// Return the encoded vector data contained in a particular inverted list,
/// for debugging purposes.
/// If gpuFormat is true, the data is returned as it is encoded in the
/// GPU-side representation.
/// Otherwise, it is converted to the CPU format.
/// compliant format, while the native GPU format may differ.
std::vector<uint8_t> getListVectorData(idx_t listId, bool gpuFormat = false)
const;
virtual std::vector<uint8_t> getListVectorData(
idx_t listId,
bool gpuFormat = false) const;

/// Return the vector indices contained in a particular inverted list, for
/// debugging purposes.
std::vector<idx_t> getListIndices(idx_t listId) const;
virtual std::vector<idx_t> getListIndices(idx_t listId) const;

void search_preassigned(
idx_t n,
Expand Down Expand Up @@ -121,7 +122,7 @@ class GpuIndexIVF : public GpuIndex, public IndexIVFInterface {
int getCurrentNProbe_(const SearchParameters* params) const;
void verifyIVFSettings_() const;
bool addImplRequiresIDs_() const override;
void trainQuantizer_(idx_t n, const float* x);
virtual void trainQuantizer_(idx_t n, const float* x);

/// Called from GpuIndex for add/add_with_ids
void addImpl_(idx_t n, const float* x, const idx_t* ids) override;
Expand Down
103 changes: 83 additions & 20 deletions faiss/gpu/GpuIndexIVFFlat.cu
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
#include <faiss/gpu/utils/CopyUtils.cuh>
#include <faiss/gpu/utils/Float16.cuh>

#if defined USE_NVIDIA_RAFT
#include <faiss/gpu/impl/RaftIVFFlat.cuh>
#endif

#include <limits>

namespace faiss {
Expand Down Expand Up @@ -70,8 +74,7 @@ GpuIndexIVFFlat::GpuIndexIVFFlat(
// no other quantizer that we need to train, so this is sufficient
if (this->is_trained) {
FAISS_ASSERT(this->quantizer);

index_.reset(new IVFFlat(
set_index_(
resources_.get(),
this->d,
this->nlist,
Expand All @@ -81,14 +84,62 @@ GpuIndexIVFFlat::GpuIndexIVFFlat(
nullptr, // no scalar quantizer
ivfFlatConfig_.interleavedLayout,
ivfFlatConfig_.indicesOptions,
config_.memorySpace));
config_.memorySpace);
baseIndex_ = std::static_pointer_cast<IVFBase, IVFFlat>(index_);
updateQuantizer();
}
}

GpuIndexIVFFlat::~GpuIndexIVFFlat() {}

void GpuIndexIVFFlat::set_index_(
GpuResources* resources,
int dim,
int nlist,
faiss::MetricType metric,
float metricArg,
bool useResidual,
/// Optional ScalarQuantizer
faiss::ScalarQuantizer* scalarQ,
bool interleavedLayout,
IndicesOptions indicesOptions,
MemorySpace space) {
#if defined USE_NVIDIA_RAFT

if (config_.use_raft) {
index_.reset(new RaftIVFFlat(
resources,
dim,
nlist,
metric,
metricArg,
useResidual,
scalarQ,
interleavedLayout,
indicesOptions,
space));
} else
#else
if (config_.use_raft) {
FAISS_THROW_MSG(
"RAFT has not been compiled into the current version so it cannot be used.");
} else
#endif
{
index_.reset(new IVFFlat(
resources,
dim,
nlist,
metric,
metricArg,
useResidual,
scalarQ,
interleavedLayout,
indicesOptions,
space));
}
}

void GpuIndexIVFFlat::reserveMemory(size_t numVecs) {
DeviceScope scope(config_.device);

Expand All @@ -110,25 +161,25 @@ void GpuIndexIVFFlat::copyFrom(const faiss::IndexIVFFlat* index) {

// The other index might not be trained
if (!index->is_trained) {
FAISS_ASSERT(!this->is_trained);
FAISS_ASSERT(!is_trained);
return;
}

// Otherwise, we can populate ourselves from the other index
FAISS_ASSERT(this->is_trained);
FAISS_ASSERT(is_trained);

// Copy our lists as well
index_.reset(new IVFFlat(
set_index_(
resources_.get(),
this->d,
this->nlist,
d,
nlist,
index->metric_type,
index->metric_arg,
false, // no residual
nullptr, // no scalar quantizer
ivfFlatConfig_.interleavedLayout,
ivfFlatConfig_.indicesOptions,
config_.memorySpace));
config_.memorySpace);
baseIndex_ = std::static_pointer_cast<IVFBase, IVFFlat>(index_);
updateQuantizer();

Expand Down Expand Up @@ -201,18 +252,30 @@ void GpuIndexIVFFlat::train(idx_t n, const float* x) {

FAISS_ASSERT(!index_);

// FIXME: GPUize more of this
// First, make sure that the data is resident on the CPU, if it is not on
// the CPU, as we depend upon parts of the CPU code
auto hostData = toHost<float, 2>(
(float*)x,
resources_->getDefaultStream(config_.device),
{n, this->d});

trainQuantizer_(n, hostData.data());
#if defined USE_NVIDIA_RAFT
if (config_.use_raft) {
// No need to copy the data to host
trainQuantizer_(n, x);
} else
#else
if (config_.use_raft) {
FAISS_THROW_MSG(
"RAFT has not been compiled into the current version so it cannot be used.");
} else
#endif
{
// FIXME: GPUize more of this
// First, make sure that the data is resident on the CPU, if it is not
// on the CPU, as we depend upon parts of the CPU code
auto hostData = toHost<float, 2>(
(float*)x,
resources_->getDefaultStream(config_.device),
{n, this->d});
trainQuantizer_(n, hostData.data());
}

// The quantizer is now trained; construct the IVF index
index_.reset(new IVFFlat(
set_index_(
resources_.get(),
this->d,
this->nlist,
Expand All @@ -222,7 +285,7 @@ void GpuIndexIVFFlat::train(idx_t n, const float* x) {
nullptr, // no scalar quantizer
ivfFlatConfig_.interleavedLayout,
ivfFlatConfig_.indicesOptions,
config_.memorySpace));
config_.memorySpace);
baseIndex_ = std::static_pointer_cast<IVFBase, IVFFlat>(index_);
updateQuantizer();

Expand Down
15 changes: 15 additions & 0 deletions faiss/gpu/GpuIndexIVFFlat.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#pragma once

#include <faiss/gpu/GpuIndexIVF.h>
#include <faiss/impl/ScalarQuantizer.h>

#include <memory>

namespace faiss {
Expand Down Expand Up @@ -86,6 +88,19 @@ class GpuIndexIVFFlat : public GpuIndexIVF {
void train(idx_t n, const float* x) override;

protected:
void set_index_(
GpuResources* resources,
int dim,
int nlist,
faiss::MetricType metric,
float metricArg,
bool useResidual,
/// Optional ScalarQuantizer
faiss::ScalarQuantizer* scalarQ,
bool interleavedLayout,
IndicesOptions indicesOptions,
MemorySpace space);

/// Our configuration options
const GpuIndexIVFFlatConfig ivfFlatConfig_;

Expand Down
4 changes: 4 additions & 0 deletions faiss/gpu/StandardGpuResources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,10 @@ void StandardGpuResourcesImpl::initializeForDevice(int device) {

defaultStreams_[device] = defaultStream;

#if defined USE_NVIDIA_RAFT
raftHandles_.emplace(std::make_pair(device, defaultStream));
#endif

cudaStream_t asyncCopyStream = 0;
CUDA_VERIFY(
cudaStreamCreateWithFlags(&asyncCopyStream, cudaStreamNonBlocking));
Expand Down
Loading