Skip to content

Commit 772d860

Browse files
Reorder imports in torch_test_contrib_gpu (facebookresearch#3761)
Summary: Pull Request resolved: facebookresearch#3761 This fixes CUDA errors inside faiss in the test environment. If torch is loaded first (this change) then both torch and faiss see all GPUs available on the machine in the ROCm build. Without this change, torch sees the GPUs and faiss does not. AMD team is looking at finding the root cause but we wanted to fix this for now. Reviewed By: junjieqi, mnorris11 Differential Revision: D61358018 fbshipit-source-id: ac59be99817ef13d37a1676f615585f44eabaf24
1 parent d40adca commit 772d860

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

faiss/gpu/test/torch_test_contrib_gpu.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
# This source code is licensed under the MIT license found in the
44
# LICENSE file in the root directory of this source tree.
55

6-
import faiss
76
import torch
87
import unittest
98
import numpy as np
9+
import faiss
1010
import faiss.contrib.torch_utils
1111

1212
def to_column_major_torch(x):

0 commit comments

Comments
 (0)