Skip to content

Conversation

mnorris11
Copy link

@mnorris11 mnorris11 commented Dec 3, 2024

Summary:
X-link: facebookresearch/faiss#4045

Edit: Pytorch summary: When fixing the other PR in FAISS repo, I got a red signal in Phabricator saying that this pyre-ignore is no longer doing anything. So, we can land this after landing the FAISS PR linked above.

Summary from main diff:

Need to add to __init__.py like Matthijs mentioned on the github issue facebookresearch/faiss#3993. But we can't do it for non-GPU code, otherwise it will throw an exception and fail many tests than include fbcode/faiss. So we need to check if FAISS GPU is importable first.

To find the class names, I checked everything under faiss/gpu where the constructor accepts an Index. The other Index is always parameter at index 1 (0-indexed), so that's why we use 1 in the function calls.

Differential Revision: D66675910

Summary:
X-link: facebookresearch/faiss#4045

Need to add to `__init__.py` like Matthijs mentioned on the github issue facebookresearch/faiss#3993. But we can't do it for non-GPU code, otherwise it will throw an exception and fail many tests than include fbcode/faiss. So we need to check if FAISS GPU is importable first.

To find the class names, I checked everything under faiss/gpu where the constructor accepts an Index. The other Index is always parameter at index 1 (0-indexed), so that's why we use 1 in the function calls.

Differential Revision: D66675910
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 3, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D66675910

mnorris11 pushed a commit to mnorris11/faiss that referenced this pull request Dec 4, 2024
…#4045)

Summary:
X-link: pytorch/torchrec#2603


Need to add to `__init__.py` like Matthijs mentioned on the github issue facebookresearch#3993. But we can't do it for non-GPU code, otherwise it will throw an exception and fail many tests than include fbcode/faiss. So we need to check if FAISS GPU is importable first.

To find the class names like GpuIndexIVFFlat etc, I checked everything under faiss/gpu where the constructor accepts an Index. The other Index is always parameter at index 1 (0-indexed), so that's why we use 1 in the function calls.

Differential Revision: D66675910
mnorris11 pushed a commit to mnorris11/faiss that referenced this pull request Dec 4, 2024
…#4045)

Summary:
X-link: pytorch/torchrec#2603


Need to add to `__init__.py` like Matthijs mentioned on the github issue facebookresearch#3993. But we can't do it for non-GPU code, otherwise it will throw an exception and fail many tests than include fbcode/faiss. So we need to check if FAISS GPU is importable first.

To find the class names like GpuIndexIVFFlat etc, I checked everything under faiss/gpu where the constructor accepts an Index. The other Index is always parameter at index 1 (0-indexed), so that's why we use 1 in the function calls.

Differential Revision: D66675910
facebook-github-bot pushed a commit to facebookresearch/faiss that referenced this pull request Dec 4, 2024
Summary:
X-link: pytorch/torchrec#2603

Pull Request resolved: #4045

Need to add to `__init__.py` like Matthijs mentioned on the github issue #3993. But we can't do it for non-GPU code, otherwise it will throw an exception and fail many tests than include fbcode/faiss. So we need to check if FAISS GPU is importable first.

To find the class names like GpuIndexIVFFlat etc, I checked everything under faiss/gpu where the constructor accepts an Index. The other Index is always parameter at index 1 (0-indexed), so that's why we use 1 in the function calls.

Reviewed By: pankajsingh88

Differential Revision: D66675910

fbshipit-source-id: f170dadb6318c620420689164f9522f9815aa980
@mnorris11 mnorris11 deleted the export-D66675910 branch December 4, 2024 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants