stop dealloc of coarse quantizer when it is deleted#2603
Closed
mnorris11 wants to merge 1 commit intometa-pytorch:mainfrom
Closed
stop dealloc of coarse quantizer when it is deleted#2603mnorris11 wants to merge 1 commit intometa-pytorch:mainfrom
mnorris11 wants to merge 1 commit intometa-pytorch:mainfrom
Conversation
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
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: meta-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: meta-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: meta-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
samanthawaters8882michaeldonovan
added a commit
to samanthawaters8882michaeldonovan/faiss
that referenced
this pull request
Oct 12, 2025
Summary: X-link: meta-pytorch/torchrec#2603 Pull Request resolved: 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 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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__.pylike 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