-
Notifications
You must be signed in to change notification settings - Fork 369
[CPU] Fix issue: No module named 'fbgemm_gpu.experimental' #3292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CPU] Fix issue: No module named 'fbgemm_gpu.experimental' #3292
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/3292
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit f8e50ab with merge base 01374eb ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@Xia-Weiwen @mingfeima Could you help review this PR? |
| if importlib.util.find_spec("fbgemm_gpu") is None: | ||
| if ( | ||
| importlib.util.find_spec("fbgemm_gpu") is None | ||
| or importlib.util.find_spec("fbgemm_gpu.experimental") is None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh maybe just do importlib.util.find_spec(fbgemm_gpu.experimental.gen_ai) is None?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to check fbgemm first, otherwise the following error will occur.
File "/home/wengshiy/ao/torchao/quantization/quantize_/workflows/int4/int4_preshuffled_tensor.py", line 25, in <module>
if not _is_fbgemm_gpu_genai_available():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/home/wengshiy/ao/torchao/utils.py", line 1159, in _is_fbgemm_gpu_genai_available
importlib.util.find_spec("fbgemm_gpu.experimental") is None
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib.util>", line 91, in find_spec
ModuleNotFoundError: No module named 'fbgemm_gpu'
|
@pytorchbot label "topic: not user facing" |
|
@pytorchbot merge |
Merge failedReason: 1 mandatory check(s) are pending/not yet run. The first few are:
Dig deeper by viewing the pending checks on hud |
We want to use torchrec on CPU. On CPU, torchrec dependent on the CPU version of fbgemm_gpu.
On CPU, fbgemm_gpu not include fbgemm_gpu.experimental.
Similar issue: #2591
env:
Reproduce:
import torchaoError: