Skip to content

Commit

Permalink
Reorder imports in torch_test_contrib_gpu (facebookresearch#3761)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ramilbakhshyiev authored and facebook-github-bot committed Aug 15, 2024
1 parent d40adca commit 772d860
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion faiss/gpu/test/torch_test_contrib_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

import faiss
import torch
import unittest
import numpy as np
import faiss
import faiss.contrib.torch_utils

def to_column_major_torch(x):
Expand Down

0 comments on commit 772d860

Please sign in to comment.