Skip to content

Commit

Permalink
fix int32 vs int64 issue for GPU test on windows (#1739)
Browse files Browse the repository at this point in the history
Summary:
Part of the work towards #1586; I already mentioned this diff as necessary for a passing
GPU test suite on windows [here](#1586 (comment))

Pull Request resolved: #1739

Reviewed By: wickedfoo

Differential Revision: D26855633

Pulled By: mdouze

fbshipit-source-id: 96d3e627034ccbbe3a32cc4f2310a721e8ea0a69
  • Loading branch information
h-vetinari authored and facebook-github-bot committed Mar 5, 2021
1 parent f2f014d commit e8ad727
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions faiss/gpu/test/test_gpu_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,11 @@ def do_cpu_to_gpu(self, index_key):
index.train(xt)
ts.append(time.time())

# adding some ids because there was a bug in this case
index.add_with_ids(xb, np.arange(nb) * 3 + 12345)
# adding some ids because there was a bug in this case;
# those need to be cast to idx_t(= int64_t), because
# on windows the numpy int default is int32
ids = (np.arange(nb) * 3 + 12345).astype('int64')
index.add_with_ids(xb, ids)
ts.append(time.time())

index.nprobe = 4
Expand Down

0 comments on commit e8ad727

Please sign in to comment.